On Tue, Aug 05, 2014 at 11:38:44AM +0400, Ilya Dryomov wrote: > 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(). Btw, for the future you might want to consider converting rbd to use the blk-mq infrastructure, which calls the I/O submission function from user context and will allow you to sleep. -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html