From: NeilBrown <neilb@suse.de>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-raid@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 003 of 4] md: Fix up maintenance of ->degraded in multipath.
Date: Mon, 23 Oct 2006 17:08:01 +1000 [thread overview]
Message-ID: <1061023070801.29256@suse.de> (raw)
In-Reply-To: 20061023170347.29132.patches@notabene
A recent fix which made sure ->degraded was initialised properly
exposed a second bug - ->degraded wasn't been updated when drives
failed or were hot-added.
Signed-off-by: Neil Brown <neilb@suse.de>
### Diffstat output
./drivers/md/multipath.c | 2 ++
1 file changed, 2 insertions(+)
diff .prev/drivers/md/multipath.c ./drivers/md/multipath.c
--- .prev/drivers/md/multipath.c 2006-10-23 16:34:54.000000000 +1000
+++ ./drivers/md/multipath.c 2006-10-23 16:35:38.000000000 +1000
@@ -277,6 +277,7 @@ static void multipath_error (mddev_t *md
set_bit(Faulty, &rdev->flags);
set_bit(MD_CHANGE_DEVS, &mddev->flags);
conf->working_disks--;
+ mddev->degraded++;
printk(KERN_ALERT "multipath: IO failure on %s,"
" disabling IO path. \n Operation continuing"
" on %d IO paths.\n",
@@ -336,6 +337,7 @@ static int multipath_add_disk(mddev_t *m
blk_queue_max_sectors(mddev->queue, PAGE_SIZE>>9);
conf->working_disks++;
+ mddev->degraded--;
rdev->raid_disk = path;
set_bit(In_sync, &rdev->flags);
rcu_assign_pointer(p->rdev, rdev);
next prev parent reply other threads:[~2006-10-23 7:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-23 7:07 [PATCH 000 of 4] md: assorted bugfixes - one serious NeilBrown
2006-10-23 7:07 ` [PATCH 001 of 4] md: Fix bug where spares don't always get rebuilt properly when they become live NeilBrown
2006-10-23 7:07 ` [PATCH 002 of 4] md: Simplify checking of available size when resizing an array NeilBrown
2006-10-23 7:08 ` NeilBrown [this message]
2006-10-23 7:08 ` [PATCH 004 of 4] md: Fix printk format warnings, seen on powerpc64: 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=1061023070801.29256@suse.de \
--to=neilb@suse.de \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-raid@vger.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).