diff options
author | Varun Shastry <vshastry@redhat.com> | 2014-07-09 15:16:00 +0530 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2014-09-23 09:48:21 -0700 |
commit | e582cc6577913760d6b8636cef3d7267890ac1f1 (patch) | |
tree | 4852c807d1f596d43ef448f545da31891e4faf81 /xlators/features/marker/src/marker-quota.c | |
parent | 29ac98bdc7a07611d3e32b2b00e27bb3a273117b (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: I2e2589ecfa6b6a6e27407c9541fa90a314649bec
BUG: 1145623
Signed-off-by: Varun Shastry <vshastry@redhat.com>
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
Reviewed-on: http://review.gluster.org/8820
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/features/marker/src/marker-quota.c')
-rw-r--r-- | xlators/features/marker/src/marker-quota.c | 14 |
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 1903fdc4052..37c5cfa9225 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] == '/') @@ -608,8 +614,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; |