]> git.baikalelectronics.ru Git - kernel.git/commit
rbd: rework rbd_request_fn()
authorIlya Dryomov <ilya.dryomov@inktank.com>
Mon, 4 Aug 2014 14:04:39 +0000 (18:04 +0400)
committerIlya Dryomov <ilya.dryomov@inktank.com>
Thu, 7 Aug 2014 10:56:20 +0000 (14:56 +0400)
commit2fc56f0423ae6ba825663b24c78a3e2f34f3ce5a
tree270e618c8c98afb1bb591415a343fab58060f36c
parente14358e8c1450483caa4c539de1ac7f4ecccb364
rbd: rework rbd_request_fn()

While it was never a good idea to sleep in request_fn(), commit
7b0268c2d6f8 ("locking/mutexes: Add extra reschedule point") made it
a *bad* idea.  mutex_lock() since 3.15 may reschedule *before* putting
task on the mutex wait queue, which for tasks in !TASK_RUNNING state
means block forever.  request_fn() may be called with !TASK_RUNNING on
the way to schedule() in io_schedule().

Offload request handling to a workqueue, one per rbd device, to avoid
calling blocking primitives from rbd_request_fn().

Fixes: http://tracker.ceph.com/issues/8818
Cc: stable@vger.kernel.org # 3.16, needs backporting for 3.15
Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
Tested-by: Eric Eastman <eric0e@aol.com>
Tested-by: Greg Wilson <greg.wilson@keepertech.com>
Reviewed-by: Alex Elder <elder@linaro.org>
drivers/block/rbd.c