summaryrefslogtreecommitdiffstats
path: root/drivers/nvme/host
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2017-11-02 21:28:55 +0300
committerJens Axboe <axboe@kernel.dk>2017-11-10 19:53:25 -0700
commit6e78f21ae4488cdab4318f781de05c8ffc4de951 (patch)
tree2be60c2b64356b2bfc25f39c3efafb2ee77e375f /drivers/nvme/host
parent30e5e929c7bfaf87a65f926715773ef14339b79f (diff)
downloadblackbird-op-linux-6e78f21ae4488cdab4318f781de05c8ffc4de951.tar.gz
blackbird-op-linux-6e78f21ae4488cdab4318f781de05c8ffc4de951.zip
nvme: set the chunk size before freezing the queue
We don't need a frozen queue to update the chunk_size, which just is a hint, and moving it a little earlier will allow for some better code reuse with the multipath code. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Keith Busch <keith.busch@intel.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/nvme/host')
-rw-r--r--drivers/nvme/host/core.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 551ec5df6a97..a4be843334ba 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -1184,12 +1184,13 @@ static void __nvme_revalidate_disk(struct gendisk *disk, struct nvme_id_ns *id)
if (ctrl->nr_streams && ns->sws && ns->sgs)
stream_alignment = ns->sws * ns->sgs;
+ if (ns->noiob)
+ nvme_set_chunk_size(ns);
+
blk_mq_freeze_queue(disk->queue);
blk_integrity_unregister(disk);
blk_queue_logical_block_size(ns->queue, bs);
- if (ns->noiob)
- nvme_set_chunk_size(ns);
if (ns->ms && !ns->ext &&
(ctrl->ops->flags & NVME_F_METADATA_SUPPORTED))
nvme_init_integrity(disk, ns->ms, ns->pi_type);
OpenPOWER on IntegriCloud