Skip to content

Commit

Permalink
block: Fix the bio.bi_opf comment
Browse files Browse the repository at this point in the history
Commit ef295ec 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 ef295ec:
-#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: ef295ec ("block: better op and flags encoding")
Signed-off-by: Bart Van Assche <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
bvanassche authored and axboe committed May 12, 2022
1 parent 5ce7729 commit 5d2ae14
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions include/linux/blk_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5d2ae14

Please sign in to comment.