summaryrefslogtreecommitdiffstats
path: root/xlators/debug/io-stats
diff options
context:
space:
mode:
authorShehjar Tikoo <shehjart@gluster.com>2009-10-02 03:08:01 +0000
committerAnand V. Avati <avati@dev.gluster.com>2009-10-06 06:35:15 -0700
commit95b6af6c355dfd5f705fd152884d6a40c8676b2c (patch)
tree1ff9b08e701794dae941636cefcf14509211d4e2 /xlators/debug/io-stats
parentd4bd1b3945d6792f7f8ec05b1bb642adfc824aa6 (diff)
io-stats: 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/debug/io-stats')
-rw-r--r--xlators/debug/io-stats/src/io-stats.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/xlators/debug/io-stats/src/io-stats.c b/xlators/debug/io-stats/src/io-stats.c
index 3c13bb080..b6b31fe8b 100644
--- a/xlators/debug/io-stats/src/io-stats.c
+++ b/xlators/debug/io-stats/src/io-stats.c
@@ -168,6 +168,15 @@ io_stats_getdents_cbk (call_frame_t *frame,
}
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,
xlator_t *this,
@@ -1126,6 +1135,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,
fd_t *fd,
@@ -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,