diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-12 03:51:55 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-12 03:51:55 +0100 |
commit | c086ae4ed94f9a1d283318e006813268c2dbf9fc (patch) | |
tree | dbabbb09ddafcb818f32af038831419702574917 /drivers/md/md.c | |
parent | Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jb... (diff) | |
parent | md/raid1: perform bad-block tests for WriteMostly devices too. (diff) | |
download | linux-c086ae4ed94f9a1d283318e006813268c2dbf9fc.tar.xz linux-c086ae4ed94f9a1d283318e006813268c2dbf9fc.zip |
Merge tag 'md-3.3-fixes' of git://neil.brown.name/md
Two bugfixes for md.
One is a recently introduced regression that affects an unusual
configuration with a guaranteed BUG_ON. Has been tagged for -stable.
The other is minor missing functionality.
* tag 'md-3.3-fixes' of git://neil.brown.name/md:
md/raid1: perform bad-block tests for WriteMostly devices too.
md: notify the 'degraded' sysfs attribute on failure.
Diffstat (limited to 'drivers/md/md.c')
-rw-r--r-- | drivers/md/md.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c index ca8527fe77eb..da52acb60f52 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -7382,6 +7382,7 @@ static int remove_and_add_spares(struct mddev *mddev) { struct md_rdev *rdev; int spares = 0; + int removed = 0; mddev->curr_resync_completed = 0; @@ -7395,8 +7396,13 @@ static int remove_and_add_spares(struct mddev *mddev) mddev, rdev) == 0) { sysfs_unlink_rdev(mddev, rdev); rdev->raid_disk = -1; + removed++; } } + if (removed) + sysfs_notify(&mddev->kobj, NULL, + "degraded"); + list_for_each_entry(rdev, &mddev->disks, same_set) { if (rdev->raid_disk >= 0 && |