Lines Matching refs:gd
30 struct gendisk *gd; member
172 set_capacity(dev->gd, dev->size >> SECTOR_SHIFT); in simdisk_attach()
174 pr_info("SIMDISK: %s=%s\n", dev->gd->disk_name, dev->filename); in simdisk_attach()
198 dev->gd->disk_name, dev->filename); in simdisk_detach()
268 dev->gd = blk_alloc_disk(NUMA_NO_NODE); in simdisk_setup()
269 if (!dev->gd) in simdisk_setup()
271 dev->gd->major = simdisk_major; in simdisk_setup()
272 dev->gd->first_minor = which; in simdisk_setup()
273 dev->gd->minors = SIMDISK_MINORS; in simdisk_setup()
274 dev->gd->fops = &simdisk_ops; in simdisk_setup()
275 dev->gd->private_data = dev; in simdisk_setup()
276 snprintf(dev->gd->disk_name, 32, "simdisk%d", which); in simdisk_setup()
277 set_capacity(dev->gd, 0); in simdisk_setup()
278 err = add_disk(dev->gd); in simdisk_setup()
287 blk_cleanup_disk(dev->gd); in simdisk_setup()
339 if (dev->gd) { in simdisk_teardown()
340 del_gendisk(dev->gd); in simdisk_teardown()
341 blk_cleanup_disk(dev->gd); in simdisk_teardown()