All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] block: Fix the bio.bi_opf comment
@ 2022-05-11 23:51 Bart Van Assche
  2022-05-12  6:11 ` Christoph Hellwig
  2022-05-12 12:33 ` Jens Axboe
  0 siblings, 2 replies; 3+ messages in thread
From: Bart Van Assche @ 2022-05-11 23:51 UTC (permalink / raw)
  To: Jens Axboe; +Cc: linux-block, Christoph Hellwig, Bart Van Assche, Ming Lei

Commit ef295ecf090d modified the Linux kernel such that the bottom bits
of the bi_opf member contain the operation instead of the topmost bits.
That commit did not update the comment next to bi_opf. Hence this patch.

From commit ef295ecf090d:
-#define bio_op(bio)    ((bio)->bi_opf >> BIO_OP_SHIFT)
+#define bio_op(bio)    ((bio)->bi_opf & REQ_OP_MASK)

Cc: Christoph Hellwig <hch@lst.de>
Cc: Ming Lei <ming.lei@redhat.com>
Fixes: ef295ecf090d ("block: better op and flags encoding")
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
 include/linux/blk_types.h | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/include/linux/blk_types.h b/include/linux/blk_types.h
index c62274466e72..6308c960573d 100644
--- a/include/linux/blk_types.h
+++ b/include/linux/blk_types.h
@@ -246,9 +246,8 @@ typedef unsigned int blk_qc_t;
 struct bio {
 	struct bio		*bi_next;	/* request queue link */
 	struct block_device	*bi_bdev;
-	unsigned int		bi_opf;		/* bottom bits req flags,
-						 * top bits REQ_OP. Use
-						 * accessors.
+	unsigned int		bi_opf;		/* bottom bits REQ_OP, top bits
+						 * req_flags.
 						 */
 	unsigned short		bi_flags;	/* BIO_* below */
 	unsigned short		bi_ioprio;

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] block: Fix the bio.bi_opf comment
  2022-05-11 23:51 [PATCH] block: Fix the bio.bi_opf comment Bart Van Assche
@ 2022-05-12  6:11 ` Christoph Hellwig
  2022-05-12 12:33 ` Jens Axboe
  1 sibling, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2022-05-12  6:11 UTC (permalink / raw)
  To: Bart Van Assche; +Cc: Jens Axboe, linux-block, Christoph Hellwig, Ming Lei

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] block: Fix the bio.bi_opf comment
  2022-05-11 23:51 [PATCH] block: Fix the bio.bi_opf comment Bart Van Assche
  2022-05-12  6:11 ` Christoph Hellwig
@ 2022-05-12 12:33 ` Jens Axboe
  1 sibling, 0 replies; 3+ messages in thread
From: Jens Axboe @ 2022-05-12 12:33 UTC (permalink / raw)
  To: bvanassche; +Cc: Christoph Hellwig, ming.lei, linux-block

On Wed, 11 May 2022 16:51:52 -0700, Bart Van Assche wrote:
> Commit ef295ecf090d modified the Linux kernel such that the bottom bits
> of the bi_opf member contain the operation instead of the topmost bits.
> That commit did not update the comment next to bi_opf. Hence this patch.
> 
> From commit ef295ecf090d:
> -#define bio_op(bio)    ((bio)->bi_opf >> BIO_OP_SHIFT)
> +#define bio_op(bio)    ((bio)->bi_opf & REQ_OP_MASK)
> 
> [...]

Applied, thanks!

[1/1] block: Fix the bio.bi_opf comment
      commit: 5d2ae14276e698c76fa0c8ce870103f343b38263

Best regards,
-- 
Jens Axboe



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-05-12 12:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-11 23:51 [PATCH] block: Fix the bio.bi_opf comment Bart Van Assche
2022-05-12  6:11 ` Christoph Hellwig
2022-05-12 12:33 ` Jens Axboe

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.