diff options
author | Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com> | 2019-08-01 10:26:38 -0700 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2019-08-04 21:41:29 -0600 |
commit | a61dbfb12bc6dadce91600fe3409a3675751c716 (patch) | |
tree | 027c2b88b7d6518c35b03bc6b2ca6a07839d4f51 /drivers/block/null_blk_main.c | |
parent | d81e9d494354064cd0a99d08401097dd16f335c0 (diff) | |
download | linux-a61dbfb12bc6dadce91600fe3409a3675751c716.tar.gz linux-a61dbfb12bc6dadce91600fe3409a3675751c716.tar.bz2 linux-a61dbfb12bc6dadce91600fe3409a3675751c716.zip |
null_blk: implement REQ_OP_ZONE_RESET_ALL
This patch implements newly introduced zone reset all operation for
null_blk driver.
Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/block/null_blk_main.c')
-rw-r--r-- | drivers/block/null_blk_main.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/block/null_blk_main.c b/drivers/block/null_blk_main.c index 99328ded60d1..99c56d72ff78 100644 --- a/drivers/block/null_blk_main.c +++ b/drivers/block/null_blk_main.c @@ -1214,6 +1214,8 @@ static blk_status_t null_handle_cmd(struct nullb_cmd *cmd) null_zone_write(cmd, sector, nr_sectors); else if (op == REQ_OP_ZONE_RESET) null_zone_reset(cmd, sector); + else if (op == REQ_OP_ZONE_RESET_ALL) + null_zone_reset(cmd, 0); } out: /* Complete IO by inline, softirq or timer */ @@ -1688,6 +1690,7 @@ static int null_add_dev(struct nullb_device *dev) blk_queue_chunk_sectors(nullb->q, dev->zone_size_sects); nullb->q->limits.zoned = BLK_ZONED_HM; + blk_queue_flag_set(QUEUE_FLAG_ZONE_RESETALL, nullb->q); } nullb->q->queuedata = nullb; |