Skip to contentSkip to conversation

block: Fix the bio.bi_opf comment

PATCH Applied Bart Van Assche 3 participants 3 messages May 11, 2022 – May 12, 2022 Block layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 block: Fix the bio.bi_opf comment

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 <[email protected]>
Cc Ming Lei <[email protected]>
Fixes ef295ecf090d ("block: better op and flags encoding")
---
 include/linux/blk_types.h | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
include/linux/blk_types.h +2 -3
index c62274466e72..6308c960573d 100644
@@ -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;
maintainer Applied
#2 lore raw
In reply to Bart Van Assche

Review

Quoted 9 lines · Bart Van Assche

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:

(quoted diff) +1 -1
-#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,

Signature · 1 line
Jens Axboe