Only GFP_KERNEL and GFP_NOIO are used with blkdev_report_zones(). In preparation of using vmalloc() for large report buffer and zone array allocations used by this function, remove its "gfp_t gfp_mask" argument and rely on the caller context to use memalloc_noio_save/restore() where necessary (block layer zone revalidation and dm-zoned I/O error path).
Showing the changes to include/linux (2 of 12 files). Show all
Unified · Split
| @@ -347,7 +347,7 @@ struct queue_limits { · 346 unmodified lines | ||
| 347 | 347 | extern unsigned int blkdev_nr_zones(struct block_device *bdev); |
| 348 | 348 | extern int blkdev_report_zones(struct block_device *bdev, |
| 349 | 349 | sector_t sector, struct blk_zone *zones, |
| 350 | − unsigned int *nr_zones, gfp_t gfp_mask); | |
| 350 | + unsigned int *nr_zones); | |
| 351 | 351 | extern int blkdev_reset_zones(struct block_device *bdev, sector_t sectors, |
| 352 | 352 | sector_t nr_sectors, gfp_t gfp_mask); |
| 353 | 353 | extern int blk_revalidate_disk_zones(struct gendisk *disk); |
| @@ -1673,8 +1673,7 @@ struct block_device_operations { · 1319 unmodified lines | ||
| 1673 | 1673 | /* this callback is with swap_lock and sometimes page table lock held */ |
| 1674 | 1674 | void (*swap_slot_free_notify) (struct block_device *, unsigned long); |
| 1675 | 1675 | int (*report_zones)(struct gendisk *, sector_t sector, |
| 1676 | − struct blk_zone *zones, unsigned int *nr_zones, | |
| 1677 | − gfp_t gfp_mask); | |
| 1676 | + struct blk_zone *zones, unsigned int *nr_zones); | |
| 1678 | 1677 | struct module *owner; |
| 1679 | 1678 | const struct pr_ops *pr_ops; |
| 1680 | 1679 | }; |
| @@ -95,8 +95,7 @@ typedef int (*dm_prepare_ioctl_fn) (struct dm_target *ti, struct block_device ** · 94 unmodified lines | ||
| 95 | 95 | |
| 96 | 96 | typedef int (*dm_report_zones_fn) (struct dm_target *ti, sector_t sector, |
| 97 | 97 | struct blk_zone *zones, |
| 98 | − unsigned int *nr_zones, | |
| 99 | − gfp_t gfp_mask); | |
| 98 | + unsigned int *nr_zones); | |
| 100 | 99 | |
| 101 | 100 | /* |
| 102 | 101 | * These iteration functions are typically used to check (and combine) |