[PATCH 1/2] block: add request polling helper
Christoph Hellwig
hch at lst.de
Wed May 31 06:01:14 PDT 2023
> +int blk_mq_poll(struct request_queue *q, blk_qc_t cookie, struct io_comp_batch *iob,
It would be nice to fix the overly long line while you're at it.
> + unsigned int flags)
> +{
> + return blk_hctx_poll(q, blk_qc_to_hctx(q, cookie), iob, flags);
> +}
But looking at the two callers of blk_mq_poll, shouldn't one use
rq->mq_hctx to get the hctx anyway instead of doing repeated
blk_qc_to_hctx in the polling loop? We could then just open code
blk_qc_to_hctx in the remaining one.
The rest looks good to me.
More information about the Linux-nvme
mailing list