From 4e2bc057ee5afb412d9056dc71a6bb959fb11df6 Mon Sep 17 00:00:00 2001 From: Dan Lambright Date: Thu, 16 Apr 2015 05:21:16 +0100 Subject: glusterd: add counter support for tiered volumes back port of http://review.gluster.org/10292 This fix adds support to view the number of promoted or demoted files from the cli. The mechanism is isolmorphic to checking the status of volumes being rebalanced. gluster volume rebalance tier status >Change-Id: I1b11ca27355ceec36c488967c23531202030e205 >BUG: 1213063 >Signed-off-by: Mohammed Rafi KC >Signed-off-by: Dan Lambright >Reviewed-on: http://review.gluster.org/10292 >Reviewed-by: Atin Mukherjee >Tested-by: Gluster Build System Change-Id: I543e886f17132b544274c83fdecca5a8da9d092a BUG: 1221477 Signed-off-by: Mohammed Rafi KC Signed-off-by: Dan Lambright Reviewed-on: http://review.gluster.org/10775 Tested-by: Gluster Build System Reviewed-by: Atin Mukherjee --- xlators/cluster/dht/src/tier.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'xlators/cluster/dht/src/tier.c') diff --git a/xlators/cluster/dht/src/tier.c b/xlators/cluster/dht/src/tier.c index 2526604eaba..bf481601bd8 100644 --- a/xlators/cluster/dht/src/tier.c +++ b/xlators/cluster/dht/src/tier.c @@ -365,6 +365,12 @@ tier_migrate_using_query_file (void *_args) per_link_status = -1; goto error; } + + if (query_cbk_args->is_promotion) + defrag->total_files_promoted++; + else + defrag->total_files_demoted++; + error: loc_wipe(&loc); -- cgit