Lines Matching defs:vbd

36 static void xen_vbd_free(struct xen_vbd *vbd);
84 if (!blkif->rings || !blkif->rings[0].irq || !blkif->vbd.bdev)
102 err = sync_blockdev(blkif->vbd.bdev);
107 invalidate_inode_pages2(blkif->vbd.bdev->bd_inode->i_mapping);
348 xen_vbd_free(&blkif->vbd);
473 static void xen_vbd_free(struct xen_vbd *vbd)
475 if (vbd->bdev)
476 blkdev_put(vbd->bdev, NULL);
477 vbd->bdev = NULL;
484 struct xen_vbd *vbd;
487 vbd = &blkif->vbd;
488 vbd->handle = handle;
489 vbd->readonly = readonly;
490 vbd->type = 0;
492 vbd->pdevice = MKDEV(major, minor);
494 bdev = blkdev_get_by_dev(vbd->pdevice, vbd->readonly ?
499 vbd->pdevice);
503 vbd->bdev = bdev;
504 if (vbd->bdev->bd_disk == NULL) {
506 vbd->pdevice);
507 xen_vbd_free(vbd);
510 vbd->size = vbd_sz(vbd);
512 if (cdrom || disk_to_cdi(vbd->bdev->bd_disk))
513 vbd->type |= VDISK_CDROM;
514 if (vbd->bdev->bd_disk->flags & GENHD_FL_REMOVABLE)
515 vbd->type |= VDISK_REMOVABLE;
518 vbd->flush_support = true;
520 vbd->discard_secure = true;
572 struct block_device *bdev = be->blkif->vbd.bdev;
596 blkif->vbd.discard_secure);
695 * node. Read it and the mode node, and create a vbd. If the frontend is
764 xenbus_dev_fatal(dev, err, "creating vbd structure");
768 xen_vbd_free(&be->blkif->vbd);
901 xen_blkbk_flush_diskcache(xbt, be, be->blkif->vbd.flush_support);
905 xen_blkbk_barrier(xbt, be, be->blkif->vbd.flush_support);
908 be->blkif->vbd.feature_gnt_persistent_parm);
916 (unsigned long long)vbd_sz(&be->blkif->vbd));
925 be->blkif->vbd.type |
926 (be->blkif->vbd.readonly ? VDISK_READONLY : 0));
934 bdev_logical_block_size(be->blkif->vbd.bdev));
941 bdev_physical_block_size(be->blkif->vbd.bdev));
1086 blkif->vbd.feature_gnt_persistent_parm = feature_persistent;
1087 blkif->vbd.feature_gnt_persistent =
1088 blkif->vbd.feature_gnt_persistent_parm &&
1091 blkif->vbd.overflow_max_grants = 0;
1113 blkif->vbd.feature_gnt_persistent ? "persistent grants" : "");
1157 { "vbd" },