Lines Matching refs:disk
59 if (h->disk) in nvme_mpath_unfreeze()
60 blk_mq_unfreeze_queue(h->disk->queue); in nvme_mpath_unfreeze()
69 if (h->disk) in nvme_mpath_wait_freeze()
70 blk_mq_freeze_queue_wait(h->disk->queue); in nvme_mpath_wait_freeze()
79 if (h->disk) in nvme_mpath_start_freeze()
80 blk_freeze_queue_start(h->disk->queue); in nvme_mpath_start_freeze()
104 bio_set_dev(bio, ns->head->disk->part0); in nvme_failover_req()
128 struct gendisk *disk = ns->head->disk; in nvme_mpath_start_request() local
130 if (!blk_queue_io_stat(disk->queue) || blk_rq_is_passthrough(rq)) in nvme_mpath_start_request()
134 nvme_req(rq)->start_time = bdev_start_io_acct(disk->part0, req_op(rq), in nvme_mpath_start_request()
145 bdev_end_io_acct(ns->head->disk->part0, req_op(rq), in nvme_mpath_end_request()
156 if (!ns->head->disk) in nvme_kick_requeue_lists()
160 disk_uevent(ns->head->disk, KOBJ_CHANGE); in nvme_kick_requeue_lists()
208 sector_t capacity = get_capacity(head->disk); in nvme_mpath_revalidate_paths()
214 if (capacity != get_capacity(ns->disk)) in nvme_mpath_revalidate_paths()
377 struct device *dev = disk_to_dev(head->disk); in nvme_ns_head_submit_bio()
393 bio_set_dev(bio, ns->disk->part0); in nvme_ns_head_submit_bio()
395 trace_block_bio_remap(bio, disk_devt(ns->head->disk), in nvme_ns_head_submit_bio()
413 static int nvme_ns_head_open(struct gendisk *disk, blk_mode_t mode) in nvme_ns_head_open() argument
415 if (!nvme_tryget_ns_head(disk->private_data)) in nvme_ns_head_open()
420 static void nvme_ns_head_release(struct gendisk *disk) in nvme_ns_head_release() argument
422 nvme_put_ns_head(disk->private_data); in nvme_ns_head_release()
426 static int nvme_ns_head_report_zones(struct gendisk *disk, sector_t sector, in nvme_ns_head_report_zones() argument
429 struct nvme_ns_head *head = disk->private_data; in nvme_ns_head_report_zones()
534 head->disk = blk_alloc_disk(ctrl->numa_node); in nvme_mpath_alloc_disk()
535 if (!head->disk) in nvme_mpath_alloc_disk()
537 head->disk->fops = &nvme_ns_head_ops; in nvme_mpath_alloc_disk()
538 head->disk->private_data = head; in nvme_mpath_alloc_disk()
539 sprintf(head->disk->disk_name, "nvme%dn%d", in nvme_mpath_alloc_disk()
542 blk_queue_flag_set(QUEUE_FLAG_NONROT, head->disk->queue); in nvme_mpath_alloc_disk()
543 blk_queue_flag_set(QUEUE_FLAG_NOWAIT, head->disk->queue); in nvme_mpath_alloc_disk()
544 blk_queue_flag_set(QUEUE_FLAG_IO_STAT, head->disk->queue); in nvme_mpath_alloc_disk()
553 blk_queue_flag_set(QUEUE_FLAG_POLL, head->disk->queue); in nvme_mpath_alloc_disk()
556 blk_queue_logical_block_size(head->disk->queue, 512); in nvme_mpath_alloc_disk()
557 blk_set_stacking_limits(&head->disk->queue->limits); in nvme_mpath_alloc_disk()
558 blk_queue_dma_alignment(head->disk->queue, 3); in nvme_mpath_alloc_disk()
563 blk_queue_write_cache(head->disk->queue, vwc, vwc); in nvme_mpath_alloc_disk()
572 if (!head->disk) in nvme_mpath_set_live()
581 rc = device_add_disk(&head->subsys->dev, head->disk, in nvme_mpath_set_live()
871 if (blk_queue_stable_writes(ns->queue) && ns->head->disk) in nvme_mpath_add_disk()
873 ns->head->disk->queue); in nvme_mpath_add_disk()
875 if (blk_queue_is_zoned(ns->queue) && ns->head->disk) in nvme_mpath_add_disk()
876 ns->head->disk->nr_zones = ns->disk->nr_zones; in nvme_mpath_add_disk()
882 if (!head->disk) in nvme_mpath_shutdown_disk()
887 del_gendisk(head->disk); in nvme_mpath_shutdown_disk()
893 if (!head->disk) in nvme_mpath_remove_disk()
898 put_disk(head->disk); in nvme_mpath_remove_disk()