Lines Matching refs:disk
60 if (!rq->q->disk->seq_zones_wlock) in blk_req_needs_zone_write_lock()
71 if (test_and_set_bit(zno, rq->q->disk->seq_zones_wlock)) in blk_req_zone_write_trylock()
84 rq->q->disk->seq_zones_wlock))) in __blk_req_zone_write_lock()
95 if (rq->q->disk->seq_zones_wlock) in __blk_req_zone_write_unlock()
97 rq->q->disk->seq_zones_wlock)); in __blk_req_zone_write_unlock()
141 struct gendisk *disk = bdev->bd_disk; in blkdev_report_zones() local
142 sector_t capacity = get_capacity(disk); in blkdev_report_zones()
144 if (!bdev_is_zoned(bdev) || WARN_ON_ONCE(!disk->fops->report_zones)) in blkdev_report_zones()
150 return disk->fops->report_zones(disk, sector, nr_zones, cb, data); in blkdev_report_zones()
183 struct gendisk *disk = bdev->bd_disk; in blkdev_zone_reset_all_emulated() local
191 need_reset = blk_alloc_zone_bitmap(disk->queue->node, disk->nr_zones); in blkdev_zone_reset_all_emulated()
195 ret = disk->fops->report_zones(disk, 0, disk->nr_zones, in blkdev_zone_reset_all_emulated()
202 if (!test_bit(disk_zone_no(disk, sector), need_reset)) { in blkdev_zone_reset_all_emulated()
432 void disk_free_zone_bitmaps(struct gendisk *disk) in disk_free_zone_bitmaps() argument
434 kfree(disk->conv_zones_bitmap); in disk_free_zone_bitmaps()
435 disk->conv_zones_bitmap = NULL; in disk_free_zone_bitmaps()
436 kfree(disk->seq_zones_wlock); in disk_free_zone_bitmaps()
437 disk->seq_zones_wlock = NULL; in disk_free_zone_bitmaps()
441 struct gendisk *disk; member
455 struct gendisk *disk = args->disk; in blk_revalidate_zone_cb() local
456 struct request_queue *q = disk->queue; in blk_revalidate_zone_cb()
457 sector_t capacity = get_capacity(disk); in blk_revalidate_zone_cb()
463 disk->disk_name, args->sector, zone->start); in blk_revalidate_zone_cb()
469 disk->disk_name, zone->start, zone->len); in blk_revalidate_zone_cb()
480 disk->disk_name); in blk_revalidate_zone_cb()
485 disk->disk_name); in blk_revalidate_zone_cb()
511 disk->disk_name, (int)zone->type, zone->start); in blk_revalidate_zone_cb()
535 int blk_revalidate_disk_zones(struct gendisk *disk, in blk_revalidate_disk_zones() argument
536 void (*update_driver_data)(struct gendisk *disk)) in blk_revalidate_disk_zones() argument
538 struct request_queue *q = disk->queue; in blk_revalidate_disk_zones()
540 sector_t capacity = get_capacity(disk); in blk_revalidate_disk_zones()
559 disk->disk_name, zone_sectors); in blk_revalidate_disk_zones()
565 disk->disk_name); in blk_revalidate_disk_zones()
573 args.disk = disk; in blk_revalidate_disk_zones()
576 ret = disk->fops->report_zones(disk, 0, UINT_MAX, in blk_revalidate_disk_zones()
579 pr_warn("%s: No zones reported\n", disk->disk_name); in blk_revalidate_disk_zones()
590 disk->disk_name, args.sector); in blk_revalidate_disk_zones()
601 disk->nr_zones = args.nr_zones; in blk_revalidate_disk_zones()
602 swap(disk->seq_zones_wlock, args.seq_zones_wlock); in blk_revalidate_disk_zones()
603 swap(disk->conv_zones_bitmap, args.conv_zones_bitmap); in blk_revalidate_disk_zones()
605 update_driver_data(disk); in blk_revalidate_disk_zones()
608 pr_warn("%s: failed to revalidate zones\n", disk->disk_name); in blk_revalidate_disk_zones()
609 disk_free_zone_bitmaps(disk); in blk_revalidate_disk_zones()
619 void disk_clear_zone_settings(struct gendisk *disk) in disk_clear_zone_settings() argument
621 struct request_queue *q = disk->queue; in disk_clear_zone_settings()
625 disk_free_zone_bitmaps(disk); in disk_clear_zone_settings()
628 disk->nr_zones = 0; in disk_clear_zone_settings()
629 disk->max_open_zones = 0; in disk_clear_zone_settings()
630 disk->max_active_zones = 0; in disk_clear_zone_settings()