summaryrefslogtreecommitdiffstats
path: root/xlators/features/marker/src
diff options
context:
space:
mode:
authorRichard Wareing <rwareing@fb.com>2015-09-30 18:49:15 -0700
committerJeff Darcy <jeff@pl.atyp.us>2017-07-12 17:04:32 +0000
commit90d375de2e1ea49468c432126babbaee66d85fc0 (patch)
treea82b750eb8508c61f2e6ee119e0167f182390b9f /xlators/features/marker/src
parent50087889cce61d9c4216d1775762733c2206ff74 (diff)
cluster/afr: Handle gfid-less directories in heal flow
Summary: - Updates heal flow to handle case where a directory does not have a gfid assigned. In this case we will remove _only_ empty directories in these cases such that the parent can re-gain consistency and files within can be correctly healed. - Also adds a test for the case where a file does not have a gfid, this is already handles by the metadata heal flow, but tests were lacking for this code path. Test Plan: - prove -v tests/basic/shd_autofix_nogfid.t - prove -v tests/basic/gfid_unsplit_shd.t Reviewers: dph, moox, sshreyas Reviewed By: sshreyas Differential Revision: https://phabricator.fb.com/D2502067 Tasks: 8549168 Change-Id: I8dd3e6a6d62807cb38aafe597eced3d4b402351b Signed-off-by: Jeff Darcy <jdarcy@fb.com> Reviewed-on: https://review.gluster.org/17750 Tested-by: Jeff Darcy <jeff@pl.atyp.us> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Jeff Darcy <jeff@pl.atyp.us>
Diffstat (limited to 'xlators/features/marker/src')
-rw-r--r--xlators/features/marker/src/marker.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/xlators/features/marker/src/marker.c b/xlators/features/marker/src/marker.c
index f578f6c3f44..be98f2a1cca 100644
--- a/xlators/features/marker/src/marker.c
+++ b/xlators/features/marker/src/marker.c
@@ -1598,9 +1598,10 @@ marker_get_oldpath_contribution (call_frame_t *lk_frame, void *cookie,
*/
MARKER_SET_UID_GID (frame, local, frame->root);
- if (gf_uuid_is_null (oplocal->loc.gfid))
- gf_uuid_copy (oplocal->loc.gfid,
- oplocal->loc.inode->gfid);
+ if (gf_uuid_is_null (oplocal->loc.gfid)) {
+ gf_uuid_copy (oplocal->loc.gfid,
+ oplocal->loc.inode->gfid);
+ }
GF_UUID_ASSERT (oplocal->loc.gfid);