summaryrefslogtreecommitdiffstats
path: root/xlators/storage
diff options
context:
space:
mode:
authorKrutika Dhananjay <kdhananj@redhat.com>2015-04-07 21:45:49 +0530
committerPranith Kumar Karampuri <pkarampu@redhat.com>2015-04-08 06:09:54 +0000
commit6a465e6e7e46940e00a387089cc995464975b53d (patch)
tree1dc5b540d7b4ddc7d043856984a185ce50b3b78a /xlators/storage
parent1d8e04c2544dec0a0f7fd8ada76287db2a2f71c1 (diff)
storage/posix: Introduce xattr_fill capability in posix_stat
Change-Id: I2b6503ad9333f445ebdcd9fa660da20b861b985f BUG: 1207603 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/10158 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Diffstat (limited to 'xlators/storage')
-rw-r--r--xlators/storage/posix/src/posix.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c
index 9f20aeb..cd93760 100644
--- a/xlators/storage/posix/src/posix.c
+++ b/xlators/storage/posix/src/posix.c
@@ -223,6 +223,7 @@ posix_stat (call_frame_t *frame, xlator_t *this, loc_t *loc, dict_t *xdata)
int32_t op_errno = 0;
struct posix_private *priv = NULL;
char *real_path = NULL;
+ dict_t *xattr_rsp = NULL;
DECLARE_OLD_FS_ID_VAR;
@@ -246,12 +247,17 @@ posix_stat (call_frame_t *frame, xlator_t *this, loc_t *loc, dict_t *xdata)
strerror (op_errno));
goto out;
}
+ if (xdata)
+ xattr_rsp = posix_lookup_xattr_fill (this, real_path, loc,
+ xdata, &buf);
op_ret = 0;
out:
SET_TO_OLD_FS_ID();
- STACK_UNWIND_STRICT (stat, frame, op_ret, op_errno, &buf, NULL);
+ STACK_UNWIND_STRICT (stat, frame, op_ret, op_errno, &buf, xattr_rsp);
+ if (xattr_rsp)
+ dict_unref (xattr_rsp);
return 0;
}