]> git.baikalelectronics.ru Git - kernel.git/commit
blk-mq: fix for flush deadlock
authorChristoph Hellwig <hch@lst.de>
Mon, 28 Oct 2013 19:33:58 +0000 (13:33 -0600)
committerJens Axboe <axboe@kernel.dk>
Mon, 28 Oct 2013 19:33:58 +0000 (13:33 -0600)
commita7b1bdc2a661975821feb935e47bcf8b96fc6129
tree2f148dd8e82b287fc7b682cabc5614e3046d8949
parent3f44bf367a19095621c2d39cd362718123780d26
blk-mq: fix for flush deadlock

The flush state machine takes in a struct request, which then is
submitted multiple times to the underling driver.  The old block code
requeses the same request for each of those, so it does not have an
issue with tapping into the request pool.  The new one on the other hand
allocates a new request for each of the actualy steps of the flush
sequence. If have already allocated all of the tags for IO, we will
fail allocating the flush request.

Set aside a reserved request just for flushes.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-core.c
block/blk-flush.c
block/blk-mq.c
include/linux/blk-mq.h