Lines Matching refs:vbd

36 static void xen_vbd_free(struct xen_vbd *vbd);
84 if (!blkif->rings || !blkif->rings[0].irq || !blkif->vbd.bdev_file) in xen_update_blkif_status()
102 err = sync_blockdev(file_bdev(blkif->vbd.bdev_file)); in xen_update_blkif_status()
107 invalidate_inode_pages2(blkif->vbd.bdev_file->f_mapping); in xen_update_blkif_status()
348 xen_vbd_free(&blkif->vbd); in xen_blkif_free()
473 static void xen_vbd_free(struct xen_vbd *vbd) in xen_vbd_free() argument
475 if (vbd->bdev_file) in xen_vbd_free()
476 fput(vbd->bdev_file); in xen_vbd_free()
477 vbd->bdev_file = NULL; in xen_vbd_free()
484 struct xen_vbd *vbd; in xen_vbd_create() local
487 vbd = &blkif->vbd; in xen_vbd_create()
488 vbd->handle = handle; in xen_vbd_create()
489 vbd->readonly = readonly; in xen_vbd_create()
490 vbd->type = 0; in xen_vbd_create()
492 vbd->pdevice = MKDEV(major, minor); in xen_vbd_create()
494 bdev_file = bdev_file_open_by_dev(vbd->pdevice, vbd->readonly ? in xen_vbd_create()
499 vbd->pdevice); in xen_vbd_create()
503 vbd->bdev_file = bdev_file; in xen_vbd_create()
504 if (file_bdev(vbd->bdev_file)->bd_disk == NULL) { in xen_vbd_create()
506 vbd->pdevice); in xen_vbd_create()
507 xen_vbd_free(vbd); in xen_vbd_create()
510 vbd->size = vbd_sz(vbd); in xen_vbd_create()
512 if (cdrom || disk_to_cdi(file_bdev(vbd->bdev_file)->bd_disk)) in xen_vbd_create()
513 vbd->type |= VDISK_CDROM; in xen_vbd_create()
514 if (file_bdev(vbd->bdev_file)->bd_disk->flags & GENHD_FL_REMOVABLE) in xen_vbd_create()
515 vbd->type |= VDISK_REMOVABLE; in xen_vbd_create()
518 vbd->flush_support = true; in xen_vbd_create()
520 vbd->discard_secure = true; in xen_vbd_create()
572 struct block_device *bdev = file_bdev(be->blkif->vbd.bdev_file); in xen_blkbk_discard()
596 blkif->vbd.discard_secure); in xen_blkbk_discard()
768 xen_vbd_free(&be->blkif->vbd); in backend_changed()
901 xen_blkbk_flush_diskcache(xbt, be, be->blkif->vbd.flush_support); in connect()
905 xen_blkbk_barrier(xbt, be, be->blkif->vbd.flush_support); in connect()
908 be->blkif->vbd.feature_gnt_persistent_parm); in connect()
916 (unsigned long long)vbd_sz(&be->blkif->vbd)); in connect()
925 be->blkif->vbd.type | in connect()
926 (be->blkif->vbd.readonly ? VDISK_READONLY : 0)); in connect()
934 file_bdev(be->blkif->vbd.bdev_file))); in connect()
942 file_bdev(be->blkif->vbd.bdev_file))); in connect()
1087 blkif->vbd.feature_gnt_persistent_parm = feature_persistent; in connect_ring()
1088 blkif->vbd.feature_gnt_persistent = in connect_ring()
1089 blkif->vbd.feature_gnt_persistent_parm && in connect_ring()
1092 blkif->vbd.overflow_max_grants = 0; in connect_ring()
1114 blkif->vbd.feature_gnt_persistent ? "persistent grants" : ""); in connect_ring()