• Home
  • Raw
  • Download

Lines Matching refs:gd

191 	struct gendisk *gd;  member
506 struct gendisk *gd = info->gd; in blkif_ioctl() local
507 if (gd->flags & GENHD_FL_CD) in blkif_ioctl()
917 struct gendisk *gd = info->gd; in blkif_set_queue_limits() local
925 blk_queue_max_discard_sectors(rq, get_capacity(gd)); in blkif_set_queue_limits()
951 static int xlvbd_init_blk_queue(struct gendisk *gd, u16 sector_size, in xlvbd_init_blk_queue() argument
955 struct blkfront_info *info = gd->private_data; in xlvbd_init_blk_queue()
984 info->rq = gd->queue = rq; in xlvbd_init_blk_queue()
985 info->gd = gd; in xlvbd_init_blk_queue()
1008 info->gd->disk_name, flush_info(info), in xlvbd_flush()
1087 struct gendisk *gd; in xlvbd_alloc_gendisk() local
1095 BUG_ON(info->gd != NULL); in xlvbd_alloc_gendisk()
1132 gd = alloc_disk(nr_minors); in xlvbd_alloc_gendisk()
1133 if (gd == NULL) in xlvbd_alloc_gendisk()
1136 strcpy(gd->disk_name, DEV_NAME); in xlvbd_alloc_gendisk()
1137 ptr = encode_disk_name(gd->disk_name + sizeof(DEV_NAME) - 1, offset); in xlvbd_alloc_gendisk()
1138 BUG_ON(ptr >= gd->disk_name + DISK_NAME_LEN); in xlvbd_alloc_gendisk()
1142 snprintf(ptr, gd->disk_name + DISK_NAME_LEN - ptr, in xlvbd_alloc_gendisk()
1145 gd->major = XENVBD_MAJOR; in xlvbd_alloc_gendisk()
1146 gd->first_minor = minor; in xlvbd_alloc_gendisk()
1147 gd->fops = &xlvbd_block_fops; in xlvbd_alloc_gendisk()
1148 gd->private_data = info; in xlvbd_alloc_gendisk()
1149 set_capacity(gd, capacity); in xlvbd_alloc_gendisk()
1151 if (xlvbd_init_blk_queue(gd, sector_size, physical_sector_size)) { in xlvbd_alloc_gendisk()
1152 del_gendisk(gd); in xlvbd_alloc_gendisk()
1159 set_disk_ro(gd, 1); in xlvbd_alloc_gendisk()
1162 gd->flags |= GENHD_FL_REMOVABLE; in xlvbd_alloc_gendisk()
1165 gd->flags |= GENHD_FL_CD; in xlvbd_alloc_gendisk()
1195 del_gendisk(info->gd); in xlvbd_release_gendisk()
1197 minor = info->gd->first_minor; in xlvbd_release_gendisk()
1198 nr_minors = info->gd->minors; in xlvbd_release_gendisk()
1205 put_disk(info->gd); in xlvbd_release_gendisk()
1206 info->gd = NULL; in xlvbd_release_gendisk()
1461 info->gd->disk_name, s->associated_id); in blkif_completion()
1568 info->gd->disk_name, op_name(bret->operation), id); in blkif_interrupt()
1586 info->gd->disk_name, op_name(bret->operation), id); in blkif_interrupt()
1596 info->gd->disk_name, op_name(bret->operation)); in blkif_interrupt()
1609 info->gd->disk_name, op_name(bret->operation)); in blkif_interrupt()
1615 info->gd->disk_name, op_name(bret->operation)); in blkif_interrupt()
2168 if (info->gd) in blkfront_closing()
2169 bdev = bdget_disk(info->gd, 0); in blkfront_closing()
2385 set_capacity(info->gd, sectors); in blkfront_connect()
2386 revalidate_disk(info->gd); in blkfront_connect()
2454 device_add_disk(&info->xbdev->dev, info->gd); in blkfront_connect()
2531 disk = info->gd; in blkfront_remove()
2592 if (!info->gd) in blkif_open()