Message ID | 20210427161619.1294399-16-hch@lst.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [01/15] direct-io: remove blk_poll support | expand |
On Tue, Apr 27, 2021 at 06:16:19PM +0200, Christoph Hellwig wrote: > Set the poll queue flags to enable polling, given that the multipath > node just dispatches the bios to a lower queue. > > Signed-off-by: Christoph Hellwig <hch@lst.de> > --- > drivers/nvme/host/multipath.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/nvme/host/multipath.c b/drivers/nvme/host/multipath.c > index 1d17b2387884..0fa38f648ae7 100644 > --- a/drivers/nvme/host/multipath.c > +++ b/drivers/nvme/host/multipath.c > @@ -443,6 +443,8 @@ int nvme_mpath_alloc_disk(struct nvme_ctrl *ctrl, struct nvme_ns_head *head) > goto out; > blk_queue_flag_set(QUEUE_FLAG_NONROT, q); > blk_queue_flag_set(QUEUE_FLAG_NOWAIT, q); > + blk_queue_flag_set(QUEUE_FLAG_POLL_CAPABLE, q); > + blk_queue_flag_set(QUEUE_FLAG_POLL, q); After POLL_CAPABLE is enabled on nvme mpath, POLL can be disabled via queue_poll_store(). However, blk_mq_freeze_queue() just blocks and drain bio submission, then pending POLL bio can't be polled any more because QUEUE_FLAG_POLL is checked in bio_poll(). Thanks, Ming
diff --git a/drivers/nvme/host/multipath.c b/drivers/nvme/host/multipath.c index 1d17b2387884..0fa38f648ae7 100644 --- a/drivers/nvme/host/multipath.c +++ b/drivers/nvme/host/multipath.c @@ -443,6 +443,8 @@ int nvme_mpath_alloc_disk(struct nvme_ctrl *ctrl, struct nvme_ns_head *head) goto out; blk_queue_flag_set(QUEUE_FLAG_NONROT, q); blk_queue_flag_set(QUEUE_FLAG_NOWAIT, q); + blk_queue_flag_set(QUEUE_FLAG_POLL_CAPABLE, q); + blk_queue_flag_set(QUEUE_FLAG_POLL, q); /* set to a default value for 512 until disk is validated */ blk_queue_logical_block_size(q, 512);
Set the poll queue flags to enable polling, given that the multipath node just dispatches the bios to a lower queue. Signed-off-by: Christoph Hellwig <hch@lst.de> --- drivers/nvme/host/multipath.c | 2 ++ 1 file changed, 2 insertions(+)