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/client/src/client-handshake.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'xlators/protocol/client/src') diff --git a/xlators/protocol/client/src/client-handshake.c b/xlators/protocol/client/src/client-handshake.c index adccd8d4e51..354b9167810 100644 --- a/xlators/protocol/client/src/client-handshake.c +++ b/xlators/protocol/client/src/client-handshake.c @@ -1387,6 +1387,12 @@ client_setvolume (xlator_t *this, struct rpc_clnt *rpc) "msg", client_get_lk_ver (conf)); } + ret = dict_set_int32 (options, "opversion", GD_OP_VERSION_MAX); + if (ret < 0) { + gf_msg (this->name, GF_LOG_ERROR, 0, PC_MSG_DICT_SET_FAILED, + "Failed to set client opversion in handshake message"); + } + ret = dict_serialized_length (options); if (ret < 0) { gf_msg (this->name, GF_LOG_ERROR, 0, PC_MSG_DICT_ERROR, -- cgit