[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[dm-devel] [PATCH 1/16] bottom-layer barrier support



dm-dm_flush-returns-void.patch

Make dm_flush return void. Errors will be signalled in a different way ---
the first error during barrier flush will be stored in md->barrier_error.

Signed-off-by: Mikulas Patocka <mpatocka redhat com>

---
 drivers/md/dm.c |   17 ++++-------------
 1 file changed, 4 insertions(+), 13 deletions(-)

Index: linux-2.6.30-rc2-devel/drivers/md/dm.c
===================================================================
--- linux-2.6.30-rc2-devel.orig/drivers/md/dm.c	2009-04-15 16:24:25.000000000 +0200
+++ linux-2.6.30-rc2-devel/drivers/md/dm.c	2009-04-15 16:29:51.000000000 +0200
@@ -1442,34 +1442,25 @@ static int dm_wait_for_completion(struct
 	return r;
 }
 
-static int dm_flush(struct mapped_device *md)
+static void dm_flush(struct mapped_device *md)
 {
 	dm_wait_for_completion(md, TASK_UNINTERRUPTIBLE);
-	return 0;
 }
 
 static void process_barrier(struct mapped_device *md, struct bio *bio)
 {
-	int error = dm_flush(md);
+	dm_flush(md);
 
-	if (unlikely(error)) {
-		bio_endio(bio, error);
-		return;
-	}
 	if (bio_empty_barrier(bio)) {
 		bio_endio(bio, 0);
 		return;
 	}
 
 	__split_and_process_bio(md, bio);
-
-	error = dm_flush(md);
-
-	if (!error && md->barrier_error)
-		error = md->barrier_error;
+	dm_flush(md);
 
 	if (md->barrier_error != DM_ENDIO_REQUEUE)
-		bio_endio(bio, error);
+		bio_endio(bio, md->barrier_error);
 }
 
 /*


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]