static int connect_ring(struct backend_info *);
static void backend_changed(struct xenbus_watch *, const char **,
unsigned int);
+static void xen_vbd_sync(struct xen_vbd *vbd);
struct xenbus_device *xen_blkbk_xenbus(struct backend_info *be)
{
free_vm_area(blkif->blk_ring_area);
blkif->blk_rings.common.sring = NULL;
}
+ xen_vbd_sync(&blkif->vbd);
}
void xen_blkif_free(struct xen_blkif *blkif)
vbd->bdev = NULL;
}
+static void xen_vbd_sync(struct xen_vbd *vbd)
+{
+ if (vbd->bdev)
+ fsync_bdev(vbd->bdev);
+}
+
static int xen_vbd_create(struct xen_blkif *blkif, blkif_vdev_t handle,
unsigned major, unsigned minor, int readonly,
int cdrom)