From 2e5383266869c13ee27ceaee5b24b686e2415df4 Mon Sep 17 00:00:00 2001 From: Samikshan Bairagya Date: Wed, 28 Dec 2016 20:33:54 +0530 Subject: glusterd: Add info on op-version for clients in vol status output Currently the `gluster volume status clients` command gives us the following information on clients: 1. Brick name 2. Client count for each brick 3. hostname:port for each client 4. Bytes read and written for each client There is no information regarding op-version for each client. This patch adds that to the output. Change-Id: Ib2ece93ab00c234162bb92b7c67a7d86f3350a8d BUG: 1409078 Signed-off-by: Samikshan Bairagya Reviewed-on: http://review.gluster.org/16303 Smoke: Gluster Build System NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System Reviewed-by: Atin Mukherjee --- xlators/protocol/server/src/server.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'xlators/protocol/server/src/server.c') diff --git a/xlators/protocol/server/src/server.c b/xlators/protocol/server/src/server.c index af3adb36ef2..db2f06ad582 100644 --- a/xlators/protocol/server/src/server.c +++ b/xlators/protocol/server/src/server.c @@ -275,6 +275,14 @@ server_priv_to_dict (xlator_t *this, dict_t *dict) if (ret) goto unlock; + memset (key, 0, sizeof (key)); + snprintf (key, sizeof (key), "client%d.opversion", + count); + ret = dict_set_uint32 (dict, key, + peerinfo->max_op_version); + if (ret) + goto unlock; + count++; } } -- cgit