Skip to contentSkip to conversation

linux-2.6.18/blkback: failure of writing "feature-barrier" node is non-fatal

PATCH New Jan Beulich 1 participant 1 message Mar 14, 2012 Xen hypervisor interface

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 linux-2.6.18/blkback: failure of writing "feature-barrier" node is non-fatal

This is an extension, and whether this is a requirement should be decided by the frontend.

drivers/xen/blkback/common.h +2 -2
@@ -138,7 +138,7 @@ void blkif_xenbus_init(void);
 irqreturn_t blkif_be_int(int irq, void *dev_id, struct pt_regs *regs);
 int blkif_schedule(void *arg);
 
-int blkback_barrier(struct xenbus_transaction xbt,
-		    struct backend_info *be, int state);
+void blkback_barrier(struct xenbus_transaction, struct backend_info *,
+		     int state);
 
 #endif /* __BLKIF__BACKEND__COMMON_H__ */
drivers/xen/blkback/xenbus.c +6 -11
@@ -204,18 +204,15 @@ static int blkback_remove(struct xenbus_
 	return 0;
 }
 
-int blkback_barrier(struct xenbus_transaction xbt,
-		    struct backend_info *be, int state)
+void blkback_barrier(struct xenbus_transaction xbt,
+		     struct backend_info *be, int state)
 {
 	struct xenbus_device *dev = be->dev;
-	int err;
+	int err = xenbus_printf(xbt, dev->nodename, "feature-barrier",
+				"%d", state);
 
-	err = xenbus_printf(xbt, dev->nodename, "feature-barrier",
-			    "%d", state);
 	if (err)
-		xenbus_dev_fatal(dev, err, "writing feature-barrier");
-
-	return err;
+		xenbus_dev_error(dev, err, "writing feature-barrier");
 }
 
 /**
@@ -435,9 +432,7 @@ again:
 		return;
 	}
 
-	err = blkback_barrier(xbt, be, 1);
-	if (err)
-		goto abort;
+	blkback_barrier(xbt, be, 1);
 
 	err = xenbus_printf(xbt, dev->nodename, "sectors", "%llu",
 			    vbd_size(&be->blkif->vbd));

blkback: failure of writing "feature-barrier" node is non-fatal

This is an extension, and whether this is a requirement should be decided by the frontend.

drivers/xen/blkback/common.h +2 -2
@@ -138,7 +138,7 @@ void blkif_xenbus_init(void);
 irqreturn_t blkif_be_int(int irq, void *dev_id, struct pt_regs *regs);
 int blkif_schedule(void *arg);
 
-int blkback_barrier(struct xenbus_transaction xbt,
-		    struct backend_info *be, int state);
+void blkback_barrier(struct xenbus_transaction, struct backend_info *,
+		     int state);
 
 #endif /* __BLKIF__BACKEND__COMMON_H__ */
drivers/xen/blkback/xenbus.c +6 -11
@@ -204,18 +204,15 @@ static int blkback_remove(struct xenbus_
 	return 0;
 }
 
-int blkback_barrier(struct xenbus_transaction xbt,
-		    struct backend_info *be, int state)
+void blkback_barrier(struct xenbus_transaction xbt,
+		     struct backend_info *be, int state)
 {
 	struct xenbus_device *dev = be->dev;
-	int err;
+	int err = xenbus_printf(xbt, dev->nodename, "feature-barrier",
+				"%d", state);
 
-	err = xenbus_printf(xbt, dev->nodename, "feature-barrier",
-			    "%d", state);
 	if (err)
-		xenbus_dev_fatal(dev, err, "writing feature-barrier");
-
-	return err;
+		xenbus_dev_error(dev, err, "writing feature-barrier");
 }
 
 /**
@@ -435,9 +432,7 @@ again:
 		return;
 	}
 
-	err = blkback_barrier(xbt, be, 1);
-	if (err)
-		goto abort;
+	blkback_barrier(xbt, be, 1);
 
 	err = xenbus_printf(xbt, dev->nodename, "sectors", "%llu",
 			    vbd_size(&be->blkif->vbd));

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel