From: NeilBrown <neilb@suse.de>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-raid@vger.kernel.org, linux-kernel@vger.kernel.org,
stable@kernel.org
Subject: [PATCH 001 of 4] md: Fix calculation of ->degraded for multipath and raid10
Date: Fri, 20 Oct 2006 13:25:30 +1000 [thread overview]
Message-ID: <1061020032530.1668@suse.de> (raw)
In-Reply-To: 20061020120612.29297.patches@notabene
Two less-used md personalities have bugs in the calculation of
->degraded (the extent to which the array is degraded).
Signed-off-by: Neil Brown <neilb@suse.de>
### Diffstat output
./drivers/md/multipath.c | 2 +-
./drivers/md/raid10.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff .prev/drivers/md/multipath.c ./drivers/md/multipath.c
--- .prev/drivers/md/multipath.c 2006-10-20 11:41:02.000000000 +1000
+++ ./drivers/md/multipath.c 2006-10-20 12:00:56.000000000 +1000
@@ -501,7 +501,7 @@ static int multipath_run (mddev_t *mddev
mdname(mddev));
goto out_free_conf;
}
- mddev->degraded = conf->raid_disks = conf->working_disks;
+ mddev->degraded = conf->raid_disks - conf->working_disks;
conf->pool = mempool_create_kzalloc_pool(NR_RESERVED_BUFS,
sizeof(struct multipath_bh));
diff .prev/drivers/md/raid10.c ./drivers/md/raid10.c
--- .prev/drivers/md/raid10.c 2006-10-20 11:41:02.000000000 +1000
+++ ./drivers/md/raid10.c 2006-10-20 12:00:56.000000000 +1000
@@ -2079,7 +2079,7 @@ static int run(mddev_t *mddev)
disk = conf->mirrors + i;
if (!disk->rdev ||
- !test_bit(In_sync, &rdev->flags)) {
+ !test_bit(In_sync, &disk->rdev->flags)) {
disk->head_position = 0;
mddev->degraded++;
}
next prev parent reply other threads:[~2006-10-20 3:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-20 3:25 [PATCH 000 of 4] md: Introduction - bugfix patches for md NeilBrown
2006-10-20 3:25 ` NeilBrown [this message]
2006-10-20 3:25 ` [PATCH 002 of 4] md: Add another COMPAT_IOCTL " NeilBrown
2006-10-20 3:25 ` [PATCH 003 of 4] md: Endian annotation for v1 superblock access NeilBrown
2006-10-20 3:25 ` [PATCH 004 of 4] md: Endian annotations for the bitmap superblock 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=1061020032530.1668@suse.de \
--to=neilb@suse.de \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-raid@vger.kernel.org \
--cc=stable@kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).