Skip to content

Commit faf608e

Browse files
youzhongyangandrewc12
authored andcommitted
linux 6.3 compat: needs REQ_PREFLUSH | REQ_OP_WRITE
Modify bio_set_flush() so if kernel version is >= 4.10, flags REQ_PREFLUSH and REQ_OP_WRITE are set together. Reviewed-by: Tony Hutter <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Youzhong Yang <[email protected]> Closes openzfs#14695
1 parent bc17938 commit faf608e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/os/linux/kernel/linux/blkdev_compat.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ static inline void
426426
bio_set_flush(struct bio *bio)
427427
{
428428
#if defined(HAVE_REQ_PREFLUSH) /* >= 4.10 */
429-
bio_set_op_attrs(bio, 0, REQ_PREFLUSH);
429+
bio_set_op_attrs(bio, 0, REQ_PREFLUSH | REQ_OP_WRITE);
430430
#elif defined(WRITE_FLUSH_FUA) /* >= 2.6.37 and <= 4.9 */
431431
bio_set_op_attrs(bio, 0, WRITE_FLUSH_FUA);
432432
#else

0 commit comments

Comments
 (0)