From: Ilya Dryomov Date: Mon, 4 Aug 2014 14:04:39 +0000 (+0400) Subject: rbd: rework rbd_request_fn() X-Git-Tag: omap-for-v3.17/fixes-against-rc2~85^2~3 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bc1ecc65a259fa9333dc8bd6a4ba0cf03b7d4bf8;p=pandora-kernel.git rbd: rework rbd_request_fn() 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 Cc: stable@vger.kernel.org # 3.16, needs backporting for 3.15 Signed-off-by: Ilya Dryomov Tested-by: Eric Eastman Tested-by: Greg Wilson Reviewed-by: Alex Elder --- Reading git-diff-tree failed