summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/dht/src/dht-common.h
diff options
context:
space:
mode:
authorMohit Agrawal <moagrawa@redhat.com>2017-10-06 15:13:02 +0530
committerRaghavendra G <rgowdapp@redhat.com>2017-11-22 17:18:47 +0000
commitdf2d9d26c876d0360ee6cfc46f2187bfcc7da6e7 (patch)
tree47f87bc59a87eafac5e86680314f2673b0b6b919 /xlators/cluster/dht/src/dht-common.h
parent50a480701f4bf6885d3811e245a47d99661695d8 (diff)
cluster/dht: Serialize mds update code path with lookup unwind in selfheal
Problem: Sometime test case ./tests/bugs/bug-1371806_1.t is failing on centos due to race condition between fresh lookup and setxattr fop. Solution: In selfheal code path we do save mds on inode_ctx, it was not serialize with lookup unwind. Due to this behavior after lookup unwind if mds is not saved on inode_ctx and if any subsequent setxattr fop call it has failed with ENOENT because no mds has found on inode ctx.To resolve it save mds on inode ctx has been serialize with lookup unwind. BUG: 1498966 Change-Id: I8d4bb40a6cbf0cec35d181ec0095cc7142b02e29 Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
Diffstat (limited to 'xlators/cluster/dht/src/dht-common.h')
-rw-r--r--xlators/cluster/dht/src/dht-common.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/xlators/cluster/dht/src/dht-common.h b/xlators/cluster/dht/src/dht-common.h
index bb3baa39d34..10c2e2089b8 100644
--- a/xlators/cluster/dht/src/dht-common.h
+++ b/xlators/cluster/dht/src/dht-common.h
@@ -374,6 +374,7 @@ struct dht_local {
/* This is use only for directory operation */
int32_t valid;
gf_boolean_t heal_layout;
+ int32_t mds_heal_fresh_lookup;
};
typedef struct dht_local dht_local_t;
@@ -1440,12 +1441,13 @@ xlator_t *
dht_inode_get_hashed_subvol (inode_t *inode, xlator_t *this, loc_t *loc);
int
-dht_mark_mds_subvolume (call_frame_t *frame, xlator_t *this);
+dht_common_mark_mdsxattr (call_frame_t *frame, int *errst, int flag);
int
-dht_mds_internal_setxattr_cbk (call_frame_t *frame, void *cookie,
- xlator_t *this, int op_ret, int op_errno,
- dict_t *xdata);
+dht_common_mark_mdsxattr_cbk (call_frame_t *frame, void *cookie,
+ xlator_t *this, int op_ret, int op_errno,
+ dict_t *xdata);
+
int
dht_inode_ctx_mdsvol_set (inode_t *inode, xlator_t *this,
xlator_t *mds_subvol);
@@ -1453,4 +1455,8 @@ int
dht_inode_ctx_mdsvol_get (inode_t *inode, xlator_t *this,
xlator_t **mdsvol);
+int
+dht_selfheal_dir_setattr (call_frame_t *frame, loc_t *loc, struct iatt *stbuf,
+ int32_t valid, dht_layout_t *layout);
+
#endif/* _DHT_H */