block: Fix REQ_OP_ZONE_RESET_ALL handling
authorDamien Le Moal <damien.lemoal@wdc.com>
Wed, 10 Mar 2021 09:09:19 +0000 (18:09 +0900)
committerJens Axboe <axboe@kernel.dk>
Wed, 10 Mar 2021 14:45:47 +0000 (07:45 -0700)
Similarly to a single zone reset operation (REQ_OP_ZONE_RESET), execute
REQ_OP_ZONE_RESET_ALL operations with REQ_SYNC set.

Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-zoned.c

index 833978c..8b9f3fc 100644 (file)
@@ -240,7 +240,7 @@ int blkdev_zone_mgmt(struct block_device *bdev, enum req_opf op,
                 */
                if (op == REQ_OP_ZONE_RESET &&
                    blkdev_allow_reset_all_zones(bdev, sector, nr_sectors)) {
-                       bio->bi_opf = REQ_OP_ZONE_RESET_ALL;
+                       bio->bi_opf = REQ_OP_ZONE_RESET_ALL | REQ_SYNC;
                        break;
                }