Skip to content
Commit ac05f256 authored by NeilBrown's avatar NeilBrown
Browse files

md: don't start resync thread directly from md thread.



The main 'md' thread is needed for processing writes, so if it blocks
write requests could be delayed.

Starting a new thread requires some GFP_KERNEL allocations and so can
wait for writes to complete.  This can deadlock.

So instead, ask a workqueue to start the sync thread.
There is no particular rush for this to happen, so any work queue
will do.

MD_RECOVERY_RUNNING is used to ensure only one thread is started.

Reported-by: default avatarBillStuff <billstuff2001@sbcglobal.net>
Signed-off-by: default avatarNeilBrown <neilb@suse.de>
parent 8b1afc3d
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment