summaryrefslogtreecommitdiff
path: root/drivers/pinctrl
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2012-07-03 07:45:31 (GMT)
committerNeilBrown <neilb@suse.de>2012-07-03 07:45:31 (GMT)
commitb357f04a67c2aeee828b240863cd3f21d6cb3179 (patch)
treeb8495f2c04fc40d5a2885fe4f7ff8d627cd55031 /drivers/pinctrl
parentf456309106e9657645c81bce1a6bb3230393564e (diff)
downloadlinux-fsl-qoriq-b357f04a67c2aeee828b240863cd3f21d6cb3179.tar.xz
md: fix up plugging (again).
The value returned by "mddev_check_plug" is only valid until the next 'schedule' as that will unplug things. This could happen at any call to mempool_alloc. So just calling mddev_check_plug at the start doesn't really make sense. So call it just before, or just after, queuing things for the thread. As the action that happens at unplug is to wake the thread, this makes lots of sense. If we cannot add a plug (which requires a small GFP_ATOMIC alloc) we wake thread immediately. RAID5 is a bit different. Requests are queued for the thread and the thread is woken by release_stripe. So we don't need to wake the thread on failure. However the thread doesn't perform certain actions when there is any active plug, so it is important to install a plug before waking the thread. So for RAID5 we install the plug *before* queuing the request and waking the thread. Without this patch it is possible for raid1 or raid10 to queue a request without then waking the thread, resulting in the array locking up. Also change raid10 to only flush_pending_write when there are not active plugs, just like raid1. This patch is suitable for 3.0 or later. I plan to submit it to -stable, but I'll like to let it spend a few weeks in mainline first to be sure it is completely safe. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/pinctrl')
0 files changed, 0 insertions, 0 deletions