Blob Blame History Raw
From 97b8816d6ba9765f4719e1d0dee253865e5ad685 Mon Sep 17 00:00:00 2001
From: Poornima G <pgurusid@redhat.com>
Date: Sun, 21 Aug 2016 17:14:06 +0530
Subject: [PATCH 125/141] io-stats: Add ipc fop for display in the profile info

Change-Id: I959899ac00b3019ed45bd0127c4dc9a27a74bcb9
BUG: 1284873
Signed-off-by: Poornima G <pgurusid@redhat.com>
Reviewed-on: http://review.gluster.org/15224
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-on: https://code.engineering.redhat.com/gerrit/87038
Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
Tested-by: Rajesh Joseph <rjoseph@redhat.com>
---
 xlators/debug/io-stats/src/io-stats.c |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/xlators/debug/io-stats/src/io-stats.c b/xlators/debug/io-stats/src/io-stats.c
index 62e85bb..43fba57 100644
--- a/xlators/debug/io-stats/src/io-stats.c
+++ b/xlators/debug/io-stats/src/io-stats.c
@@ -2396,6 +2396,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)
@@ -3260,6 +3270,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,
@@ -3912,6 +3931,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 = {
-- 
1.7.1