diff options
author | Krishnan Parthasarathi <kp@gluster.com> | 2012-02-14 21:27:10 +0530 |
---|---|---|
committer | Vijay Bellur <vijay@gluster.com> | 2012-03-01 08:23:49 -0800 |
commit | bcfd365c10d20bde920a3c6cdd1f95b7da5ffe84 (patch) | |
tree | 929990279fb42a057e977d2e7d3836fab9912612 /xlators/cluster/afr/src/afr.h | |
parent | 1936e29c3ac3d6466d391545d761ad8e60ae2e03 (diff) |
afr: [Un]Set the 'right' lkowner for [f]{inode|entry}_lk and the 'enclosed' fop.
afr 'mangles' the lkowner inorder to ensure [f]inodelk/[f]entrylk fops from the
same application contend. But other fops that are 'visible' to the application
should operate with the lkowner provided by fuse for correct functioning of
posix-locks xlator.
Change-Id: I7e71f35ae7df2a070f1f46d4fc77eed26a717673
BUG: 790743
Signed-off-by: Krishnan Parthasarathi <kp@gluster.com>
Reviewed-on: http://review.gluster.com/2752
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
Diffstat (limited to 'xlators/cluster/afr/src/afr.h')
-rw-r--r-- | xlators/cluster/afr/src/afr.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/xlators/cluster/afr/src/afr.h b/xlators/cluster/afr/src/afr.h index f0cb32c12b1..87b557bcb1e 100644 --- a/xlators/cluster/afr/src/afr.h +++ b/xlators/cluster/afr/src/afr.h @@ -335,6 +335,9 @@ afr_index_for_transaction_type (afr_transaction_type type) typedef struct { loc_t *lk_loc; struct gf_flock lk_flock; + gf_lkowner_t fop_lkowner; /* 'copy' of fop's lk_owner to protect + against afr internal locks 'irreversibly' + overloading lk_owner.*/ const char *lk_basename; const char *lower_basename; @@ -769,7 +772,12 @@ afr_mark_locked_nodes (xlator_t *this, fd_t *fd, unsigned char *locked_nodes); void -afr_set_lk_owner (call_frame_t *frame, xlator_t *this); +afr_set_lk_owner (call_frame_t *frame, xlator_t *this, + afr_internal_lock_t *int_lock); + +void +afr_unset_lk_owner (call_frame_t *frame, xlator_t *this, + afr_internal_lock_t *int_lock); int afr_set_lock_number (call_frame_t *frame, xlator_t *this); |