From e3592d7fab0dc9d3f304d3eda34ba862f2c657a6 Mon Sep 17 00:00:00 2001 From: N Balachandran Date: Mon, 29 Jul 2019 15:20:22 +0530 Subject: cluster/dht: Log hashes in hex Log layout hash ranges in hex to make it easier to compare them to the on disk xattrs. Change-Id: Ib75c2508bf8e0ab7f5ae26d0443ef02b792b7307 Fixes: bz#1697293 Signed-off-by: N Balachandran --- xlators/cluster/dht/src/dht-layout.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'xlators/cluster/dht/src/dht-layout.c') diff --git a/xlators/cluster/dht/src/dht-layout.c b/xlators/cluster/dht/src/dht-layout.c index 9cbb0f72171..dc14d72c1ff 100644 --- a/xlators/cluster/dht/src/dht-layout.c +++ b/xlators/cluster/dht/src/dht-layout.c @@ -146,7 +146,7 @@ dht_layout_search(xlator_t *this, dht_layout_t *layout, const char *name) if (!subvol) { gf_msg(this->name, GF_LOG_WARNING, 0, DHT_MSG_HASHED_SUBVOL_GET_FAILED, - "no subvolume for hash (value) = %u", hash); + "no subvolume for hash (value) = 0x%x", hash); } out: @@ -299,9 +299,10 @@ dht_disk_layout_merge(xlator_t *this, dht_layout_t *layout, int pos, layout->list[pos].start = start_off; layout->list[pos].stop = stop_off; - gf_msg_trace( - this->name, 0, "merged to layout: %u - %u (type %d, hash %d) from %s", - start_off, stop_off, commit_hash, type, layout->list[pos].xlator->name); + gf_msg_trace(this->name, 0, + "merged to layout: 0x%x - 0x%x (hash 0x%x, type %d) from %s", + start_off, stop_off, commit_hash, type, + layout->list[pos].xlator->name); return 0; } @@ -751,9 +752,8 @@ dht_layout_dir_mismatch(xlator_t *this, dht_layout_t *layout, xlator_t *subvol, (layout->list[pos].stop != stop_off) || (layout->list[pos].commit_hash != commit_hash)) { gf_msg(this->name, GF_LOG_INFO, 0, DHT_MSG_LAYOUT_INFO, - "subvol: %s; inode layout - %" PRIu32 " - %" PRIu32 " - %" PRIu32 - "; " - "disk layout - %" PRIu32 " - %" PRIu32 " - %" PRIu32, + "subvol: %s; inode layout: 0x%x - 0x%x, 0x%x; " + "disk layout: 0x%x - 0x%x, 0x%x", layout->list[pos].xlator->name, layout->list[pos].start, layout->list[pos].stop, layout->list[pos].commit_hash, start_off, stop_off, commit_hash); -- cgit