]> git.hungrycats.org Git - linux/commit
rbd: rework rbd_request_fn()
authorIlya Dryomov <ilya.dryomov@inktank.com>
Mon, 4 Aug 2014 14:04:39 +0000 (18:04 +0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Sep 2014 16:22:15 +0000 (09:22 -0700)
commit0fe6ae39a66c475e5ccb1511155e32a4bd704574
treee44d18477e2da0cbc40323f2866c2973bca8427a
parent3fecf9a20b3c7dba412339d56d6ec3f2eac12345
rbd: rework rbd_request_fn()

commit bc1ecc65a259fa9333dc8bd6a4ba0cf03b7d4bf8 upstream.

While it was never a good idea to sleep in request_fn(), commit
34c6bc2c919a ("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
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/block/rbd.c