diff options
author | NeilBrown <neilb@suse.de> | 2011-12-08 00:26:08 -0500 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2011-12-08 00:26:08 -0500 |
commit | 8bd2f0a05b361e07d48bb34398593f5f523946b3 (patch) | |
tree | a87860b4b8821b40eb9e6bb5333f71dfa8c3fb39 /drivers/md/md.c | |
parent | 52c64152a935e63d9ff73ce823730c9a23dedbff (diff) |
md: ensure new badblocks are handled promptly.
When we mark blocks as bad we need them to be acknowledged by the
metadata handler promptly.
For an in-kernel metadata handler that was already being done. But
for an external metadata handler we need to alert it of the change by
sending a notification through the sysfs file. This adds that
notification.
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/md.c')
-rw-r--r-- | drivers/md/md.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c index d730e8f513a7..ee981737edfc 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c | |||
@@ -7858,6 +7858,7 @@ int rdev_set_badblocks(struct md_rdev *rdev, sector_t s, int sectors, | |||
7858 | s + rdev->data_offset, sectors, acknowledged); | 7858 | s + rdev->data_offset, sectors, acknowledged); |
7859 | if (rv) { | 7859 | if (rv) { |
7860 | /* Make sure they get written out promptly */ | 7860 | /* Make sure they get written out promptly */ |
7861 | sysfs_notify_dirent_safe(rdev->sysfs_state); | ||
7861 | set_bit(MD_CHANGE_CLEAN, &rdev->mddev->flags); | 7862 | set_bit(MD_CHANGE_CLEAN, &rdev->mddev->flags); |
7862 | md_wakeup_thread(rdev->mddev->thread); | 7863 | md_wakeup_thread(rdev->mddev->thread); |
7863 | } | 7864 | } |