Lines Matching refs:disk
82 if (!q->disk) in queue_ra_show()
84 ra_kb = q->disk->bdi->ra_pages << (PAGE_SHIFT - 10); in queue_ra_show()
94 if (!q->disk) in queue_ra_store()
99 q->disk->bdi->ra_pages = ra_kb >> (PAGE_SHIFT - 10); in queue_ra_store()
254 if (q->disk) in queue_max_sectors_store()
255 q->disk->bdi->io_pages = max_sectors_kb >> (PAGE_SHIFT - 10); in queue_max_sectors_store()
324 return queue_var_show(disk_nr_zones(q->disk), page); in queue_nr_zones_show()
329 return queue_var_show(bdev_max_open_zones(q->disk->part0), page); in queue_max_open_zones_show()
334 return queue_var_show(bdev_max_active_zones(q->disk->part0), page); in queue_max_active_zones_show()
586 ret = wbt_init(q->disk); in queue_wb_lat_store()
676 struct gendisk *disk = container_of(kobj, struct gendisk, queue_kobj); in queue_attr_visible() local
677 struct request_queue *q = disk->queue; in queue_attr_visible()
690 struct gendisk *disk = container_of(kobj, struct gendisk, queue_kobj); in blk_mq_queue_attr_visible() local
691 struct request_queue *q = disk->queue; in blk_mq_queue_attr_visible()
718 struct gendisk *disk = container_of(kobj, struct gendisk, queue_kobj); in queue_attr_show() local
719 struct request_queue *q = disk->queue; in queue_attr_show()
735 struct gendisk *disk = container_of(kobj, struct gendisk, queue_kobj); in queue_attr_store() local
736 struct request_queue *q = disk->queue; in queue_attr_store()
770 static void blk_debugfs_remove(struct gendisk *disk) in blk_debugfs_remove() argument
772 struct request_queue *q = disk->queue; in blk_debugfs_remove()
787 int blk_register_queue(struct gendisk *disk) in blk_register_queue() argument
789 struct request_queue *q = disk->queue; in blk_register_queue()
793 kobject_init(&disk->queue_kobj, &blk_queue_ktype); in blk_register_queue()
794 ret = kobject_add(&disk->queue_kobj, &disk_to_dev(disk)->kobj, "queue"); in blk_register_queue()
799 ret = blk_mq_sysfs_register(disk); in blk_register_queue()
806 q->debugfs_dir = debugfs_create_dir(disk->disk_name, blk_debugfs_root); in blk_register_queue()
811 ret = disk_register_independent_access_ranges(disk); in blk_register_queue()
821 ret = blk_crypto_sysfs_register(disk); in blk_register_queue()
826 wbt_enable_default(disk); in blk_register_queue()
827 blk_throtl_register(disk); in blk_register_queue()
830 kobject_uevent(&disk->queue_kobj, KOBJ_ADD); in blk_register_queue()
855 disk_unregister_independent_access_ranges(disk); in blk_register_queue()
857 blk_debugfs_remove(disk); in blk_register_queue()
860 kobject_put(&disk->queue_kobj); in blk_register_queue()
872 void blk_unregister_queue(struct gendisk *disk) in blk_unregister_queue() argument
874 struct request_queue *q = disk->queue; in blk_unregister_queue()
898 blk_mq_sysfs_unregister(disk); in blk_unregister_queue()
899 blk_crypto_sysfs_unregister(disk); in blk_unregister_queue()
903 disk_unregister_independent_access_ranges(disk); in blk_unregister_queue()
907 kobject_uevent(&disk->queue_kobj, KOBJ_REMOVE); in blk_unregister_queue()
908 kobject_del(&disk->queue_kobj); in blk_unregister_queue()
911 blk_debugfs_remove(disk); in blk_unregister_queue()