diff options
author | Christoph Hellwig <hch@lst.de> | 2015-04-30 17:10:36 +0300 |
---|---|---|
committer | Mike Snitzer <snitzer@redhat.com> | 2015-04-30 17:25:21 +0300 |
commit | 3e6180f0c82b3790a9ec6d13d67aae359bf1ce84 (patch) | |
tree | c4abf15202b194c0762f97af185e4b40387413ac /drivers/md/dm.c | |
parent | b787f68c36d49bb1d9236f403813641efa74a031 (diff) | |
download | linux-3e6180f0c82b3790a9ec6d13d67aae359bf1ce84.tar.xz |
dm: only initialize the request_queue once
Commit bfebd1cdb4 ("dm: add full blk-mq support to request-based DM")
didn't properly account for the need to short-circuit re-initializing
DM's blk-mq request_queue if it was already initialized.
Otherwise, reloading a blk-mq request-based DM table (either manually
or via multipathd) resulted in errors, see:
https://www.redhat.com/archives/dm-devel/2015-April/msg00132.html
Fix is to only initialize the request_queue on the initial table load
(when the mapped_device type is assigned).
This is better than having dm_init_request_based_blk_mq_queue() return
early if the queue was already initialized because it elevates the
constraint to a more meaningful location in DM core. As such the
pre-existing early return in dm_init_request_based_queue() can now be
removed.
Fixes: bfebd1cdb4 ("dm: add full blk-mq support to request-based DM")
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/md/dm.c')
-rw-r--r-- | drivers/md/dm.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/md/dm.c b/drivers/md/dm.c index f8c7ca3e8947..923496ba72a0 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c @@ -2662,9 +2662,6 @@ static int dm_init_request_based_queue(struct mapped_device *md) { struct request_queue *q = NULL; - if (md->queue->elevator) - return 0; - /* Fully initialize the queue */ q = blk_init_allocated_queue(md->queue, dm_request_fn, NULL); if (!q) |