Lines Matching refs:gd
106 set_capacity_and_notify(dev->gd, dev->nsectors); in rnbd_clt_change_capacity()
132 gd_kobj = &disk_to_dev(dev->gd)->kobj; in process_msg_open_rsp()
663 gd_kobj = &disk_to_dev(dev->gd)->kobj; in set_dev_states_to_disconnected()
1391 dev->gd->major = rnbd_client_major; in rnbd_clt_setup_gen_disk()
1392 dev->gd->first_minor = idx << RNBD_PART_BITS; in rnbd_clt_setup_gen_disk()
1393 dev->gd->minors = 1 << RNBD_PART_BITS; in rnbd_clt_setup_gen_disk()
1394 dev->gd->fops = &rnbd_client_ops; in rnbd_clt_setup_gen_disk()
1395 dev->gd->queue = dev->queue; in rnbd_clt_setup_gen_disk()
1396 dev->gd->private_data = dev; in rnbd_clt_setup_gen_disk()
1397 snprintf(dev->gd->disk_name, sizeof(dev->gd->disk_name), "rnbd%d", in rnbd_clt_setup_gen_disk()
1400 dev->gd->disk_name, in rnbd_clt_setup_gen_disk()
1404 set_capacity(dev->gd, dev->nsectors); in rnbd_clt_setup_gen_disk()
1408 set_disk_ro(dev->gd, true); in rnbd_clt_setup_gen_disk()
1415 err = add_disk(dev->gd); in rnbd_clt_setup_gen_disk()
1417 blk_cleanup_disk(dev->gd); in rnbd_clt_setup_gen_disk()
1428 dev->gd = blk_mq_alloc_disk(&dev->sess->tag_set, dev); in rnbd_client_setup_device()
1429 if (IS_ERR(dev->gd)) in rnbd_client_setup_device()
1430 return PTR_ERR(dev->gd); in rnbd_client_setup_device()
1431 dev->queue = dev->gd->queue; in rnbd_client_setup_device()
1614 dev->gd->disk_name, dev->nsectors, in rnbd_clt_map_device()
1640 del_gendisk(dev->gd); in destroy_gen_disk()
1641 blk_cleanup_disk(dev->gd); in destroy_gen_disk()