path: root/xlators/cluster/afr/src/afr-dir-write.c
diff options
authorAshish Pandey <>2018-12-21 14:31:15 +0530
committerAmar Tumballi <>2019-02-01 05:44:36 +0000
commit6b98735956c599ea621fa560b201fb7de6c36cac (patch)
tree0e835797f6688152fb8089118958307773f1d80f /xlators/cluster/afr/src/afr-dir-write.c
parent7eda6fe62d4e47937afc2ba71b4fd858399bca05 (diff)
cluster/thin-arbiter: Consider thin-arbiter before marking new entry changelog
If a fop to create an entry fails on one of the data brick, we mark the pending changelog on the entry on brick for which it was successful. This is done as part of post op phase to make sure that entry gets healed even if it gets renamed to some other path where its parent was not marked as bad. As it happens as part of post op, we should consider thin-arbiter to check if the brick, which was successful, is the good brick or not. This will avoide split brain and other issues. Change-Id: I12686675be98f02f70a5186b3ed748c541514d53 updates: bz#1662264 Signed-off-by: Ashish Pandey <>
Diffstat (limited to 'xlators/cluster/afr/src/afr-dir-write.c')
1 files changed, 6 insertions, 0 deletions
diff --git a/xlators/cluster/afr/src/afr-dir-write.c b/xlators/cluster/afr/src/afr-dir-write.c
index f2c8ef4..84e2a34 100644
--- a/xlators/cluster/afr/src/afr-dir-write.c
+++ b/xlators/cluster/afr/src/afr-dir-write.c
@@ -367,6 +367,12 @@ afr_mark_entry_pending_changelog(call_frame_t *frame, xlator_t *this)
if (pre_op_count == priv->child_count && !failed_count)
+ if (priv->thin_arbiter_count) {
+ /*Mark new entry using ta file*/
+ local->is_new_entry = _gf_true;
+ return;
+ }
afr_mark_new_entry_changelog(frame, this);