• Home
  • Raw
  • Download

Lines Matching refs:be

38 struct xenbus_device *xen_blkbk_xenbus(struct backend_info *be)  in xen_blkbk_xenbus()  argument
40 return be->dev; in xen_blkbk_xenbus()
58 struct xenbus_device *dev = blkif->be->dev; in blkback_name()
88 if (blkif->be->dev->state == XenbusStateConnected) in xen_update_blkif_status()
92 connect(blkif->be); in xen_update_blkif_status()
93 if (blkif->be->dev->state != XenbusStateConnected) in xen_update_blkif_status()
98 xenbus_dev_error(blkif->be->dev, err, "get blkback dev name"); in xen_update_blkif_status()
104 xenbus_dev_error(blkif->be->dev, err, "block flush"); in xen_update_blkif_status()
115 xenbus_dev_fatal(blkif->be->dev, err, in xen_update_blkif_status()
200 err = xenbus_map_ring_valloc(blkif->be->dev, gref, nr_grefs, in xen_blkif_map()
257 xenbus_unmap_ring_vfree(blkif->be->dev, ring->blk_ring); in xen_blkif_map()
296 xenbus_unmap_ring_vfree(blkif->be->dev, ring->blk_ring); in xen_blkif_disconnect()
344 kfree(blkif->be->mode); in xen_blkif_free()
345 kfree(blkif->be); in xen_blkif_free()
379 struct backend_info *be = dev_get_drvdata(&dev->dev); \
380 struct xen_blkif *blkif = be->blkif; \
428 struct backend_info *be = dev_get_drvdata(&dev->dev); \
434 VBD_SHOW(physical_device, "%x:%x\n", be->major, be->minor);
435 VBD_SHOW(mode, "%s\n", be->mode);
535 struct backend_info *be = dev_get_drvdata(&dev->dev); in xen_blkbk_remove() local
539 if (be->major || be->minor) in xen_blkbk_remove()
542 if (be->backend_watch.node) { in xen_blkbk_remove()
543 unregister_xenbus_watch(&be->backend_watch); in xen_blkbk_remove()
544 kfree(be->backend_watch.node); in xen_blkbk_remove()
545 be->backend_watch.node = NULL; in xen_blkbk_remove()
550 if (be->blkif) { in xen_blkbk_remove()
551 xen_blkif_disconnect(be->blkif); in xen_blkbk_remove()
554 xen_blkif_put(be->blkif); in xen_blkbk_remove()
561 struct backend_info *be, int state) in xen_blkbk_flush_diskcache() argument
563 struct xenbus_device *dev = be->dev; in xen_blkbk_flush_diskcache()
574 static void xen_blkbk_discard(struct xenbus_transaction xbt, struct backend_info *be) in xen_blkbk_discard() argument
576 struct xenbus_device *dev = be->dev; in xen_blkbk_discard()
577 struct xen_blkif *blkif = be->blkif; in xen_blkbk_discard()
580 struct block_device *bdev = be->blkif->vbd.bdev; in xen_blkbk_discard()
618 struct backend_info *be, int state) in xen_blkbk_barrier() argument
620 struct xenbus_device *dev = be->dev; in xen_blkbk_barrier()
640 struct backend_info *be = kzalloc(sizeof(struct backend_info), in xen_blkbk_probe() local
646 if (!be) { in xen_blkbk_probe()
651 be->dev = dev; in xen_blkbk_probe()
652 dev_set_drvdata(&dev->dev, be); in xen_blkbk_probe()
654 be->blkif = xen_blkif_alloc(dev->otherend_id); in xen_blkbk_probe()
655 if (IS_ERR(be->blkif)) { in xen_blkbk_probe()
656 err = PTR_ERR(be->blkif); in xen_blkbk_probe()
657 be->blkif = NULL; in xen_blkbk_probe()
677 be->blkif->be = be; in xen_blkbk_probe()
679 err = xenbus_watch_pathfmt(dev, &be->backend_watch, NULL, in xen_blkbk_probe()
713 struct backend_info *be in backend_changed() local
715 struct xenbus_device *dev = be->dev; in backend_changed()
737 if (be->major | be->minor) { in backend_changed()
738 if (be->major != major || be->minor != minor) in backend_changed()
740 be->major, be->minor, major, minor); in backend_changed()
744 be->mode = xenbus_read(XBT_NIL, dev->nodename, "mode", NULL); in backend_changed()
745 if (IS_ERR(be->mode)) { in backend_changed()
746 err = PTR_ERR(be->mode); in backend_changed()
747 be->mode = NULL; in backend_changed()
761 kfree(be->mode); in backend_changed()
762 be->mode = NULL; in backend_changed()
766 be->major = major; in backend_changed()
767 be->minor = minor; in backend_changed()
769 err = xen_vbd_create(be->blkif, handle, major, minor, in backend_changed()
770 !strchr(be->mode, 'w'), cdrom); in backend_changed()
777 xen_vbd_free(&be->blkif->vbd); in backend_changed()
783 kfree(be->mode); in backend_changed()
784 be->mode = NULL; in backend_changed()
785 be->major = 0; in backend_changed()
786 be->minor = 0; in backend_changed()
789 xen_update_blkif_status(be->blkif); in backend_changed()
799 struct backend_info *be = dev_get_drvdata(&dev->dev); in frontend_changed() local
826 err = xen_blkif_disconnect(be->blkif); in frontend_changed()
832 err = connect_ring(be); in frontend_changed()
838 xen_blkif_disconnect(be->blkif); in frontend_changed()
841 xen_update_blkif_status(be->blkif); in frontend_changed()
849 xen_blkif_disconnect(be->blkif); in frontend_changed()
879 struct backend_info *be = dev_get_drvdata(&dev->dev); in reclaim_memory() local
881 if (!be) in reclaim_memory()
883 be->blkif->buffer_squeeze_end = jiffies + in reclaim_memory()
893 static void connect(struct backend_info *be) in connect() argument
897 struct xenbus_device *dev = be->dev; in connect()
910 xen_blkbk_flush_diskcache(xbt, be, be->blkif->vbd.flush_support); in connect()
912 xen_blkbk_discard(xbt, be); in connect()
914 xen_blkbk_barrier(xbt, be, be->blkif->vbd.flush_support); in connect()
917 be->blkif->vbd.feature_gnt_persistent); in connect()
925 (unsigned long long)vbd_sz(&be->blkif->vbd)); in connect()
934 be->blkif->vbd.type | in connect()
935 (be->blkif->vbd.readonly ? VDISK_READONLY : 0)); in connect()
943 bdev_logical_block_size(be->blkif->vbd.bdev)); in connect()
950 bdev_physical_block_size(be->blkif->vbd.bdev)); in connect()
980 struct xenbus_device *dev = blkif->be->dev; in read_per_ring_refs()
1065 static int connect_ring(struct backend_info *be) in connect_ring() argument
1067 struct xenbus_device *dev = be->dev; in connect_ring()
1068 struct xen_blkif *blkif = be->blkif; in connect_ring()