From a4c43ba9374b8f75a48d38a032353a0c7d311a73 Mon Sep 17 00:00:00 2001 From: N Balachandran Date: Fri, 11 Aug 2017 12:16:12 +0530 Subject: cluster/dht: Log files skipped by rebalance There was no easy way to find out which files were skipped during a rebalance. Rebalance now logs a message for every skipped file using msgid 109126, making it easier to find all files that were skipped. Change-Id: I2cac7db7285e2f82354251f3ea4094827b0daf3e BUG: 1480445 Signed-off-by: N Balachandran Reviewed-on: https://review.gluster.org/18021 Smoke: Gluster Build System CentOS-regression: Gluster Build System Reviewed-by: hari gowtham Reviewed-by: Raghavendra G --- xlators/cluster/dht/src/dht-rebalance.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'xlators/cluster/dht/src/dht-rebalance.c') diff --git a/xlators/cluster/dht/src/dht-rebalance.c b/xlators/cluster/dht/src/dht-rebalance.c index 101946ab386..b81be03404c 100644 --- a/xlators/cluster/dht/src/dht-rebalance.c +++ b/xlators/cluster/dht/src/dht-rebalance.c @@ -2674,6 +2674,11 @@ gf_defrag_migrate_single_file (void *opaque) defrag->skipped += 1; } UNLOCK (&defrag->lock); + + gf_msg (this->name, GF_LOG_INFO, 0, + DHT_MSG_MIGRATE_FILE_SKIPPED, + "File migration skipped for %s.", + entry_loc.path); } } else if (fop_errno == ENOTSUP) { @@ -2684,6 +2689,12 @@ gf_defrag_migrate_single_file (void *opaque) defrag->skipped += 1; } UNLOCK (&defrag->lock); + + gf_msg (this->name, GF_LOG_INFO, 0, + DHT_MSG_MIGRATE_FILE_SKIPPED, + "File migration skipped for %s.", + entry_loc.path); + } else if (fop_errno != EEXIST) { gf_msg (this->name, GF_LOG_ERROR, fop_errno, DHT_MSG_MIGRATE_FILE_FAILED, -- cgit