Lines Matching full:block
35 int dasd_gendisk_alloc(struct dasd_block *block) in dasd_gendisk_alloc() argument
51 base = block->base; in dasd_gendisk_alloc()
55 block->tag_set.ops = &dasd_mq_ops; in dasd_gendisk_alloc()
56 block->tag_set.cmd_size = sizeof(struct dasd_ccw_req); in dasd_gendisk_alloc()
57 block->tag_set.nr_hw_queues = nr_hw_queues; in dasd_gendisk_alloc()
58 block->tag_set.queue_depth = queue_depth; in dasd_gendisk_alloc()
59 block->tag_set.flags = BLK_MQ_F_SHOULD_MERGE; in dasd_gendisk_alloc()
60 block->tag_set.numa_node = NUMA_NO_NODE; in dasd_gendisk_alloc()
61 rc = blk_mq_alloc_tag_set(&block->tag_set); in dasd_gendisk_alloc()
65 gdp = blk_mq_alloc_disk(&block->tag_set, &lim, block); in dasd_gendisk_alloc()
67 blk_mq_free_tag_set(&block->tag_set); in dasd_gendisk_alloc()
103 block->gdp = gdp; in dasd_gendisk_alloc()
104 set_capacity(block->gdp, 0); in dasd_gendisk_alloc()
106 rc = device_add_disk(&base->cdev->dev, block->gdp, NULL); in dasd_gendisk_alloc()
108 dasd_gendisk_free(block); in dasd_gendisk_alloc()
118 void dasd_gendisk_free(struct dasd_block *block) in dasd_gendisk_free() argument
120 if (block->gdp) { in dasd_gendisk_free()
121 del_gendisk(block->gdp); in dasd_gendisk_free()
122 block->gdp->private_data = NULL; in dasd_gendisk_free()
123 put_disk(block->gdp); in dasd_gendisk_free()
124 block->gdp = NULL; in dasd_gendisk_free()
125 blk_mq_free_tag_set(&block->tag_set); in dasd_gendisk_free()
132 int dasd_scan_partitions(struct dasd_block *block) in dasd_scan_partitions() argument
137 bdev_file = bdev_file_open_by_dev(disk_devt(block->gdp), BLK_OPEN_READ, in dasd_scan_partitions()
140 DBF_DEV_EVENT(DBF_ERR, block->base, in dasd_scan_partitions()
146 mutex_lock(&block->gdp->open_mutex); in dasd_scan_partitions()
147 rc = bdev_disk_changed(block->gdp, false); in dasd_scan_partitions()
148 mutex_unlock(&block->gdp->open_mutex); in dasd_scan_partitions()
150 DBF_DEV_EVENT(DBF_ERR, block->base, in dasd_scan_partitions()
160 * to block->bdev_file is done AFTER the BLKRRPART ioctl. in dasd_scan_partitions()
162 block->bdev_file = bdev_file; in dasd_scan_partitions()
170 void dasd_destroy_partitions(struct dasd_block *block) in dasd_destroy_partitions() argument
178 bdev_file = block->bdev_file; in dasd_destroy_partitions()
179 block->bdev_file = NULL; in dasd_destroy_partitions()