blk-mq: rework flush sequencing logic
authorChristoph Hellwig <hch@infradead.org>
Thu, 26 Jun 2014 04:41:43 +0000 (22:41 -0600)
committerJens Axboe <axboe@fb.com>
Mon, 30 Mar 2015 18:54:41 +0000 (12:54 -0600)
commita8ba542c02284403a7158bd9babea5d62c09944a
tree510eb8ac30ca63b9b21f740b12d12c3f87269024
parentae4e9dcedb442b8330c4fbbd740ca5ca41bc8b16
blk-mq: rework flush sequencing logic

Witch to using a preallocated flush_rq for blk-mq similar to what's done
with the old request path.  This allows us to set up the request properly
with a tag from the actually allowed range and ->rq_disk as needed by
some drivers.  To make life easier we also switch to dynamic allocation
of ->flush_rq for the old path.

This effectively reverts most of

    "blk-mq: fix for flush deadlock"

and

    "blk-mq: Don't reserve a tag for flush request"

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
block/blk-core.c
block/blk-flush.c
block/blk-mq.c
block/blk-mq.h
block/blk-sysfs.c
include/linux/blk-mq.h
include/linux/blkdev.h