aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-bufio.h
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2013-11-14 15:16:17 +1100
committerNeilBrown <neilb@suse.de>2013-11-19 15:19:17 +1100
commit30b8feb730f9b9b3c5de02580897da03f59b6b16 (patch)
tree7e902a3be606c7f46b16c62b0621dc58580fbbd9 /drivers/md/dm-bufio.h
parentmd: use MD_RECOVERY_INTR instead of kthread_should_stop in resync thread. (diff)
downloadlinux-dev-30b8feb730f9b9b3c5de02580897da03f59b6b16.tar.xz
linux-dev-30b8feb730f9b9b3c5de02580897da03f59b6b16.zip
md/raid5: avoid deadlock when raid5 array has unack badblocks during md_stop_writes.
When raid5 recovery hits a fresh badblock, this badblock will flagged as unack badblock until md_update_sb() is called. But md_stop will take reconfig lock which means raid5d can't call md_update_sb() in md_check_recovery(), the badblock will always be unack, so raid5d thread enters an infinite loop and md_stop_write() can never stop sync_thread. This causes deadlock. To solve this, when STOP_ARRAY ioctl is issued and sync_thread is running, we need set md->recovery FROZEN and INTR flags and wait for sync_thread to stop before we (re)take reconfig lock. This requires that raid5 reshape_request notices MD_RECOVERY_INTR (which it probably should have noticed anyway) and stops waiting for a metadata update in that case. Reported-by: Jianpeng Ma <majianpeng@gmail.com> Reported-by: Bian Yu <bianyu@kedacom.com> Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/dm-bufio.h')
0 files changed, 0 insertions, 0 deletions