diff options
author | NeilBrown <neilb@suse.de> | 2011-12-08 00:22:48 -0500 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2011-12-08 00:22:48 -0500 |
commit | 52c64152a935e63d9ff73ce823730c9a23dedbff (patch) | |
tree | 03de10a1899d74b42d00740437140a032686d011 /drivers/md/md.c | |
parent | af8a24347f966ab9fae6b0f127d1fbc9d6932d3a (diff) |
md: bad blocks shouldn't cause a Blocked status on a Faulty device.
Once a device is marked Faulty the badblocks - whether acknowledged or
not - become irrelevant. So they shouldn't cause the device to be
marked as Blocked.
Without this patch, a process might write "-blocked" to clear the
Blocked status, but while that will correctly fail the device, it
won't remove the apparent 'blocked' status.
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/md.c')
-rw-r--r-- | drivers/md/md.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c index f97c3b2f2f89..d730e8f513a7 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c | |||
@@ -2546,7 +2546,8 @@ state_show(struct md_rdev *rdev, char *page) | |||
2546 | sep = ","; | 2546 | sep = ","; |
2547 | } | 2547 | } |
2548 | if (test_bit(Blocked, &rdev->flags) || | 2548 | if (test_bit(Blocked, &rdev->flags) || |
2549 | rdev->badblocks.unacked_exist) { | 2549 | (rdev->badblocks.unacked_exist |
2550 | && !test_bit(Faulty, &rdev->flags))) { | ||
2550 | len += sprintf(page+len, "%sblocked", sep); | 2551 | len += sprintf(page+len, "%sblocked", sep); |
2551 | sep = ","; | 2552 | sep = ","; |
2552 | } | 2553 | } |