summaryrefslogtreecommitdiffstats
path: root/xlators/features/marker/src/marker-quota.c
diff options
context:
space:
mode:
authorVarun Shastry <vshastry@redhat.com>2014-07-09 15:16:00 +0530
committerNiels de Vos <ndevos@redhat.com>2014-09-22 00:34:09 -0700
commitda1657d6841e6bd74074f5a60ed29cf3a97fbff4 (patch)
treeedd96320cce0b6115ca449ccdcff1d5e8e73bbd9 /xlators/features/marker/src/marker-quota.c
parent6f015ab7771f0ab515b57b5333777f04a04167e6 (diff)
features/marker: Fill loc->path before sending the control to healing
Backport of: http://review.gluster.org/8296 Problem: The xattr healing part of the marker requires path to be present in the loc. Currently path is not filled while triggering from the readdirp_cbk. Solution: Current patch tries to fill the loc with path. Change-Id: Icc16c740bc6453714306eae19526e18c1775c1d8 BUG: 1144315 Signed-off-by: Varun Shastry <vshastry@redhat.com> Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/8778 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Diffstat (limited to 'xlators/features/marker/src/marker-quota.c')
-rw-r--r--xlators/features/marker/src/marker-quota.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/xlators/features/marker/src/marker-quota.c b/xlators/features/marker/src/marker-quota.c
index a758e938f69..3156cd82508 100644
--- a/xlators/features/marker/src/marker-quota.c
+++ b/xlators/features/marker/src/marker-quota.c
@@ -173,6 +173,12 @@ mq_loc_fill_from_name (xlator_t *this, loc_t *newloc, loc_t *oldloc,
newloc->parent = inode_ref (oldloc->inode);
uuid_copy (newloc->pargfid, oldloc->inode->gfid);
+ if (!oldloc->path) {
+ ret = loc_path (oldloc, NULL);
+ if (ret == -1)
+ goto out;
+ }
+
len = strlen (oldloc->path);
if (oldloc->path [len - 1] == '/')
@@ -606,8 +612,14 @@ mq_readdir_cbk (call_frame_t *frame,
ret = mq_loc_fill_from_name (this, &loc, &local->loc,
entry->d_ino, entry->d_name);
- if (ret < 0)
+ if (ret < 0) {
+ gf_log (this->name, GF_LOG_WARNING, "Couldn't build "
+ "loc for %s/%s, returning from updation of "
+ "quota attributes",
+ uuid_utoa (local->loc.inode->gfid),
+ entry->d_name);
goto out;
+ }
ret = 0;