summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Burgess <aab@cichlid.com>2011-06-23 11:48:03 +1000
committerNeilBrown <neilb@suse.de>2011-06-23 11:48:03 +1000
commitc281a8041977cdd4bd7eaed4e1fbead50b5640e6 (patch)
tree2a5d2e1474a34b45fcf3da43bf2f87a559a8bf62
parentc0672664bffbca34f2c38ad25e4321d70e6845c1 (diff)
downloadmdadm-c281a8041977cdd4bd7eaed4e1fbead50b5640e6.tar.gz
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>
-rw-r--r--Detail.c5
1 files changed, 1 insertions, 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-");