|
|
21ab4e |
From ee0795e32d7b069c925906d4b04c6c045d0f189d Mon Sep 17 00:00:00 2001
|
|
|
21ab4e |
From: menakamohan <menaka.m@outlook.com>
|
|
|
21ab4e |
Date: Tue, 31 Jan 2017 17:14:30 +0530
|
|
|
21ab4e |
Subject: [PATCH 428/473] Added the missing FOPs in the io-stats xlator
|
|
|
21ab4e |
|
|
|
21ab4e |
Backport of : https://review.gluster.org/16490
|
|
|
21ab4e |
|
|
|
21ab4e |
The following FOPs are not implemented in the io-stats xlator.
|
|
|
21ab4e |
1)fentrylk
|
|
|
21ab4e |
2)compound
|
|
|
21ab4e |
3)seek
|
|
|
21ab4e |
4)lease
|
|
|
21ab4e |
5)getactivelk
|
|
|
21ab4e |
6)setactivelk
|
|
|
21ab4e |
|
|
|
21ab4e |
Added the missing FOPs to the io-stats xlator
|
|
|
21ab4e |
|
|
|
21ab4e |
Change-Id: Ifd8051eb12d81e56342257878e4444379c86cf08
|
|
|
21ab4e |
BUG: 1449684
|
|
|
21ab4e |
Signed-off-by: Ravishankar N <ravishankar@redhat.com>
|
|
|
21ab4e |
Reviewed-on: https://code.engineering.redhat.com/gerrit/105802
|
|
|
21ab4e |
Reviewed-by: Poornima Gurusiddaiah <pgurusid@redhat.com>
|
|
|
21ab4e |
Reviewed-by: Shyam Ranganathan <srangana@redhat.com>
|
|
|
21ab4e |
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
|
|
|
21ab4e |
---
|
|
|
21ab4e |
xlators/debug/io-stats/src/io-stats.c | 168 ++++++++++++++++++++++++++++++++++
|
|
|
21ab4e |
1 file changed, 168 insertions(+)
|
|
|
21ab4e |
|
|
|
21ab4e |
diff --git a/xlators/debug/io-stats/src/io-stats.c b/xlators/debug/io-stats/src/io-stats.c
|
|
|
21ab4e |
index 23cab8b..46e1272 100644
|
|
|
21ab4e |
--- a/xlators/debug/io-stats/src/io-stats.c
|
|
|
21ab4e |
+++ b/xlators/debug/io-stats/src/io-stats.c
|
|
|
21ab4e |
@@ -2500,6 +2500,76 @@ io_stats_entrylk_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
|
|
|
21ab4e |
return 0;
|
|
|
21ab4e |
}
|
|
|
21ab4e |
|
|
|
21ab4e |
+int
|
|
|
21ab4e |
+io_stats_fentrylk_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
|
|
|
21ab4e |
+ int32_t op_ret, int32_t op_errno, dict_t *xdata)
|
|
|
21ab4e |
+{
|
|
|
21ab4e |
+ UPDATE_PROFILE_STATS (frame, FENTRYLK);
|
|
|
21ab4e |
+ STACK_UNWIND_STRICT (fentrylk, frame, op_ret, op_errno, xdata);
|
|
|
21ab4e |
+ return 0;
|
|
|
21ab4e |
+}
|
|
|
21ab4e |
+
|
|
|
21ab4e |
+int
|
|
|
21ab4e |
+io_stats_rchecksum_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
|
|
|
21ab4e |
+ int32_t op_ret, int32_t op_errno, uint32_t weak_checksum,
|
|
|
21ab4e |
+ uint8_t *strong_checksum, dict_t *xdata)
|
|
|
21ab4e |
+{
|
|
|
21ab4e |
+ UPDATE_PROFILE_STATS (frame, RCHECKSUM);
|
|
|
21ab4e |
+ STACK_UNWIND_STRICT (rchecksum, frame, op_ret, op_errno, weak_checksum,
|
|
|
21ab4e |
+ strong_checksum, xdata);
|
|
|
21ab4e |
+ return 0;
|
|
|
21ab4e |
+}
|
|
|
21ab4e |
+
|
|
|
21ab4e |
+int
|
|
|
21ab4e |
+io_stats_seek_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
|
|
|
21ab4e |
+ int32_t op_ret, int32_t op_errno, off_t offset,
|
|
|
21ab4e |
+ dict_t *xdata)
|
|
|
21ab4e |
+{
|
|
|
21ab4e |
+ UPDATE_PROFILE_STATS (frame, SEEK);
|
|
|
21ab4e |
+ STACK_UNWIND_STRICT (seek, frame, op_ret, op_errno, offset, xdata);
|
|
|
21ab4e |
+ return 0;
|
|
|
21ab4e |
+}
|
|
|
21ab4e |
+
|
|
|
21ab4e |
+int
|
|
|
21ab4e |
+io_stats_lease_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
|
|
|
21ab4e |
+ int32_t op_ret, int32_t op_errno,
|
|
|
21ab4e |
+ struct gf_lease *lease, dict_t *xdata)
|
|
|
21ab4e |
+{
|
|
|
21ab4e |
+ UPDATE_PROFILE_STATS (frame, LEASE);
|
|
|
21ab4e |
+ STACK_UNWIND_STRICT (lease, frame, op_ret, op_errno, lease, xdata);
|
|
|
21ab4e |
+ return 0;
|
|
|
21ab4e |
+}
|
|
|
21ab4e |
+
|
|
|
21ab4e |
+int
|
|
|
21ab4e |
+io_stats_getactivelk_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
|
|
|
21ab4e |
+ int32_t op_ret, int32_t op_errno,
|
|
|
21ab4e |
+ lock_migration_info_t *locklist,
|
|
|
21ab4e |
+ dict_t *xdata)
|
|
|
21ab4e |
+{
|
|
|
21ab4e |
+ UPDATE_PROFILE_STATS (frame, GETACTIVELK);
|
|
|
21ab4e |
+ STACK_UNWIND_STRICT (getactivelk, frame, op_ret, op_errno,
|
|
|
21ab4e |
+ locklist, xdata);
|
|
|
21ab4e |
+ return 0;
|
|
|
21ab4e |
+}
|
|
|
21ab4e |
+
|
|
|
21ab4e |
+int
|
|
|
21ab4e |
+io_stats_setactivelk_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
|
|
|
21ab4e |
+ int32_t op_ret, int32_t op_errno, dict_t *xdata)
|
|
|
21ab4e |
+{
|
|
|
21ab4e |
+ UPDATE_PROFILE_STATS (frame, SETACTIVELK);
|
|
|
21ab4e |
+ STACK_UNWIND_STRICT (setactivelk, frame, op_ret, op_errno, xdata);
|
|
|
21ab4e |
+ return 0;
|
|
|
21ab4e |
+}
|
|
|
21ab4e |
+
|
|
|
21ab4e |
+int
|
|
|
21ab4e |
+io_stats_compound_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
|
|
|
21ab4e |
+ int32_t op_ret, int32_t op_errno, void *data,
|
|
|
21ab4e |
+ dict_t *xdata)
|
|
|
21ab4e |
+{
|
|
|
21ab4e |
+ UPDATE_PROFILE_STATS (frame, COMPOUND);
|
|
|
21ab4e |
+ STACK_UNWIND_STRICT (compound, frame, op_ret, op_errno, data, xdata);
|
|
|
21ab4e |
+ return 0;
|
|
|
21ab4e |
+}
|
|
|
21ab4e |
|
|
|
21ab4e |
int
|
|
|
21ab4e |
io_stats_xattrop_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
|
|
|
21ab4e |
@@ -2544,6 +2614,20 @@ io_stats_entrylk (call_frame_t *frame, xlator_t *this,
|
|
|
21ab4e |
return 0;
|
|
|
21ab4e |
}
|
|
|
21ab4e |
|
|
|
21ab4e |
+int
|
|
|
21ab4e |
+io_stats_fentrylk (call_frame_t *frame, xlator_t *this,
|
|
|
21ab4e |
+ const char *volume, fd_t *fd, const char *basename,
|
|
|
21ab4e |
+ entrylk_cmd cmd, entrylk_type type, dict_t *xdata)
|
|
|
21ab4e |
+{
|
|
|
21ab4e |
+ START_FOP_LATENCY (frame);
|
|
|
21ab4e |
+
|
|
|
21ab4e |
+ STACK_WIND (frame, io_stats_fentrylk_cbk,
|
|
|
21ab4e |
+ FIRST_CHILD(this),
|
|
|
21ab4e |
+ FIRST_CHILD(this)->fops->fentrylk,
|
|
|
21ab4e |
+ volume, fd, basename, cmd, type, xdata);
|
|
|
21ab4e |
+ return 0;
|
|
|
21ab4e |
+}
|
|
|
21ab4e |
+
|
|
|
21ab4e |
|
|
|
21ab4e |
int
|
|
|
21ab4e |
io_stats_inodelk (call_frame_t *frame, xlator_t *this,
|
|
|
21ab4e |
@@ -3368,6 +3452,83 @@ io_stats_lk (call_frame_t *frame, xlator_t *this,
|
|
|
21ab4e |
return 0;
|
|
|
21ab4e |
}
|
|
|
21ab4e |
|
|
|
21ab4e |
+int
|
|
|
21ab4e |
+io_stats_rchecksum (call_frame_t *frame, xlator_t *this,
|
|
|
21ab4e |
+ fd_t *fd, off_t offset, int32_t len, dict_t *xdata)
|
|
|
21ab4e |
+{
|
|
|
21ab4e |
+ START_FOP_LATENCY (frame);
|
|
|
21ab4e |
+
|
|
|
21ab4e |
+ STACK_WIND (frame, io_stats_rchecksum_cbk,
|
|
|
21ab4e |
+ FIRST_CHILD(this),
|
|
|
21ab4e |
+ FIRST_CHILD(this)->fops->rchecksum,
|
|
|
21ab4e |
+ fd, offset, len, xdata);
|
|
|
21ab4e |
+ return 0;
|
|
|
21ab4e |
+}
|
|
|
21ab4e |
+
|
|
|
21ab4e |
+int
|
|
|
21ab4e |
+io_stats_seek (call_frame_t *frame, xlator_t *this, fd_t *fd,
|
|
|
21ab4e |
+ off_t offset, gf_seek_what_t what, dict_t *xdata)
|
|
|
21ab4e |
+{
|
|
|
21ab4e |
+ START_FOP_LATENCY (frame);
|
|
|
21ab4e |
+
|
|
|
21ab4e |
+ STACK_WIND (frame, io_stats_seek_cbk,
|
|
|
21ab4e |
+ FIRST_CHILD(this),
|
|
|
21ab4e |
+ FIRST_CHILD(this)->fops->seek,
|
|
|
21ab4e |
+ fd, offset, what, xdata);
|
|
|
21ab4e |
+ return 0;
|
|
|
21ab4e |
+}
|
|
|
21ab4e |
+
|
|
|
21ab4e |
+int
|
|
|
21ab4e |
+io_stats_lease (call_frame_t *frame, xlator_t *this, loc_t *loc,
|
|
|
21ab4e |
+ struct gf_lease *lease, dict_t *xdata)
|
|
|
21ab4e |
+{
|
|
|
21ab4e |
+ START_FOP_LATENCY (frame);
|
|
|
21ab4e |
+
|
|
|
21ab4e |
+ STACK_WIND (frame, io_stats_lease_cbk,
|
|
|
21ab4e |
+ FIRST_CHILD(this),
|
|
|
21ab4e |
+ FIRST_CHILD(this)->fops->lease,
|
|
|
21ab4e |
+ loc, lease, xdata);
|
|
|
21ab4e |
+ return 0;
|
|
|
21ab4e |
+}
|
|
|
21ab4e |
+
|
|
|
21ab4e |
+int
|
|
|
21ab4e |
+io_stats_getactivelk (call_frame_t *frame, xlator_t *this, loc_t *loc,
|
|
|
21ab4e |
+ dict_t *xdata)
|
|
|
21ab4e |
+{
|
|
|
21ab4e |
+ START_FOP_LATENCY (frame);
|
|
|
21ab4e |
+
|
|
|
21ab4e |
+ STACK_WIND (frame, io_stats_getactivelk_cbk,
|
|
|
21ab4e |
+ FIRST_CHILD(this),
|
|
|
21ab4e |
+ FIRST_CHILD(this)->fops->getactivelk,
|
|
|
21ab4e |
+ loc, xdata);
|
|
|
21ab4e |
+ return 0;
|
|
|
21ab4e |
+}
|
|
|
21ab4e |
+
|
|
|
21ab4e |
+int
|
|
|
21ab4e |
+io_stats_setactivelk (call_frame_t *frame, xlator_t *this, loc_t *loc,
|
|
|
21ab4e |
+ lock_migration_info_t *locklist, dict_t *xdata)
|
|
|
21ab4e |
+{
|
|
|
21ab4e |
+ START_FOP_LATENCY (frame);
|
|
|
21ab4e |
+
|
|
|
21ab4e |
+ STACK_WIND (frame, io_stats_setactivelk_cbk,
|
|
|
21ab4e |
+ FIRST_CHILD(this),
|
|
|
21ab4e |
+ FIRST_CHILD(this)->fops->setactivelk,
|
|
|
21ab4e |
+ loc, locklist, xdata);
|
|
|
21ab4e |
+ return 0;
|
|
|
21ab4e |
+}
|
|
|
21ab4e |
+
|
|
|
21ab4e |
+int
|
|
|
21ab4e |
+io_stats_compound (call_frame_t *frame, xlator_t *this,
|
|
|
21ab4e |
+ void *args, dict_t *xdata)
|
|
|
21ab4e |
+{
|
|
|
21ab4e |
+ START_FOP_LATENCY (frame);
|
|
|
21ab4e |
+
|
|
|
21ab4e |
+ STACK_WIND (frame, io_stats_compound_cbk,
|
|
|
21ab4e |
+ FIRST_CHILD(this),
|
|
|
21ab4e |
+ FIRST_CHILD(this)->fops->compound,
|
|
|
21ab4e |
+ args, xdata);
|
|
|
21ab4e |
+ return 0;
|
|
|
21ab4e |
+}
|
|
|
21ab4e |
|
|
|
21ab4e |
int
|
|
|
21ab4e |
io_stats_release (xlator_t *this, fd_t *fd)
|
|
|
21ab4e |
@@ -4033,6 +4194,7 @@ struct xlator_fops fops = {
|
|
|
21ab4e |
.inodelk = io_stats_inodelk,
|
|
|
21ab4e |
.finodelk = io_stats_finodelk,
|
|
|
21ab4e |
.entrylk = io_stats_entrylk,
|
|
|
21ab4e |
+ .fentrylk = io_stats_fentrylk,
|
|
|
21ab4e |
.lookup = io_stats_lookup,
|
|
|
21ab4e |
.xattrop = io_stats_xattrop,
|
|
|
21ab4e |
.fxattrop = io_stats_fxattrop,
|
|
|
21ab4e |
@@ -4042,6 +4204,12 @@ struct xlator_fops fops = {
|
|
|
21ab4e |
.discard = io_stats_discard,
|
|
|
21ab4e |
.zerofill = io_stats_zerofill,
|
|
|
21ab4e |
.ipc = io_stats_ipc,
|
|
|
21ab4e |
+ .rchecksum = io_stats_rchecksum,
|
|
|
21ab4e |
+ .seek = io_stats_seek,
|
|
|
21ab4e |
+ .lease = io_stats_lease,
|
|
|
21ab4e |
+ .getactivelk = io_stats_getactivelk,
|
|
|
21ab4e |
+ .setactivelk = io_stats_setactivelk,
|
|
|
21ab4e |
+ .compound = io_stats_compound,
|
|
|
21ab4e |
};
|
|
|
21ab4e |
|
|
|
21ab4e |
struct xlator_cbks cbks = {
|
|
|
21ab4e |
--
|
|
|
21ab4e |
1.8.3.1
|
|
|
21ab4e |
|