Lines Matching full:disk
121 * @disk: Target gendisk
126 unsigned int blkdev_nr_zones(struct gendisk *disk) in blkdev_nr_zones() argument
128 sector_t zone_sectors = blk_queue_zone_sectors(disk->queue); in blkdev_nr_zones()
130 if (!blk_queue_is_zoned(disk->queue)) in blkdev_nr_zones()
132 return (get_capacity(disk) + zone_sectors - 1) >> ilog2(zone_sectors); in blkdev_nr_zones()
158 struct gendisk *disk = bdev->bd_disk; in blkdev_report_zones() local
159 sector_t capacity = get_capacity(disk); in blkdev_report_zones()
162 WARN_ON_ONCE(!disk->fops->report_zones)) in blkdev_report_zones()
168 return disk->fops->report_zones(disk, sector, nr_zones, cb, data); in blkdev_report_zones()
181 * of the applicable zone range is the entire disk. in blkdev_allow_reset_all_zones()
197 * @sector..@sector+@nr_sectors. Specifying the entire disk sector range
389 struct gendisk *disk; member
404 struct gendisk *disk = args->disk; in blk_revalidate_zone_cb() local
405 struct request_queue *q = disk->queue; in blk_revalidate_zone_cb()
406 sector_t capacity = get_capacity(disk); in blk_revalidate_zone_cb()
415 disk->disk_name, zone->len); in blk_revalidate_zone_cb()
424 disk->disk_name); in blk_revalidate_zone_cb()
430 disk->disk_name); in blk_revalidate_zone_cb()
438 disk->disk_name, args->sector, zone->start); in blk_revalidate_zone_cb()
464 disk->disk_name, (int)zone->type, zone->start); in blk_revalidate_zone_cb()
474 * @disk: Target disk
475 * @update_driver_data: Callback to update driver data on the frozen disk
478 * a disk request queue zone bitmaps. This functions should normally be called
479 * within the disk ->revalidate method for blk-mq based drivers. For BIO based
486 int blk_revalidate_disk_zones(struct gendisk *disk, in blk_revalidate_disk_zones() argument
487 void (*update_driver_data)(struct gendisk *disk)) in blk_revalidate_disk_zones() argument
489 struct request_queue *q = disk->queue; in blk_revalidate_disk_zones()
491 .disk = disk, in blk_revalidate_disk_zones()
501 if (!get_capacity(disk)) in blk_revalidate_disk_zones()
509 ret = disk->fops->report_zones(disk, 0, UINT_MAX, in blk_revalidate_disk_zones()
525 update_driver_data(disk); in blk_revalidate_disk_zones()
528 pr_warn("%s: failed to revalidate zones\n", disk->disk_name); in blk_revalidate_disk_zones()