[dm-devel] [PATCH 1/11] bottom-layer barrier support
Mikulas Patocka
mpatocka at redhat.com
Fri Apr 10 05:10:32 UTC 2009
Make dm_flush return void. Errors will be signalled in a different way.
Signed-off-by: Mikulas Patocka <mpatocka at redhat.com>
---
drivers/md/dm.c | 17 +++++------------
1 file changed, 5 insertions(+), 12 deletions(-)
Index: linux-2.6.30-rc1-devel/drivers/md/dm.c
===================================================================
--- linux-2.6.30-rc1-devel.orig/drivers/md/dm.c 2009-04-10 06:33:14.000000000 +0200
+++ linux-2.6.30-rc1-devel/drivers/md/dm.c 2009-04-10 06:33:17.000000000 +0200
@@ -1427,10 +1427,9 @@ 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;
}
/*
@@ -1459,24 +1458,18 @@ static void dm_wq_work(struct work_struc
if (!bio_barrier(c))
__split_and_process_bio(md, c);
else {
- int error = dm_flush(md);
- if (unlikely(error)) {
- bio_endio(c, error);
- goto next_bio;
- }
+ dm_flush(md);
+
if (bio_empty_barrier(c)) {
bio_endio(c, 0);
goto next_bio;
}
__split_and_process_bio(md, c);
-
- 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(c, error);
+ bio_endio(c, md->barrier_error);
}
next_bio:
More information about the dm-devel
mailing list