diff options
Diffstat (limited to 'xlators/cluster/afr/src/afr-self-heal-entry.c')
| -rw-r--r-- | xlators/cluster/afr/src/afr-self-heal-entry.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/xlators/cluster/afr/src/afr-self-heal-entry.c b/xlators/cluster/afr/src/afr-self-heal-entry.c index 09f26690588..776cc9c5c21 100644 --- a/xlators/cluster/afr/src/afr-self-heal-entry.c +++ b/xlators/cluster/afr/src/afr-self-heal-entry.c @@ -299,13 +299,16 @@ __afr_selfheal_merge_dirent (call_frame_t *frame, xlator_t *this, fd_t *fd, } } - /* In case of a gfid or type mismatch on the entry, return -1.*/ - ret = afr_selfheal_detect_gfid_and_type_mismatch (this, replies, - fd->inode->gfid, - name, source); - - if (ret < 0) - return ret; + /* Returning EIO here isn't needed if GFID forced heal is + * enabled. + */ + if (!priv->gfid_splitbrain_forced_heal) { + /* In case of a gfid or type mismatch on the entry, return -1.*/ + ret = afr_selfheal_detect_gfid_and_type_mismatch (this, + replies, fd->inode->gfid, name, source); + if (ret < 0) + return ret; + } for (i = 0; i < priv->child_count; i++) { if (i == source || !healed_sinks[i]) |
