Detail: show consistency policy
Show the currently enabled consistency policy in the output from --detail. Add 3 spaces to all existing items in Detail output to align with "Consistency Policy : ". Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com> Signed-off-by: Jes Sorensen <Jes.Sorensen@gmail.com>
This commit is contained in:
parent
5308f11727
commit
65884368cd
28
Detail.c
28
Detail.c
|
@ -402,7 +402,8 @@ int Detail(char *dev, struct context *c)
|
|||
printf("%s:\n", dev);
|
||||
|
||||
if (container)
|
||||
printf(" Container : %s, member %s\n", container, member);
|
||||
printf(" Container : %s, member %s\n", container,
|
||||
member);
|
||||
else {
|
||||
if (sra && sra->array.major_version < 0)
|
||||
printf(" Version : %s\n", sra->text_version);
|
||||
|
@ -516,16 +517,31 @@ int Detail(char *dev, struct context *c)
|
|||
array.chunk_size/1024);
|
||||
break;
|
||||
case -1:
|
||||
printf(" Rounding : %dK\n\n", array.chunk_size/1024);
|
||||
printf(" Rounding : %dK\n\n",
|
||||
array.chunk_size/1024);
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
if (array.raid_disks) {
|
||||
struct mdinfo *mdi = sysfs_read(fd, NULL,
|
||||
GET_CONSISTENCY_POLICY);
|
||||
if (mdi) {
|
||||
char *policy = map_num(consistency_policies,
|
||||
mdi->consistency_policy);
|
||||
sysfs_free(mdi);
|
||||
if (policy)
|
||||
printf("Consistency Policy : %s\n\n",
|
||||
policy);
|
||||
}
|
||||
}
|
||||
|
||||
if (e && e->percent >= 0) {
|
||||
static char *sync_action[] = {
|
||||
"Rebuild", "Resync",
|
||||
"Reshape", "Check"};
|
||||
printf(" %7s Status : %d%% complete\n", sync_action[e->resync], e->percent);
|
||||
printf(" %7s Status : %d%% complete\n",
|
||||
sync_action[e->resync], e->percent);
|
||||
is_rebuilding = 1;
|
||||
}
|
||||
free_mdstat(ms);
|
||||
|
@ -533,7 +549,8 @@ int Detail(char *dev, struct context *c)
|
|||
if ((st && st->sb) && (info && info->reshape_active)) {
|
||||
#if 0
|
||||
This is pretty boring
|
||||
printf(" Reshape pos'n : %llu%s\n", (unsigned long long) info->reshape_progress<<9,
|
||||
printf(" Reshape pos'n : %llu%s\n",
|
||||
(unsigned long long) info->reshape_progress<<9,
|
||||
human_size((unsigned long long)info->reshape_progress<<9));
|
||||
#endif
|
||||
if (info->delta_disks != 0)
|
||||
|
@ -565,7 +582,8 @@ This is pretty boring
|
|||
}
|
||||
}
|
||||
if (info->new_chunk != array.chunk_size)
|
||||
printf(" New Chunksize : %dK\n", info->new_chunk/1024);
|
||||
printf(" New Chunksize : %dK\n",
|
||||
info->new_chunk/1024);
|
||||
printf("\n");
|
||||
} else if (e && e->percent >= 0)
|
||||
printf("\n");
|
||||
|
|
3
super1.c
3
super1.c
|
@ -792,7 +792,8 @@ static void detail_super1(struct supertype *st, char *homehost)
|
|||
if ((i&3)==0 && i != 0) printf(":");
|
||||
printf("%02x", sb->set_uuid[i]);
|
||||
}
|
||||
printf("\n Events : %llu\n\n", (unsigned long long)__le64_to_cpu(sb->events));
|
||||
printf("\n Events : %llu\n\n",
|
||||
(unsigned long long)__le64_to_cpu(sb->events));
|
||||
}
|
||||
|
||||
static void brief_detail_super1(struct supertype *st)
|
||||
|
|
Loading…
Reference in New Issue