summaryrefslogtreecommitdiffstats
path: root/xlators/features/marker/src/marker-quota-helper.c
diff options
context:
space:
mode:
authorvmallika <vmallika@redhat.com>2015-03-19 07:32:33 +0530
committerRaghavendra Bhat <raghavendra@redhat.com>2015-03-25 01:54:43 -0700
commit0799f5f6091c09361fe0bc394fe614ee55d67296 (patch)
treebe4e6accd113ec08b067a4769535a73f329ee2f4 /xlators/features/marker/src/marker-quota-helper.c
parent54a725694c47ce59f700c57424e77f9c13244460 (diff)
Quota: Build ancestry in the lookup
This is a backport of http://review.gluster.org/#/c/9478/ > Marker can fail or can account incorrect numbers when it doesn't find a > ancestry for a inode. > > Solution: > Current build_ancestry is done only on demand in the write/create FOPs > in quota enforcer. > It is good to do this in the quota_lookup as well. > > Change-Id: I8aaf5b3e05a3ca51e7ab1eaa1b636a90f659a872 > BUG: 1184885 > Signed-off-by: vmallika <vmallika@redhat.com> > Reviewed-on: http://review.gluster.org/9478 > Tested-by: Gluster Build System <jenkins@build.gluster.com> > Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com> > Reviewed-by: Vijay Bellur <vbellur@redhat.com> Change-Id: I57d3f801996da7194f5290067ff367888994786d BUG: 1203648 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/9943 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
Diffstat (limited to 'xlators/features/marker/src/marker-quota-helper.c')
-rw-r--r--xlators/features/marker/src/marker-quota-helper.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/xlators/features/marker/src/marker-quota-helper.c b/xlators/features/marker/src/marker-quota-helper.c
index ec0d83316c7..0ad9bf00409 100644
--- a/xlators/features/marker/src/marker-quota-helper.c
+++ b/xlators/features/marker/src/marker-quota-helper.c
@@ -79,13 +79,19 @@ mq_inode_loc_fill (const char *parent_gfid, inode_t *inode, loc_t *loc)
parent = inode_find (inode->table,
(unsigned char *) parent_gfid);
- if (parent == NULL)
+ if (parent == NULL) {
+ gf_log ("marker", GF_LOG_ERROR, "parent is NULL for %s",
+ uuid_utoa(inode->gfid));
goto err;
+ }
ignore_parent:
ret = inode_path (inode, NULL, &resolvedpath);
- if (ret < 0)
+ if (ret < 0) {
+ gf_log ("marker", GF_LOG_ERROR, "failed to resolve path for %s",
+ uuid_utoa(inode->gfid));
goto err;
+ }
ret = mq_loc_fill (loc, inode, parent, resolvedpath);
if (ret < 0)