|
|
7f4c2a |
From dbec1f6a22f79b3b7d86401fefc1a2f6fb0dc820 Mon Sep 17 00:00:00 2001
|
|
|
7f4c2a |
From: vmallika <vmallika@redhat.com>
|
|
|
7f4c2a |
Date: Fri, 10 Jul 2015 16:04:16 +0530
|
|
|
7f4c2a |
Subject: [PATCH 231/234] quota/marker: inspect file/dir invoked without having quota xattrs requested
|
|
|
7f4c2a |
|
|
|
7f4c2a |
In a lookup and build ancestry quota xattrs are
|
|
|
7f4c2a |
not requested, it gives wrong assumption that
|
|
|
7f4c2a |
quota xattrs are missing and tries to do
|
|
|
7f4c2a |
healing process
|
|
|
7f4c2a |
|
|
|
7f4c2a |
> Change-Id: I7135101ec0edc72a6310dbb304227eaa3b16cb46
|
|
|
7f4c2a |
> BUG: 1207735
|
|
|
7f4c2a |
> Signed-off-by: vmallika <vmallika@redhat.com>
|
|
|
7f4c2a |
|
|
|
7f4c2a |
Change-Id: I819e1fd01a85d8dc6238b278662062b3ed9bc280
|
|
|
7f4c2a |
BUG: 1224177
|
|
|
7f4c2a |
Signed-off-by: vmallika <vmallika@redhat.com>
|
|
|
7f4c2a |
Reviewed-on: https://code.engineering.redhat.com/gerrit/52778
|
|
|
7f4c2a |
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
|
|
|
7f4c2a |
Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
|
|
|
7f4c2a |
---
|
|
|
7f4c2a |
xlators/features/marker/src/marker.c | 14 +++++++++++---
|
|
|
7f4c2a |
1 files changed, 11 insertions(+), 3 deletions(-)
|
|
|
7f4c2a |
|
|
|
7f4c2a |
diff --git a/xlators/features/marker/src/marker.c b/xlators/features/marker/src/marker.c
|
|
|
7f4c2a |
index c7c9fd3..db6943c 100644
|
|
|
7f4c2a |
--- a/xlators/features/marker/src/marker.c
|
|
|
7f4c2a |
+++ b/xlators/features/marker/src/marker.c
|
|
|
7f4c2a |
@@ -2719,6 +2719,10 @@ marker_lookup (call_frame_t *frame, xlator_t *this,
|
|
|
7f4c2a |
|
|
|
7f4c2a |
priv = this->private;
|
|
|
7f4c2a |
|
|
|
7f4c2a |
+ xattr_req = xattr_req ? dict_ref (xattr_req) : dict_new ();
|
|
|
7f4c2a |
+ if (!xattr_req)
|
|
|
7f4c2a |
+ goto err;
|
|
|
7f4c2a |
+
|
|
|
7f4c2a |
if (priv->feature_enabled == 0)
|
|
|
7f4c2a |
goto wind;
|
|
|
7f4c2a |
|
|
|
7f4c2a |
@@ -2732,15 +2736,21 @@ marker_lookup (call_frame_t *frame, xlator_t *this,
|
|
|
7f4c2a |
if (ret == -1)
|
|
|
7f4c2a |
goto err;
|
|
|
7f4c2a |
|
|
|
7f4c2a |
- if ((priv->feature_enabled & GF_QUOTA) && xattr_req)
|
|
|
7f4c2a |
+ if ((priv->feature_enabled & GF_QUOTA))
|
|
|
7f4c2a |
mq_req_xattr (this, loc, xattr_req, NULL);
|
|
|
7f4c2a |
wind:
|
|
|
7f4c2a |
STACK_WIND (frame, marker_lookup_cbk, FIRST_CHILD(this),
|
|
|
7f4c2a |
FIRST_CHILD(this)->fops->lookup, loc, xattr_req);
|
|
|
7f4c2a |
+
|
|
|
7f4c2a |
+ dict_unref (xattr_req);
|
|
|
7f4c2a |
+
|
|
|
7f4c2a |
return 0;
|
|
|
7f4c2a |
err:
|
|
|
7f4c2a |
STACK_UNWIND_STRICT (lookup, frame, -1, ENOMEM, NULL, NULL, NULL, NULL);
|
|
|
7f4c2a |
|
|
|
7f4c2a |
+ if (xattr_req)
|
|
|
7f4c2a |
+ dict_unref (xattr_req);
|
|
|
7f4c2a |
+
|
|
|
7f4c2a |
return 0;
|
|
|
7f4c2a |
}
|
|
|
7f4c2a |
|
|
|
7f4c2a |
@@ -2780,8 +2790,6 @@ marker_build_ancestry_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
|
|
|
7f4c2a |
continue;
|
|
|
7f4c2a |
}
|
|
|
7f4c2a |
|
|
|
7f4c2a |
- mq_xattr_state (this, &loc, entry->dict, entry->d_stat);
|
|
|
7f4c2a |
-
|
|
|
7f4c2a |
inode_unref (parent);
|
|
|
7f4c2a |
parent = inode_ref (entry->inode);
|
|
|
7f4c2a |
loc_wipe (&loc;;
|
|
|
7f4c2a |
--
|
|
|
7f4c2a |
1.7.1
|
|
|
7f4c2a |
|