Lines Matching refs:block
40 int dasd_gendisk_alloc(struct dasd_block *block) in dasd_gendisk_alloc() argument
47 base = block->base; in dasd_gendisk_alloc()
51 block->tag_set.ops = &dasd_mq_ops; in dasd_gendisk_alloc()
52 block->tag_set.cmd_size = sizeof(struct dasd_ccw_req); in dasd_gendisk_alloc()
53 block->tag_set.nr_hw_queues = nr_hw_queues; in dasd_gendisk_alloc()
54 block->tag_set.queue_depth = queue_depth; in dasd_gendisk_alloc()
55 block->tag_set.flags = BLK_MQ_F_SHOULD_MERGE; in dasd_gendisk_alloc()
56 block->tag_set.numa_node = NUMA_NO_NODE; in dasd_gendisk_alloc()
57 rc = blk_mq_alloc_tag_set(&block->tag_set); in dasd_gendisk_alloc()
61 gdp = blk_mq_alloc_disk(&block->tag_set, block); in dasd_gendisk_alloc()
63 blk_mq_free_tag_set(&block->tag_set); in dasd_gendisk_alloc()
99 block->gdp = gdp; in dasd_gendisk_alloc()
100 set_capacity(block->gdp, 0); in dasd_gendisk_alloc()
102 rc = device_add_disk(&base->cdev->dev, block->gdp, NULL); in dasd_gendisk_alloc()
104 dasd_gendisk_free(block); in dasd_gendisk_alloc()
114 void dasd_gendisk_free(struct dasd_block *block) in dasd_gendisk_free() argument
116 if (block->gdp) { in dasd_gendisk_free()
117 del_gendisk(block->gdp); in dasd_gendisk_free()
118 block->gdp->private_data = NULL; in dasd_gendisk_free()
119 put_disk(block->gdp); in dasd_gendisk_free()
120 block->gdp = NULL; in dasd_gendisk_free()
121 blk_mq_free_tag_set(&block->tag_set); in dasd_gendisk_free()
128 int dasd_scan_partitions(struct dasd_block *block) in dasd_scan_partitions() argument
133 bdev = blkdev_get_by_dev(disk_devt(block->gdp), BLK_OPEN_READ, NULL, in dasd_scan_partitions()
136 DBF_DEV_EVENT(DBF_ERR, block->base, in dasd_scan_partitions()
142 mutex_lock(&block->gdp->open_mutex); in dasd_scan_partitions()
143 rc = bdev_disk_changed(block->gdp, false); in dasd_scan_partitions()
144 mutex_unlock(&block->gdp->open_mutex); in dasd_scan_partitions()
146 DBF_DEV_EVENT(DBF_ERR, block->base, in dasd_scan_partitions()
159 block->bdev = bdev; in dasd_scan_partitions()
167 void dasd_destroy_partitions(struct dasd_block *block) in dasd_destroy_partitions() argument
175 bdev = block->bdev; in dasd_destroy_partitions()
176 block->bdev = NULL; in dasd_destroy_partitions()