diff options
author | vmallika <vmallika@redhat.com> | 2015-01-22 17:40:44 +0530 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2015-03-18 06:59:54 -0700 |
commit | ee7bde14cd8afa7752dbaecd72a4afe16fb7afa9 (patch) | |
tree | a9b64abad2dda78e300f62ae2c06e6d9b2ca44e3 /xlators/features/marker | |
parent | a216745e5db3fdb4fa8d625c971e70f8d0e34d23 (diff) |
Quota: Build ancestry in the lookup
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>
Diffstat (limited to 'xlators/features/marker')
-rw-r--r-- | xlators/features/marker/src/marker-quota-helper.c | 10 |
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 cdc2475c3e8..f13d5f650b9 100644 --- a/xlators/features/marker/src/marker-quota-helper.c +++ b/xlators/features/marker/src/marker-quota-helper.c @@ -83,13 +83,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) |