Mimicking blkdev_issue_flush(). Seems like a right thing to do, as they are a bunch of REQ_OP_WRITE. Signed-off-by: Tom Yan <tom.ty89@xxxxxxxxx> --- block/blk-lib.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/block/blk-lib.c b/block/blk-lib.c index 354dcab760c7..5579fdea893d 100644 --- a/block/blk-lib.c +++ b/block/blk-lib.c @@ -422,6 +422,8 @@ int blkdev_issue_zeroout(struct block_device *bdev, sector_t sector, } else if (!(flags & BLKDEV_ZERO_NOFALLBACK)) { ret = __blkdev_issue_zero_pages(bdev, sector, nr_sects, gfp_mask, &bio); + if (bio) + bio->bi_opf |= REQ_PREFLUSH; } else { /* No zeroing offload support */ ret = -EOPNOTSUPP; -- 2.29.2