diff options
author | Damien Le Moal <damien.lemoal@wdc.com> | 2020-11-20 02:55:17 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2020-12-08 01:36:03 +0100 |
commit | 0ec4d913ac69ec86757eec117fc2733018552aa7 (patch) | |
tree | b30b4a1b492605daed56ecb934045cace5cd41d2 /drivers/block/null_blk_main.c | |
parent | null_blk: cleanup discard handling (diff) | |
download | linux-0ec4d913ac69ec86757eec117fc2733018552aa7.tar.xz linux-0ec4d913ac69ec86757eec117fc2733018552aa7.zip |
null_blk: discard zones on reset
When memory backing is enabled, use null_handle_discard() to free the
backing memory used by a zone when the zone is being reset.
Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@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 | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/block/null_blk_main.c b/drivers/block/null_blk_main.c index a223bee24e76..b758b9366630 100644 --- a/drivers/block/null_blk_main.c +++ b/drivers/block/null_blk_main.c @@ -1076,8 +1076,8 @@ static void nullb_fill_pattern(struct nullb *nullb, struct page *page, kunmap_atomic(dst); } -static blk_status_t null_handle_discard(struct nullb_device *dev, - sector_t sector, sector_t nr_sectors) +blk_status_t null_handle_discard(struct nullb_device *dev, + sector_t sector, sector_t nr_sectors) { struct nullb *nullb = dev->nullb; size_t n = nr_sectors << SECTOR_SHIFT; |