summaryrefslogtreecommitdiffstats
path: root/xlators/features
diff options
context:
space:
mode:
authorRaghavendra Bhat <raghavendra@redhat.com>2018-04-18 15:18:43 -0400
committerAmar Tumballi <amarts@redhat.com>2018-04-20 05:10:50 +0000
commit3e8425b5643326e16ce283109edc5f516e21d7f7 (patch)
tree1e80d73edb597fda38ab9ec8d93bbb1feee6b932 /xlators/features
parentef8f9ad76a5a1c9495a77e7e83b7fd05a9a7e757 (diff)
features/bitrot: show the corresponding brick for the corrupted objects
Currently with "gluster volume bitrot <volume name> scrub status" command the corrupted objects of a node are shown. But to what brick that corrupted object belongs to is not shown. Showing the brick of the corrupted object will help in situations where a node hosts multiple bricks of a volume. Change-Id: I7fbdea1e0072b9d3487eb10757468bc02d24df21 fixes: bz#1569198 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
Diffstat (limited to 'xlators/features')
-rw-r--r--xlators/features/bit-rot/src/bitd/bit-rot-scrub.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/xlators/features/bit-rot/src/bitd/bit-rot-scrub.c b/xlators/features/bit-rot/src/bitd/bit-rot-scrub.c
index 0e706c92dff..7012f2f0a4a 100644
--- a/xlators/features/bit-rot/src/bitd/bit-rot-scrub.c
+++ b/xlators/features/bit-rot/src/bitd/bit-rot-scrub.c
@@ -1741,6 +1741,7 @@ br_collect_bad_objects_of_child (xlator_t *this, br_child_t *child,
int32_t j = 0;
int32_t tmp_count = 0;
char *entry = NULL;
+ char tmp[PATH_MAX] = {0, };
ret = dict_get_int32 (child_dict, "count", &count);
if (ret)
@@ -1753,11 +1754,15 @@ br_collect_bad_objects_of_child (xlator_t *this, br_child_t *child,
ret = dict_get_str (child_dict, key, &entry);
if (ret)
continue;
+
+ snprintf (tmp, PATH_MAX, "%s ==> BRICK: %s",
+ entry, child->brick_path);
snprintf (main_key, PATH_MAX, "quarantine-%d",
tmp_count);
- ret = dict_set_dynstr_with_alloc (dict, main_key, entry);
- if (!ret)
- tmp_count++;
+
+ ret = dict_set_dynstr_with_alloc (dict, main_key, tmp);
+ if (!ret)
+ tmp_count++;
}
ret = tmp_count;