Lines Matching full:disk
104 * @disk: Target disk
106 * Register with sysfs a set of independent access ranges for @disk.
108 int disk_register_independent_access_ranges(struct gendisk *disk) in disk_register_independent_access_ranges() argument
110 struct blk_independent_access_ranges *iars = disk->ia_ranges; in disk_register_independent_access_ranges()
111 struct request_queue *q = disk->queue; in disk_register_independent_access_ranges()
128 disk->ia_ranges = NULL; in disk_register_independent_access_ranges()
151 void disk_unregister_independent_access_ranges(struct gendisk *disk) in disk_unregister_independent_access_ranges() argument
153 struct request_queue *q = disk->queue; in disk_unregister_independent_access_ranges()
154 struct blk_independent_access_ranges *iars = disk->ia_ranges; in disk_unregister_independent_access_ranges()
172 disk->ia_ranges = NULL; in disk_unregister_independent_access_ranges()
192 static bool disk_check_ia_ranges(struct gendisk *disk, in disk_check_ia_ranges() argument
196 sector_t capacity = get_capacity(disk); in disk_check_ia_ranges()
225 pr_warn("Independent access ranges do not match disk capacity\n"); in disk_check_ia_ranges()
232 static bool disk_ia_ranges_changed(struct gendisk *disk, in disk_ia_ranges_changed() argument
235 struct blk_independent_access_ranges *old = disk->ia_ranges; in disk_ia_ranges_changed()
256 * @disk: target disk
263 disk_alloc_independent_access_ranges(struct gendisk *disk, int nr_ia_ranges) in disk_alloc_independent_access_ranges() argument
268 GFP_KERNEL, disk->queue->node); in disk_alloc_independent_access_ranges()
276 * disk_set_independent_access_ranges - Set a disk independent access ranges
277 * @disk: target disk
281 * of @disk to @iars. If @iars is NULL and the independent access ranges
286 void disk_set_independent_access_ranges(struct gendisk *disk, in disk_set_independent_access_ranges() argument
289 struct request_queue *q = disk->queue; in disk_set_independent_access_ranges()
293 if (iars && !disk_check_ia_ranges(disk, iars)) { in disk_set_independent_access_ranges()
297 if (iars && !disk_ia_ranges_changed(disk, iars)) { in disk_set_independent_access_ranges()
309 disk_unregister_independent_access_ranges(disk); in disk_set_independent_access_ranges()
310 disk->ia_ranges = iars; in disk_set_independent_access_ranges()
312 disk_register_independent_access_ranges(disk); in disk_set_independent_access_ranges()