]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
mdadm --detail was incorrect for shrinking reshapes
authorAndrew Burgess <aab@cichlid.com>
Thu, 23 Jun 2011 01:48:03 +0000 (11:48 +1000)
committerNeilBrown <neilb@suse.de>
Thu, 23 Jun 2011 01:48:03 +0000 (11:48 +1000)
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>
Detail.c

index 375189d0b6332884320018939c54f467b6d1c8ea..40806cf0f973a4094f9e14d385063d7b3cd5fd75 100644 (file)
--- 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-");