projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9105ce5
)
dm: dm-zoned: guard blkdev_zone_mgmt with noio scope
author
Johannes Thumshirn
<johannes.thumshirn@wdc.com>
Mon, 29 Jan 2024 07:52:17 +0000
(23:52 -0800)
committer
Jens Axboe
<axboe@kernel.dk>
Mon, 12 Feb 2024 15:41:16 +0000
(08:41 -0700)
Guard the calls to blkdev_zone_mgmt() with a memalloc_noio scope.
This helps us getting rid of the GFP_NOIO argument to blkdev_zone_mgmt();
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: Mike Snitzer <snitzer@kernel.org>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Link:
https://lore.kernel.org/r/20240128-zonefs_nofs-v3-2-ae3b7c8def61@wdc.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/md/dm-zoned-metadata.c
patch
|
blob
|
history
diff --git
a/drivers/md/dm-zoned-metadata.c
b/drivers/md/dm-zoned-metadata.c
index fdfe30f7b6973d76fac4a50f6b41f6b2f4102168..165996cc966c4526a1bd8a9cac698966feef187b 100644
(file)
--- a/
drivers/md/dm-zoned-metadata.c
+++ b/
drivers/md/dm-zoned-metadata.c
@@
-1655,10
+1655,13
@@
static int dmz_reset_zone(struct dmz_metadata *zmd, struct dm_zone *zone)
if (!dmz_is_empty(zone) || dmz_seq_write_err(zone)) {
struct dmz_dev *dev = zone->dev;
+ unsigned int noio_flag;
+ noio_flag = memalloc_noio_save();
ret = blkdev_zone_mgmt(dev->bdev, REQ_OP_ZONE_RESET,
dmz_start_sect(zmd, zone),
- zmd->zone_nr_sectors, GFP_NOIO);
+ zmd->zone_nr_sectors, GFP_KERNEL);
+ memalloc_noio_restore(noio_flag);
if (ret) {
dmz_dev_err(dev, "Reset zone %u failed %d",
zone->id, ret);