diff options
author | Amar Tumballi <amar@gluster.com> | 2012-01-18 18:06:44 +0530 |
---|---|---|
committer | Anand Avati <avati@gluster.com> | 2012-01-25 02:03:44 -0800 |
commit | cf8486cbef329ef66868f658fa35f470f97db462 (patch) | |
tree | 18cf37bd7cf65ac820d435fb1ee43dc205a2917b /xlators/cluster/afr/src/afr-dir-read.c | |
parent | b02afc6d008f9959db28244eb2b9dd3b9ef92393 (diff) |
core: get xattrs also as part of readdirp
readdirp_req() call sends a dict_t * as an argument, which
contains all the xattr keys for which the entries got in
readdirp_rsp() are having xattr value filled dictionary.
Change-Id: I8b7e1290740ea3e884e67d19156ce849227167c0
Signed-off-by: Amar Tumballi <amar@gluster.com>
BUG: 765785
Reviewed-on: http://review.gluster.com/771
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@gluster.com>
Diffstat (limited to 'xlators/cluster/afr/src/afr-dir-read.c')
-rw-r--r-- | xlators/cluster/afr/src/afr-dir-read.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/xlators/cluster/afr/src/afr-dir-read.c b/xlators/cluster/afr/src/afr-dir-read.c index d41102e7eea..389515e3c36 100644 --- a/xlators/cluster/afr/src/afr-dir-read.c +++ b/xlators/cluster/afr/src/afr-dir-read.c @@ -570,7 +570,8 @@ afr_readdirp_cbk (call_frame_t *frame, void *cookie, xlator_t *this, children[next_call_child], children[next_call_child]->fops->readdirp, local->fd, - local->cont.readdir.size, 0); + local->cont.readdir.size, 0, + local->cont.readdir.dict); return 0; } } @@ -612,7 +613,8 @@ afr_readdirp_cbk (call_frame_t *frame, void *cookie, xlator_t *this, (void *) (long) read_child, children[call_child], children[call_child]->fops->readdirp, - local->fd, local->cont.readdir.size, offset); + local->fd, local->cont.readdir.size, offset, + local->cont.readdir.dict); return 0; } } else { @@ -628,7 +630,7 @@ out: int32_t afr_do_readdir (call_frame_t *frame, xlator_t *this, - fd_t *fd, size_t size, off_t offset, int whichop) + fd_t *fd, size_t size, off_t offset, int whichop, dict_t *dict) { afr_private_t * priv = NULL; xlator_t ** children = NULL; @@ -673,6 +675,7 @@ afr_do_readdir (call_frame_t *frame, xlator_t *this, local->fd = fd_ref (fd); local->cont.readdir.size = size; + local->cont.readdir.dict = (dict)? dict_ref (dict) : NULL; if (priv->strict_readdir) { ret = fd_ctx_get (fd, this, &ctx); @@ -709,7 +712,7 @@ afr_do_readdir (call_frame_t *frame, xlator_t *this, (void *) (long) call_child, children[call_child], children[call_child]->fops->readdirp, fd, - size, offset); + size, offset, dict); ret = 0; out: @@ -723,16 +726,16 @@ int32_t afr_readdir (call_frame_t *frame, xlator_t *this, fd_t *fd, size_t size, off_t offset) { - afr_do_readdir (frame, this, fd, size, offset, GF_FOP_READDIR); + afr_do_readdir (frame, this, fd, size, offset, GF_FOP_READDIR, NULL); return 0; } int32_t afr_readdirp (call_frame_t *frame, xlator_t *this, fd_t *fd, size_t size, - off_t offset) + off_t offset, dict_t *dict) { - afr_do_readdir (frame, this, fd, size, offset, GF_FOP_READDIRP); + afr_do_readdir (frame, this, fd, size, offset, GF_FOP_READDIRP, dict); return 0; } |