summaryrefslogtreecommitdiffstats
path: root/xlators/features/shard/src/shard.h
diff options
context:
space:
mode:
authorKrutika Dhananjay <kdhananj@redhat.com>2016-05-17 15:37:18 +0530
committerPranith Kumar Karampuri <pkarampu@redhat.com>2017-02-27 00:45:54 -0500
commit860ead4e36e4bf54bc5ed88d5ae3aa44d40358c3 (patch)
treeebf0dbe252367bb85fa3d3581c5d8647fe0f4a92 /xlators/features/shard/src/shard.h
parenta10bc7da360c95524cd79b30d364134f2368f348 (diff)
features/shard: Fix EIO error on add-brickrelease-3.9
Backport of: https://review.gluster.org/14419 DHT seems to link inode during lookup even before initializing inode ctx with layout information, which comes after directory healing. Consider two parallel writes. As part of the first write, shard sends lookup on .shard which in its return path would cause DHT to link .shard inode. Now at this point, when a second write is wound, inode_find() of .shard succeeds and as a result of this, shard goes to create the participant shards by issuing MKNODs under .shard. Since the layout is yet to be initialized, mknod fails in dht call path with EIO, leading to VM pauses. The fix involves shard maintaining a flag to denote whether a fresh lookup on .shard completed one network trip. If it didn't, all inode_find()s in fop path will be followed by a lookup before proceeding with the next stage of the fop. Big thanks to Raghavendra G and Pranith Kumar K for the RCA and subsequent inputs and feedback on the patch. Change-Id: Id0d160157ad8f6bcd52801a2173c5869517d0a96 BUG: 1426512 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: https://review.gluster.org/16752 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Diffstat (limited to 'xlators/features/shard/src/shard.h')
-rw-r--r--xlators/features/shard/src/shard.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/xlators/features/shard/src/shard.h b/xlators/features/shard/src/shard.h
index f626fae33c1..09232a45f24 100644
--- a/xlators/features/shard/src/shard.h
+++ b/xlators/features/shard/src/shard.h
@@ -268,6 +268,7 @@ typedef struct shard_inode_ctx {
struct list_head ilist;
uuid_t base_gfid;
int block_num;
+ gf_boolean_t refreshed;
} shard_inode_ctx_t;
#endif /* __SHARD_H__ */