From: Ming Lei <ming.lei@redhat.com>
To: Christoph Hellwig <hch@lst.de>
Cc: Bart Van Assche <bvanassche@acm.org>,
Jens Axboe <axboe@kernel.dk>,
linux-block@vger.kernel.org
Subject: Re: [PATCH 3/3] block: Specify the operation type when calling blk_mq_map_queue()
Date: Wed, 15 Jun 2022 14:24:20 +0800 [thread overview]
Message-ID: <Yql7FCHTZbVIKWQV@T590> (raw)
In-Reply-To: <20220615060851.GE22115@lst.de>
On Wed, Jun 15, 2022 at 08:08:51AM +0200, Christoph Hellwig wrote:
> On Wed, Jun 15, 2022 at 08:31:21AM +0800, Ming Lei wrote:
> > > - struct blk_mq_hw_ctx *hctx = blk_mq_map_queue(q, 0, ctx);
> > > + struct blk_mq_hw_ctx *hctx = blk_mq_map_queue(q, REQ_OP_WRITE, ctx);
> >
> > The change itself doesn't make a difference, since both results in choosing
> > HCTX_TYPE_DEFAULT, but passing REQ_OP_WRITE is a bit misleading.
>
> Well, the argument is an operationm so we better pass in a correct
> operation (at some point we should look into a __bitwise annotation
> or similar to make it clean). And as 0 is REQ_OP_READ, we will end
> up with the HCTX_TYPE_READ hctx IFF someone configures read queues
> and uses an sq only schedule. Which is a completely stupid but
> possible setup.
>
OK, looks here the hctx can be retrieved ctx->hctxs[HCTX_TYPE_DEFAULT]
directly.
Thanks,
Ming
next prev parent reply other threads:[~2022-06-15 6:24 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-14 17:57 [PATCH 0/3] Three small block layer patches Bart Van Assche
2022-06-14 17:57 ` [PATCH 1/3] blk-iocost: Simplify ioc_rqos_done() Bart Van Assche
2022-06-14 18:26 ` Tejun Heo
2022-06-15 5:58 ` Christoph Hellwig
2022-06-14 17:57 ` [PATCH 2/3] block: Rename a blk_mq_map_queue() argument Bart Van Assche
2022-06-15 5:58 ` Christoph Hellwig
2022-06-14 17:57 ` [PATCH 3/3] block: Specify the operation type when calling blk_mq_map_queue() Bart Van Assche
2022-06-14 19:31 ` Jens Axboe
2022-06-15 0:31 ` Ming Lei
2022-06-15 6:08 ` Christoph Hellwig
2022-06-15 6:24 ` Ming Lei [this message]
2022-06-17 18:25 ` Bart Van Assche
2022-06-20 7:29 ` Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Yql7FCHTZbVIKWQV@T590 \
--to=ming.lei@redhat.com \
--cc=axboe@kernel.dk \
--cc=bvanassche@acm.org \
--cc=hch@lst.de \
--cc=linux-block@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.