diff options
author | Ravishankar N <ravishankar@redhat.com> | 2018-09-28 17:00:00 +0530 |
---|---|---|
committer | Shyamsundar Ranganathan <srangana@redhat.com> | 2018-12-12 12:57:59 +0000 |
commit | fbdaffdb6d90409124507b3d9b15fc5d6b3ed8e6 (patch) | |
tree | b3aa463db2e970750f87f6f7a341adda3d0e170e /xlators/cluster/afr/src/afr-self-heal-entry.c | |
parent | 2438964129d37a6ec62006916ff4e454f6b034b9 (diff) |
afr: assign gfid during name heal when no 'source' is present.
Problem:
If parent dir is in split-brain or has dirty xattrs set, and the file
has gfid missing on one of the bricks, then name heal won't assign the
gfid.
Fix:
Use the brick we select the gfid from as the 'source'.
Note: Problem was found while trying to debug a split-brain issue on
Cynthia Zhou's setup.
fixes: bz#1655545
Change-Id: Id088d4f0fb017aa35122de426654194e581ed742
Reported-by: Cynthia Zhou <cynthia.zhou@nokia-sbell.com>
Signed-off-by: Ravishankar N <ravishankar@redhat.com>
(cherry picked from commit 4d58730c0cd6ab5db39aec8a15276f7bd3371b04)
Diffstat (limited to 'xlators/cluster/afr/src/afr-self-heal-entry.c')
-rw-r--r-- | xlators/cluster/afr/src/afr-self-heal-entry.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xlators/cluster/afr/src/afr-self-heal-entry.c b/xlators/cluster/afr/src/afr-self-heal-entry.c index 619558e94b7..fb6952c10fd 100644 --- a/xlators/cluster/afr/src/afr-self-heal-entry.c +++ b/xlators/cluster/afr/src/afr-self-heal-entry.c @@ -192,7 +192,7 @@ __afr_selfheal_heal_dirent(call_frame_t *frame, xlator_t *this, fd_t *fd, if (replies[source].op_ret == 0) { ret = afr_lookup_and_heal_gfid(this, fd->inode, name, inode, replies, source, sources, - &replies[source].poststat.ia_gfid); + &replies[source].poststat.ia_gfid, NULL); if (ret) return ret; } @@ -319,7 +319,7 @@ __afr_selfheal_merge_dirent(call_frame_t *frame, xlator_t *this, fd_t *fd, ret = afr_lookup_and_heal_gfid(this, fd->inode, name, inode, replies, source, sources, - &replies[source].poststat.ia_gfid); + &replies[source].poststat.ia_gfid, NULL); if (ret) return ret; |