summaryrefslogtreecommitdiffstats
path: root/xlators/cluster
diff options
context:
space:
mode:
authorShehjar Tikoo <shehjart@gluster.com>2009-10-02 03:07:59 +0000
committerAnand V. Avati <avati@dev.gluster.com>2009-10-06 06:35:07 -0700
commit12947025dd2acd58b233d1c83efcab1038764189 (patch)
treef233b81200148b88dafada9fdf24e594905b7ba8 /xlators/cluster
parentee3b60524b49fc02d68c7ba219d8015a0d7c7a97 (diff)
unify: Support readdirp fop
Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 292 (Separate readdirp functionality from readdir fop) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=292
Diffstat (limited to 'xlators/cluster')
-rw-r--r--xlators/cluster/unify/src/unify.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/xlators/cluster/unify/src/unify.c b/xlators/cluster/unify/src/unify.c
index 4a6e70a2735..84fe55398ab 100644
--- a/xlators/cluster/unify/src/unify.c
+++ b/xlators/cluster/unify/src/unify.c
@@ -2572,6 +2572,29 @@ unify_readdir (call_frame_t *frame,
}
+int32_t
+unify_readdirp_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
+ int32_t op_ret, int32_t op_errno, gf_dirent_t *buf)
+{
+ STACK_UNWIND (frame, op_ret, op_errno, buf);
+
+ return 0;
+}
+
+
+int32_t
+unify_readdirp (call_frame_t *frame, xlator_t *this, fd_t *fd, size_t size,
+ off_t offset)
+{
+ UNIFY_CHECK_FD_AND_UNWIND_ON_ERR (fd);
+
+ STACK_WIND (frame, unify_readdirp_cbk, NS(this),
+ NS(this)->fops->readdirp, fd, size, offset);
+
+ return 0;
+}
+
+
/**
* unify_fsyncdir_cbk -
*/
@@ -4493,6 +4516,7 @@ struct xlator_fops fops = {
.removexattr = unify_removexattr,
.opendir = unify_opendir,
.readdir = unify_readdir,
+ .readdirp = unify_readdirp,
.fsyncdir = unify_fsyncdir,
.access = unify_access,
.ftruncate = unify_ftruncate,