xen/blkback: Prefix 'vbd' with 'xen' in structs and functions.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
diff --git a/drivers/block/xen-blkback/blkback.c b/drivers/block/xen-blkback/blkback.c
index d438781..1e454a3 100644
--- a/drivers/block/xen-blkback/blkback.c
+++ b/drivers/block/xen-blkback/blkback.c
@@ -166,10 +166,10 @@
 /*
  * Routines for managing virtual block devices (vbds).
  */
-static int vbd_translate(struct phys_req *req, struct xen_blkif *blkif,
-			 int operation)
+static int xen_vbd_translate(struct phys_req *req, struct xen_blkif *blkif,
+			     int operation)
 {
-	struct vbd *vbd = &blkif->vbd;
+	struct xen_vbd *vbd = &blkif->vbd;
 	int rc = -EACCES;
 
 	if ((operation != READ) && vbd->readonly)
@@ -186,9 +186,9 @@
 	return rc;
 }
 
-static void vbd_resize(struct xen_blkif *blkif)
+static void xen_vbd_resize(struct xen_blkif *blkif)
 {
-	struct vbd *vbd = &blkif->vbd;
+	struct xen_vbd *vbd = &blkif->vbd;
 	struct xenbus_transaction xbt;
 	int err;
 	struct xenbus_device *dev = xen_blkbk_xenbus(blkif->be);
@@ -263,7 +263,7 @@
 int xen_blkif_schedule(void *arg)
 {
 	struct xen_blkif *blkif = arg;
-	struct vbd *vbd = &blkif->vbd;
+	struct xen_vbd *vbd = &blkif->vbd;
 
 	xen_blkif_get(blkif);
 
@@ -271,7 +271,7 @@
 		if (try_to_freeze())
 			continue;
 		if (unlikely(vbd->size != vbd_sz(vbd)))
-			vbd_resize(blkif);
+			xen_vbd_resize(blkif);
 
 		wait_event_interruptible(
 			blkif->wq,
@@ -538,7 +538,7 @@
 		blkif->st_f_req++;
 		operation = WRITE_FLUSH;
 		/*
-		 * The frontend likes to set this to -1, which vbd_translate
+		 * The frontend likes to set this to -1, which xen_vbd_translate
 		 * is alergic too.
 		 */
 		req->u.rw.sector_number = 0;
@@ -580,7 +580,7 @@
 
 	}
 
-	if (vbd_translate(&preq, blkif, operation) != 0) {
+	if (xen_vbd_translate(&preq, blkif, operation) != 0) {
 		pr_debug(DRV_PFX "access denied: %s of [%llu,%llu] on dev=%04x\n",
 			 operation == READ ? "read" : "write",
 			 preq.sector_number,
@@ -589,7 +589,7 @@
 	}
 
 	/*
-	 * This check _MUST_ be done after vbd_translate as the preq.bdev
+	 * This check _MUST_ be done after xen_vbd_translate as the preq.bdev
 	 * is set there.
 	 */
 	for (i = 0; i < nseg; i++) {
diff --git a/drivers/block/xen-blkback/common.h b/drivers/block/xen-blkback/common.h
index 722c048..1e4ccde 100644
--- a/drivers/block/xen-blkback/common.h
+++ b/drivers/block/xen-blkback/common.h
@@ -113,7 +113,7 @@
 	BLKIF_PROTOCOL_X86_64 = 3,
 };
 
-struct vbd {
+struct xen_vbd {
 	/* What the domain refers to this vbd as. */
 	blkif_vdev_t		handle;
 	/* Non-zero -> read-only */
@@ -141,7 +141,7 @@
 	union blkif_back_rings	blk_rings;
 	struct vm_struct	*blk_ring_area;
 	/* The VBD attached to this interface. */
-	struct vbd		vbd;
+	struct xen_vbd		vbd;
 	/* Back pointer to the backend_info. */
 	struct backend_info	*be;
 	/* Private fields. */
diff --git a/drivers/block/xen-blkback/xenbus.c b/drivers/block/xen-blkback/xenbus.c
index f355f7a..e470d88 100644
--- a/drivers/block/xen-blkback/xenbus.c
+++ b/drivers/block/xen-blkback/xenbus.c
@@ -275,7 +275,7 @@
 VBD_SHOW(rd_sect, "%d\n", be->blkif->st_rd_sect);
 VBD_SHOW(wr_sect, "%d\n", be->blkif->st_wr_sect);
 
-static struct attribute *vbdstat_attrs[] = {
+static struct attribute *xen_vbdstat_attrs[] = {
 	&dev_attr_oo_req.attr,
 	&dev_attr_rd_req.attr,
 	&dev_attr_wr_req.attr,
@@ -285,9 +285,9 @@
 	NULL
 };
 
-static struct attribute_group vbdstat_group = {
+static struct attribute_group xen_vbdstat_group = {
 	.name = "statistics",
-	.attrs = vbdstat_attrs,
+	.attrs = xen_vbdstat_attrs,
 };
 
 VBD_SHOW(physical_device, "%x:%x\n", be->major, be->minor);
@@ -305,13 +305,13 @@
 	if (error)
 		goto fail2;
 
-	error = sysfs_create_group(&dev->dev.kobj, &vbdstat_group);
+	error = sysfs_create_group(&dev->dev.kobj, &xen_vbdstat_group);
 	if (error)
 		goto fail3;
 
 	return 0;
 
-fail3:	sysfs_remove_group(&dev->dev.kobj, &vbdstat_group);
+fail3:	sysfs_remove_group(&dev->dev.kobj, &xen_vbdstat_group);
 fail2:	device_remove_file(&dev->dev, &dev_attr_mode);
 fail1:	device_remove_file(&dev->dev, &dev_attr_physical_device);
 	return error;
@@ -319,24 +319,24 @@
 
 void xenvbd_sysfs_delif(struct xenbus_device *dev)
 {
-	sysfs_remove_group(&dev->dev.kobj, &vbdstat_group);
+	sysfs_remove_group(&dev->dev.kobj, &xen_vbdstat_group);
 	device_remove_file(&dev->dev, &dev_attr_mode);
 	device_remove_file(&dev->dev, &dev_attr_physical_device);
 }
 
 
-static void vbd_free(struct vbd *vbd)
+static void xen_vbd_free(struct xen_vbd *vbd)
 {
 	if (vbd->bdev)
 		blkdev_put(vbd->bdev, vbd->readonly ? FMODE_READ : FMODE_WRITE);
 	vbd->bdev = NULL;
 }
 
-static int vbd_create(struct xen_blkif *blkif, blkif_vdev_t handle,
-		      unsigned major, unsigned minor, int readonly,
-		      int cdrom)
+static int xen_vbd_create(struct xen_blkif *blkif, blkif_vdev_t handle,
+			  unsigned major, unsigned minor, int readonly,
+			  int cdrom)
 {
-	struct vbd *vbd;
+	struct xen_vbd *vbd;
 	struct block_device *bdev;
 	struct request_queue *q;
 
@@ -351,7 +351,7 @@
 				 FMODE_READ : FMODE_WRITE, NULL);
 
 	if (IS_ERR(bdev)) {
-		DPRINTK("vbd_create: device %08x could not be opened.\n",
+		DPRINTK("xen_vbd_create: device %08x could not be opened.\n",
 			vbd->pdevice);
 		return -ENOENT;
 	}
@@ -360,9 +360,9 @@
 	vbd->size = vbd_sz(vbd);
 
 	if (vbd->bdev->bd_disk == NULL) {
-		DPRINTK("vbd_create: device %08x doesn't exist.\n",
+		DPRINTK("xen_vbd_create: device %08x doesn't exist.\n",
 			vbd->pdevice);
-		vbd_free(vbd);
+		xen_vbd_free(vbd);
 		return -ENOENT;
 	}
 
@@ -396,7 +396,7 @@
 
 	if (be->blkif) {
 		xen_blkif_disconnect(be->blkif);
-		vbd_free(&be->blkif->vbd);
+		xen_vbd_free(&be->blkif->vbd);
 		xen_blkif_free(be->blkif);
 		be->blkif = NULL;
 	}
@@ -535,7 +535,7 @@
 		be->major = major;
 		be->minor = minor;
 
-		err = vbd_create(be->blkif, handle, major, minor,
+		err = xen_vbd_create(be->blkif, handle, major, minor,
 				 (NULL == strchr(be->mode, 'w')), cdrom);
 		if (err) {
 			be->major = 0;
@@ -546,7 +546,7 @@
 
 		err = xenvbd_sysfs_addif(dev);
 		if (err) {
-			vbd_free(&be->blkif->vbd);
+			xen_vbd_free(&be->blkif->vbd);
 			be->major = 0;
 			be->minor = 0;
 			xenbus_dev_fatal(dev, err, "creating sysfs entries");