From eaad568af3c11b9fd482f313b44f47e7e71e3362 Mon Sep 17 00:00:00 2001 From: Poornima G Date: Sun, 21 Aug 2016 17:14:06 +0530 Subject: io-stats: Add ipc fop for display in the profile info Change-Id: I959899ac00b3019ed45bd0127c4dc9a27a74bcb9 Signed-off-by: Poornima G Reviewed-on: http://review.gluster.org/15224 Smoke: Gluster Build System NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System Reviewed-by: Jeff Darcy --- xlators/debug/io-stats/src/io-stats.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'xlators/debug/io-stats/src/io-stats.c') diff --git a/xlators/debug/io-stats/src/io-stats.c b/xlators/debug/io-stats/src/io-stats.c index 86c0c189d89..1d3c9b9af93 100644 --- a/xlators/debug/io-stats/src/io-stats.c +++ b/xlators/debug/io-stats/src/io-stats.c @@ -2410,6 +2410,16 @@ io_stats_zerofill_cbk(call_frame_t *frame, void *cookie, xlator_t *this, return 0; } +int32_t +io_stats_ipc_cbk (call_frame_t *frame, void *cookie, xlator_t *this, + int32_t op_ret, int32_t op_errno, dict_t *xdata) +{ + UPDATE_PROFILE_STATS(frame, IPC); + STACK_UNWIND_STRICT (ipc, frame, op_ret, op_errno, + xdata); + return 0; +} + int io_stats_lk_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, int32_t op_errno, struct gf_flock *lock, dict_t *xdata) @@ -3281,6 +3291,15 @@ io_stats_zerofill(call_frame_t *frame, xlator_t *this, fd_t *fd, off_t offset, return 0; } +int32_t +io_stats_ipc (call_frame_t *frame, xlator_t *this, int32_t op, dict_t *xdata) +{ + START_FOP_LATENCY(frame); + + STACK_WIND (frame, io_stats_ipc_cbk, FIRST_CHILD(this), + FIRST_CHILD(this)->fops->ipc, op, xdata); + return 0; +} int io_stats_lk (call_frame_t *frame, xlator_t *this, @@ -3938,6 +3957,7 @@ struct xlator_fops fops = { .fallocate = io_stats_fallocate, .discard = io_stats_discard, .zerofill = io_stats_zerofill, + .ipc = io_stats_ipc, }; struct xlator_cbks cbks = { -- cgit