aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/xen-blkback/xenbus.c
diff options
context:
space:
mode:
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>2011-05-11 15:57:09 -0400
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>2011-05-11 15:57:09 -0400
commit01f37f2d53e14a05b7fc3601d182f31ac3b35847 (patch)
treeb12e0eb77888710865ad577f3735a550f57a7242 /drivers/block/xen-blkback/xenbus.c
parent3d68b39926b3b247d76cc4da0256e979b2b730e3 (diff)
xen/blkback: Fixed up comments and converted spaces to tabs.
Suggested-by: Ian Campbell <Ian.Campbell@eu.citrix.com> 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.c39
1 files changed, 22 insertions, 17 deletions
diff --git a/drivers/block/xen-blkback/xenbus.c b/drivers/block/xen-blkback/xenbus.c
index 9adcf806f83f..0cda406b4edb 100644
--- a/drivers/block/xen-blkback/xenbus.c
+++ b/drivers/block/xen-blkback/xenbus.c
@@ -27,12 +27,12 @@
27 __func__, __LINE__, ##args) 27 __func__, __LINE__, ##args)
28 28
29struct backend_info { 29struct backend_info {
30 struct xenbus_device *dev; 30 struct xenbus_device *dev;
31 struct blkif_st *blkif; 31 struct blkif_st *blkif;
32 struct xenbus_watch backend_watch; 32 struct xenbus_watch backend_watch;
33 unsigned major; 33 unsigned major;
34 unsigned minor; 34 unsigned minor;
35 char *mode; 35 char *mode;
36}; 36};
37 37
38static struct kmem_cache *xen_blkif_cachep; 38static struct kmem_cache *xen_blkif_cachep;
@@ -425,7 +425,7 @@ int xen_blkbk_flush_diskcache(struct xenbus_transaction xbt,
425 return err; 425 return err;
426} 426}
427 427
428/** 428/*
429 * Entry point to this code when a new device is created. Allocate the basic 429 * Entry point to this code when a new device is created. Allocate the basic
430 * structures, and watch the store waiting for the hotplug scripts to tell us 430 * structures, and watch the store waiting for the hotplug scripts to tell us
431 * the device's physical major and minor numbers. Switch to InitWait. 431 * the device's physical major and minor numbers. Switch to InitWait.
@@ -473,7 +473,7 @@ fail:
473} 473}
474 474
475 475
476/** 476/*
477 * Callback received when the hotplug scripts have placed the physical-device 477 * Callback received when the hotplug scripts have placed the physical-device
478 * node. Read it and the mode node, and create a vbd. If the frontend is 478 * node. Read it and the mode node, and create a vbd. If the frontend is
479 * ready, connect. 479 * ready, connect.
@@ -495,9 +495,11 @@ static void backend_changed(struct xenbus_watch *watch,
495 err = xenbus_scanf(XBT_NIL, dev->nodename, "physical-device", "%x:%x", 495 err = xenbus_scanf(XBT_NIL, dev->nodename, "physical-device", "%x:%x",
496 &major, &minor); 496 &major, &minor);
497 if (XENBUS_EXIST_ERR(err)) { 497 if (XENBUS_EXIST_ERR(err)) {
498 /* Since this watch will fire once immediately after it is 498 /*
499 registered, we expect this. Ignore it, and wait for the 499 * Since this watch will fire once immediately after it is
500 hotplug scripts. */ 500 * registered, we expect this. Ignore it, and wait for the
501 * hotplug scripts.
502 */
501 return; 503 return;
502 } 504 }
503 if (err != 2) { 505 if (err != 2) {
@@ -562,7 +564,7 @@ static void backend_changed(struct xenbus_watch *watch,
562} 564}
563 565
564 566
565/** 567/*
566 * Callback received when the frontend's state changes. 568 * Callback received when the frontend's state changes.
567 */ 569 */
568static void frontend_changed(struct xenbus_device *dev, 570static void frontend_changed(struct xenbus_device *dev,
@@ -584,13 +586,16 @@ static void frontend_changed(struct xenbus_device *dev,
584 586
585 case XenbusStateInitialised: 587 case XenbusStateInitialised:
586 case XenbusStateConnected: 588 case XenbusStateConnected:
587 /* Ensure we connect even when two watches fire in 589 /*
588 close successsion and we miss the intermediate value 590 * Ensure we connect even when two watches fire in
589 of frontend_state. */ 591 * close successsion and we miss the intermediate value
592 * of frontend_state.
593 */
590 if (dev->state == XenbusStateConnected) 594 if (dev->state == XenbusStateConnected)
591 break; 595 break;
592 596
593 /* Enforce precondition before potential leak point. 597 /*
598 * Enforce precondition before potential leak point.
594 * blkif_disconnect() is idempotent. 599 * blkif_disconnect() is idempotent.
595 */ 600 */
596 xen_blkif_disconnect(be->blkif); 601 xen_blkif_disconnect(be->blkif);
@@ -627,7 +632,7 @@ static void frontend_changed(struct xenbus_device *dev,
627/* ** Connection ** */ 632/* ** Connection ** */
628 633
629 634
630/** 635/*
631 * Write the physical details regarding the block device to the store, and 636 * Write the physical details regarding the block device to the store, and
632 * switch to Connected state. 637 * switch to Connected state.
633 */ 638 */