mdadm --detail was incorrect for shrinking reshapes

Since info->delta_disks is signed it doesn't need to be special-cased.

This allowed my 9->8 reshape to display correctly instead of as 8->7

Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
Andrew Burgess 2011-06-23 11:48:03 +10:00 committed by NeilBrown
parent c0672664bf
commit c281a80419
1 changed files with 1 additions and 4 deletions

View File

@ -430,12 +430,9 @@ This is pretty boring
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)
if (info->delta_disks != 0)
printf(" Delta Devices : %d, (%d->%d)\n",
info->delta_disks, array.raid_disks - info->delta_disks, array.raid_disks);
if (info->delta_disks < 0)
printf(" Delta Devices : %d, (%d->%d)\n",
info->delta_disks, array.raid_disks, array.raid_disks + info->delta_disks);
if (info->new_level != array.level) {
char *c = map_num(pers, info->new_level);
printf(" New Level : %s\n", c?c:"-unknown-");