diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-12 06:51:55 +0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-12 06:51:55 +0400 |
commit | c086ae4ed94f9a1d283318e006813268c2dbf9fc (patch) | |
tree | dbabbb09ddafcb818f32af038831419702574917 /drivers/md/md.c | |
parent | 7b67e751479d50b7f84d1a3cc5216eed5e534b66 (diff) | |
parent | 307729c8bc5b5a41361af8af95906eee7552acb1 (diff) | |
download | linux-c086ae4ed94f9a1d283318e006813268c2dbf9fc.tar.xz |
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 && |