From c281a8041977cdd4bd7eaed4e1fbead50b5640e6 Mon Sep 17 00:00:00 2001 From: Andrew Burgess Date: Thu, 23 Jun 2011 11:48:03 +1000 Subject: 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 --- Detail.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Detail.c b/Detail.c index 375189d..40806cf 100644 --- a/Detail.c +++ b/Detail.c @@ -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-"); -- cgit v1.2.1