diff options
author | Ravishankar N <ravishankar@redhat.com> | 2018-12-03 18:17:34 +0530 |
---|---|---|
committer | Ravishankar N <ravishankar@redhat.com> | 2018-12-03 18:26:09 +0530 |
commit | 1eef0a0f398413145063b1b8690213ca3aa31800 (patch) | |
tree | 927a5446ff69225b87d2319175aeb1e1a9fb66b1 /xlators/cluster/afr/src/afr-self-heal.h | |
parent | 70ae565c759cb019b73c7b4d6ac3650293984bc2 (diff) |
afr: assign gfid during name heal when no 'source' is present
Backport of https://review.gluster.org/#/c/glusterfs/+/21297/
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#1655561
Change-Id: Id088d4f0fb017aa35122de426654194e581ed742
Reported-by: Cynthia Zhou <cynthia.zhou@nokia-sbell.com>
Signed-off-by: Ravishankar N <ravishankar@redhat.com>
Diffstat (limited to 'xlators/cluster/afr/src/afr-self-heal.h')
-rw-r--r-- | xlators/cluster/afr/src/afr-self-heal.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/cluster/afr/src/afr-self-heal.h b/xlators/cluster/afr/src/afr-self-heal.h index bac5e51341e..d7491e1522d 100644 --- a/xlators/cluster/afr/src/afr-self-heal.h +++ b/xlators/cluster/afr/src/afr-self-heal.h @@ -113,7 +113,7 @@ afr_selfheal_entry (call_frame_t *frame, xlator_t *this, inode_t *inode); int afr_lookup_and_heal_gfid (xlator_t *this, inode_t *parent, const char *name, inode_t *inode, struct afr_reply *replies, int source, - unsigned char *sources, void *gfid); + unsigned char *sources, void *gfid, int *gfid_idx); int afr_selfheal_inodelk (call_frame_t *frame, xlator_t *this, inode_t *inode, |