xen/blkback: add accessor for xenbus backend device
authorJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Thu, 18 Mar 2010 22:35:05 +0000 (15:35 -0700)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Thu, 14 Apr 2011 22:26:12 +0000 (18:26 -0400)
Since backend_info is hidden away now.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
drivers/xen/blkback/common.h
drivers/xen/blkback/vbd.c
drivers/xen/blkback/xenbus.c

index cebcc2b..0f91830 100644 (file)
@@ -136,4 +136,6 @@ int blkif_schedule(void *arg);
 int blkback_barrier(struct xenbus_transaction xbt,
                    struct backend_info *be, int state);
 
+struct xenbus_device *blkback_xenbus(struct backend_info *be);
+
 #endif /* __BLKIF__BACKEND__COMMON_H__ */
index 0635c54..943ec23 100644 (file)
@@ -123,7 +123,7 @@ void vbd_resize(blkif_t *blkif)
        struct vbd *vbd = &blkif->vbd;
        struct xenbus_transaction xbt;
        int err;
-       struct xenbus_device *dev = blkif->be->dev;
+       struct xenbus_device *dev = blkback_xenbus(blkif->be);
        unsigned long long new_size = vbd_size(vbd);
 
        printk(KERN_INFO "VBD Resize: new size %Lu\n", new_size);
index 34f8e40..c31e5c4 100644 (file)
@@ -42,6 +42,11 @@ static int connect_ring(struct backend_info *);
 static void backend_changed(struct xenbus_watch *, const char **,
                            unsigned int);
 
+struct xenbus_device *blkback_xenbus(struct backend_info *be)
+{
+       return be->dev;
+}
+
 static int blkback_name(blkif_t *blkif, char *buf)
 {
        char *devpath, *devname;