diff options
author | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2011-05-12 16:53:56 -0400 |
---|---|---|
committer | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2011-05-12 17:55:52 -0400 |
commit | 3d814731ba67f9514bdf380c1b95dd852ac82a2f (patch) | |
tree | a7d0a5681b431524171b41cba86854f547c0a5eb /drivers/block/xen-blkback/xenbus.c | |
parent | 30fd150202fb2d08a62f9c2966a4b1fcf2e861e7 (diff) |
xen/blkback: Prefix 'vbd' with 'xen' in structs and functions.
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Diffstat (limited to 'drivers/block/xen-blkback/xenbus.c')
-rw-r--r-- | drivers/block/xen-blkback/xenbus.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/drivers/block/xen-blkback/xenbus.c b/drivers/block/xen-blkback/xenbus.c index f355f7a5d52d..e470d8869053 100644 --- a/drivers/block/xen-blkback/xenbus.c +++ b/drivers/block/xen-blkback/xenbus.c | |||
@@ -275,7 +275,7 @@ VBD_SHOW(f_req, "%d\n", be->blkif->st_f_req); | |||
275 | VBD_SHOW(rd_sect, "%d\n", be->blkif->st_rd_sect); | 275 | VBD_SHOW(rd_sect, "%d\n", be->blkif->st_rd_sect); |
276 | VBD_SHOW(wr_sect, "%d\n", be->blkif->st_wr_sect); | 276 | VBD_SHOW(wr_sect, "%d\n", be->blkif->st_wr_sect); |
277 | 277 | ||
278 | static struct attribute *vbdstat_attrs[] = { | 278 | static struct attribute *xen_vbdstat_attrs[] = { |
279 | &dev_attr_oo_req.attr, | 279 | &dev_attr_oo_req.attr, |
280 | &dev_attr_rd_req.attr, | 280 | &dev_attr_rd_req.attr, |
281 | &dev_attr_wr_req.attr, | 281 | &dev_attr_wr_req.attr, |
@@ -285,9 +285,9 @@ static struct attribute *vbdstat_attrs[] = { | |||
285 | NULL | 285 | NULL |
286 | }; | 286 | }; |
287 | 287 | ||
288 | static struct attribute_group vbdstat_group = { | 288 | static struct attribute_group xen_vbdstat_group = { |
289 | .name = "statistics", | 289 | .name = "statistics", |
290 | .attrs = vbdstat_attrs, | 290 | .attrs = xen_vbdstat_attrs, |
291 | }; | 291 | }; |
292 | 292 | ||
293 | VBD_SHOW(physical_device, "%x:%x\n", be->major, be->minor); | 293 | VBD_SHOW(physical_device, "%x:%x\n", be->major, be->minor); |
@@ -305,13 +305,13 @@ int xenvbd_sysfs_addif(struct xenbus_device *dev) | |||
305 | if (error) | 305 | if (error) |
306 | goto fail2; | 306 | goto fail2; |
307 | 307 | ||
308 | error = sysfs_create_group(&dev->dev.kobj, &vbdstat_group); | 308 | error = sysfs_create_group(&dev->dev.kobj, &xen_vbdstat_group); |
309 | if (error) | 309 | if (error) |
310 | goto fail3; | 310 | goto fail3; |
311 | 311 | ||
312 | return 0; | 312 | return 0; |
313 | 313 | ||
314 | fail3: sysfs_remove_group(&dev->dev.kobj, &vbdstat_group); | 314 | fail3: sysfs_remove_group(&dev->dev.kobj, &xen_vbdstat_group); |
315 | fail2: device_remove_file(&dev->dev, &dev_attr_mode); | 315 | fail2: device_remove_file(&dev->dev, &dev_attr_mode); |
316 | fail1: device_remove_file(&dev->dev, &dev_attr_physical_device); | 316 | fail1: device_remove_file(&dev->dev, &dev_attr_physical_device); |
317 | return error; | 317 | return error; |
@@ -319,24 +319,24 @@ fail1: device_remove_file(&dev->dev, &dev_attr_physical_device); | |||
319 | 319 | ||
320 | void xenvbd_sysfs_delif(struct xenbus_device *dev) | 320 | void xenvbd_sysfs_delif(struct xenbus_device *dev) |
321 | { | 321 | { |
322 | sysfs_remove_group(&dev->dev.kobj, &vbdstat_group); | 322 | sysfs_remove_group(&dev->dev.kobj, &xen_vbdstat_group); |
323 | device_remove_file(&dev->dev, &dev_attr_mode); | 323 | device_remove_file(&dev->dev, &dev_attr_mode); |
324 | device_remove_file(&dev->dev, &dev_attr_physical_device); | 324 | device_remove_file(&dev->dev, &dev_attr_physical_device); |
325 | } | 325 | } |
326 | 326 | ||
327 | 327 | ||
328 | static void vbd_free(struct vbd *vbd) | 328 | static void xen_vbd_free(struct xen_vbd *vbd) |
329 | { | 329 | { |
330 | if (vbd->bdev) | 330 | if (vbd->bdev) |
331 | blkdev_put(vbd->bdev, vbd->readonly ? FMODE_READ : FMODE_WRITE); | 331 | blkdev_put(vbd->bdev, vbd->readonly ? FMODE_READ : FMODE_WRITE); |
332 | vbd->bdev = NULL; | 332 | vbd->bdev = NULL; |
333 | } | 333 | } |
334 | 334 | ||
335 | static int vbd_create(struct xen_blkif *blkif, blkif_vdev_t handle, | 335 | static int xen_vbd_create(struct xen_blkif *blkif, blkif_vdev_t handle, |
336 | unsigned major, unsigned minor, int readonly, | 336 | unsigned major, unsigned minor, int readonly, |
337 | int cdrom) | 337 | int cdrom) |
338 | { | 338 | { |
339 | struct vbd *vbd; | 339 | struct xen_vbd *vbd; |
340 | struct block_device *bdev; | 340 | struct block_device *bdev; |
341 | struct request_queue *q; | 341 | struct request_queue *q; |
342 | 342 | ||
@@ -351,7 +351,7 @@ static int vbd_create(struct xen_blkif *blkif, blkif_vdev_t handle, | |||
351 | FMODE_READ : FMODE_WRITE, NULL); | 351 | FMODE_READ : FMODE_WRITE, NULL); |
352 | 352 | ||
353 | if (IS_ERR(bdev)) { | 353 | if (IS_ERR(bdev)) { |
354 | DPRINTK("vbd_create: device %08x could not be opened.\n", | 354 | DPRINTK("xen_vbd_create: device %08x could not be opened.\n", |
355 | vbd->pdevice); | 355 | vbd->pdevice); |
356 | return -ENOENT; | 356 | return -ENOENT; |
357 | } | 357 | } |
@@ -360,9 +360,9 @@ static int vbd_create(struct xen_blkif *blkif, blkif_vdev_t handle, | |||
360 | vbd->size = vbd_sz(vbd); | 360 | vbd->size = vbd_sz(vbd); |
361 | 361 | ||
362 | if (vbd->bdev->bd_disk == NULL) { | 362 | if (vbd->bdev->bd_disk == NULL) { |
363 | DPRINTK("vbd_create: device %08x doesn't exist.\n", | 363 | DPRINTK("xen_vbd_create: device %08x doesn't exist.\n", |
364 | vbd->pdevice); | 364 | vbd->pdevice); |
365 | vbd_free(vbd); | 365 | xen_vbd_free(vbd); |
366 | return -ENOENT; | 366 | return -ENOENT; |
367 | } | 367 | } |
368 | 368 | ||
@@ -396,7 +396,7 @@ static int xen_blkbk_remove(struct xenbus_device *dev) | |||
396 | 396 | ||
397 | if (be->blkif) { | 397 | if (be->blkif) { |
398 | xen_blkif_disconnect(be->blkif); | 398 | xen_blkif_disconnect(be->blkif); |
399 | vbd_free(&be->blkif->vbd); | 399 | xen_vbd_free(&be->blkif->vbd); |
400 | xen_blkif_free(be->blkif); | 400 | xen_blkif_free(be->blkif); |
401 | be->blkif = NULL; | 401 | be->blkif = NULL; |
402 | } | 402 | } |
@@ -535,7 +535,7 @@ static void backend_changed(struct xenbus_watch *watch, | |||
535 | be->major = major; | 535 | be->major = major; |
536 | be->minor = minor; | 536 | be->minor = minor; |
537 | 537 | ||
538 | err = vbd_create(be->blkif, handle, major, minor, | 538 | err = xen_vbd_create(be->blkif, handle, major, minor, |
539 | (NULL == strchr(be->mode, 'w')), cdrom); | 539 | (NULL == strchr(be->mode, 'w')), cdrom); |
540 | if (err) { | 540 | if (err) { |
541 | be->major = 0; | 541 | be->major = 0; |
@@ -546,7 +546,7 @@ static void backend_changed(struct xenbus_watch *watch, | |||
546 | 546 | ||
547 | err = xenvbd_sysfs_addif(dev); | 547 | err = xenvbd_sysfs_addif(dev); |
548 | if (err) { | 548 | if (err) { |
549 | vbd_free(&be->blkif->vbd); | 549 | xen_vbd_free(&be->blkif->vbd); |
550 | be->major = 0; | 550 | be->major = 0; |
551 | be->minor = 0; | 551 | be->minor = 0; |
552 | xenbus_dev_fatal(dev, err, "creating sysfs entries"); | 552 | xenbus_dev_fatal(dev, err, "creating sysfs entries"); |