From ee7bde14cd8afa7752dbaecd72a4afe16fb7afa9 Mon Sep 17 00:00:00 2001 From: vmallika Date: Thu, 22 Jan 2015 17:40:44 +0530 Subject: 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 Reviewed-on: http://review.gluster.org/9478 Tested-by: Gluster Build System Reviewed-by: Raghavendra Bhat Reviewed-by: Vijay Bellur --- xlators/features/marker/src/marker-quota-helper.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'xlators/features/marker') 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) -- cgit