aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/md.c
diff options
context:
space:
mode:
authorTomasz Majchrzak <tomasz.majchrzak@intel.com>2016-10-25 17:07:08 +0200
committerShaohua Li <shli@fb.com>2016-11-07 15:08:21 -0800
commit91a6c4aded58cb49f99320480bad62493c288761 (patch)
tree6d6fad0697361c7ef06c8e74b39f9cae10277eda /drivers/md/md.c
parentmd: don't fail an array if there are unacknowledged bad blocks (diff)
downloadlinux-dev-91a6c4aded58cb49f99320480bad62493c288761.tar.xz
linux-dev-91a6c4aded58cb49f99320480bad62493c288761.zip
md: wake up personality thread after array state update
When raid1/raid10 array fails to write to one of the drives, the request is added to bio_end_io_list and finished by personality thread. The thread doesn't handle it as long as MD_CHANGE_PENDING flag is set. In case of external metadata this flag is cleared, however the thread is not woken up. It causes request to be blocked for few seconds (until another action on the array wakes up the thread) or to get stuck indefinitely. Wake up personality thread once MD_CHANGE_PENDING has been cleared. Moving 'restart_array' call after the flag is cleared it not a solution because in read-write mode the call doesn't wake up the thread. Signed-off-by: Tomasz Majchrzak <tomasz.majchrzak@intel.com> Signed-off-by: Shaohua Li <shli@fb.com>
Diffstat (limited to 'drivers/md/md.c')
-rw-r--r--drivers/md/md.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 7f56d67471f6..94f882af94aa 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -3922,6 +3922,7 @@ array_state_store(struct mddev *mddev, const char *buf, size_t len)
if (st == active) {
restart_array(mddev);
clear_bit(MD_CHANGE_PENDING, &mddev->flags);
+ md_wakeup_thread(mddev->thread);
wake_up(&mddev->sb_wait);
err = 0;
} else /* st == clean */ {