Lines Matching full: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()
123 if (!ns->head->disk) in nvme_kick_requeue_lists()
127 disk_uevent(ns->head->disk, KOBJ_CHANGE); in nvme_kick_requeue_lists()
175 sector_t capacity = get_capacity(head->disk); in nvme_mpath_revalidate_paths()
181 if (capacity != get_capacity(ns->disk)) in nvme_mpath_revalidate_paths()
344 struct device *dev = disk_to_dev(head->disk); in nvme_ns_head_submit_bio()
358 bio_set_dev(bio, ns->disk->part0); in nvme_ns_head_submit_bio()
360 trace_block_bio_remap(bio, disk_devt(ns->head->disk), in nvme_ns_head_submit_bio()
385 static void nvme_ns_head_release(struct gendisk *disk, fmode_t mode) in nvme_ns_head_release() argument
387 nvme_put_ns_head(disk->private_data); in nvme_ns_head_release()
391 static int nvme_ns_head_report_zones(struct gendisk *disk, sector_t sector, in nvme_ns_head_report_zones() argument
394 struct nvme_ns_head *head = disk->private_data; in nvme_ns_head_report_zones()
499 head->disk = blk_alloc_disk(ctrl->numa_node); in nvme_mpath_alloc_disk()
500 if (!head->disk) in nvme_mpath_alloc_disk()
502 head->disk->fops = &nvme_ns_head_ops; in nvme_mpath_alloc_disk()
503 head->disk->private_data = head; in nvme_mpath_alloc_disk()
504 sprintf(head->disk->disk_name, "nvme%dn%d", in nvme_mpath_alloc_disk()
507 blk_queue_flag_set(QUEUE_FLAG_NONROT, head->disk->queue); in nvme_mpath_alloc_disk()
508 blk_queue_flag_set(QUEUE_FLAG_NOWAIT, head->disk->queue); in nvme_mpath_alloc_disk()
517 blk_queue_flag_set(QUEUE_FLAG_POLL, head->disk->queue); in nvme_mpath_alloc_disk()
519 /* set to a default value of 512 until the disk is validated */ in nvme_mpath_alloc_disk()
520 blk_queue_logical_block_size(head->disk->queue, 512); in nvme_mpath_alloc_disk()
521 blk_set_stacking_limits(&head->disk->queue->limits); in nvme_mpath_alloc_disk()
522 blk_queue_dma_alignment(head->disk->queue, 3); in nvme_mpath_alloc_disk()
527 blk_queue_write_cache(head->disk->queue, vwc, vwc); in nvme_mpath_alloc_disk()
536 if (!head->disk) in nvme_mpath_set_live()
545 rc = device_add_disk(&head->subsys->dev, head->disk, in nvme_mpath_set_live()
835 if (blk_queue_stable_writes(ns->queue) && ns->head->disk) in nvme_mpath_add_disk()
837 ns->head->disk->queue); in nvme_mpath_add_disk()
839 if (blk_queue_is_zoned(ns->queue) && ns->head->disk) in nvme_mpath_add_disk()
840 ns->head->disk->nr_zones = ns->disk->nr_zones; in nvme_mpath_add_disk()
846 if (!head->disk) in nvme_mpath_shutdown_disk()
851 del_gendisk(head->disk); in nvme_mpath_shutdown_disk()
857 if (!head->disk) in nvme_mpath_remove_disk()
859 blk_mark_disk_dead(head->disk); in nvme_mpath_remove_disk()
863 put_disk(head->disk); in nvme_mpath_remove_disk()