From 95b6af6c355dfd5f705fd152884d6a40c8676b2c Mon Sep 17 00:00:00 2001 From: Shehjar Tikoo Date: Fri, 2 Oct 2009 03:08:01 +0000 Subject: io-stats: Support readdirp fop Signed-off-by: Anand V. Avati BUG: 292 (Separate readdirp functionality from readdir fop) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=292 --- xlators/debug/io-stats/src/io-stats.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/xlators/debug/io-stats/src/io-stats.c b/xlators/debug/io-stats/src/io-stats.c index 3c13bb08028..b6b31fe8bc7 100644 --- a/xlators/debug/io-stats/src/io-stats.c +++ b/xlators/debug/io-stats/src/io-stats.c @@ -167,6 +167,15 @@ io_stats_getdents_cbk (call_frame_t *frame, return 0; } +int32_t +io_stats_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 io_stats_readdir_cbk (call_frame_t *frame, void *cookie, @@ -1125,6 +1134,20 @@ io_stats_getdents (call_frame_t *frame, } +int32_t +io_stats_readdirp (call_frame_t *frame, xlator_t *this, fd_t *fd, size_t size, + off_t offset) +{ + BUMP_HIT(READDIRP); + + STACK_WIND (frame, io_stats_readdirp_cbk, FIRST_CHILD(this), + FIRST_CHILD(this)->fops->readdir, fd, size, offset); + + return 0; +} + + + int32_t io_stats_readdir (call_frame_t *frame, xlator_t *this, @@ -1468,6 +1491,7 @@ struct xlator_fops fops = { .removexattr = io_stats_removexattr, .opendir = io_stats_opendir, .readdir = io_stats_readdir, + .readdirp = io_stats_readdirp, .fsyncdir = io_stats_fsyncdir, .access = io_stats_access, .ftruncate = io_stats_ftruncate, -- cgit