From: Andrew Burgess <aab@cichlid.com>
To: linux raid mailing list <linux-raid@vger.kernel.org>
Cc: NeilBrown <neilb@suse.de>
Subject: [PATCH] mdadm --detail was incorrect for shrinking reshapes
Date: Mon, 20 Jun 2011 09:06:55 -0700 [thread overview]
Message-ID: <1308586015.10185.11@hogo> (raw)
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
(the "This is pretty boring" context is apparently the universe's
opinion of my first patch!)
mdadm> git diff
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-");
next reply other threads:[~2011-06-20 16:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-20 16:06 Andrew Burgess [this message]
2011-06-23 1:47 ` [PATCH] mdadm --detail was incorrect for shrinking reshapes NeilBrown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1308586015.10185.11@hogo \
--to=aab@cichlid.com \
--cc=linux-raid@vger.kernel.org \
--cc=neilb@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.