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

[dm-devel] [PATCH 12/17] bottom-layer barrier support



dm-delay-flush.patch

Flush supoprt for dm-delay target.

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

---
 drivers/md/dm-delay.c |    3 +++
 1 file changed, 3 insertions(+)

Index: linux-2.6.30-rc1-devel/drivers/md/dm-delay.c
===================================================================
--- linux-2.6.30-rc1-devel.orig/drivers/md/dm-delay.c	2009-04-10 06:28:25.000000000 +0200
+++ linux-2.6.30-rc1-devel/drivers/md/dm-delay.c	2009-04-10 06:33:45.000000000 +0200
@@ -198,6 +198,7 @@ out:
 	mutex_init(&dc->timer_lock);
 	atomic_set(&dc->may_delay, 1);
 
+	ti->num_flush_requests = 1;
 	ti->private = dc;
 	return 0;
 
@@ -281,6 +282,8 @@ static int delay_map(struct dm_target *t
 		bio->bi_bdev = dc->dev_write->bdev;
 		bio->bi_sector = dc->start_write +
 				 (bio->bi_sector - ti->begin);
+		if (!bio_sectors(bio))
+			bio->bi_sector = 0;
 
 		return delay_bio(dc, dc->write_delay, bio);
 	}


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