dm delay: support barriers
Flush support for dm-delay target. Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
This commit is contained in:
parent
647c7db14e
commit
c927259e34
|
@ -197,6 +197,7 @@ out:
|
|||
mutex_init(&dc->timer_lock);
|
||||
atomic_set(&dc->may_delay, 1);
|
||||
|
||||
ti->num_flush_requests = 1;
|
||||
ti->private = dc;
|
||||
return 0;
|
||||
|
||||
|
@ -278,6 +279,7 @@ static int delay_map(struct dm_target *ti, struct bio *bio,
|
|||
|
||||
if ((bio_data_dir(bio) == WRITE) && (dc->dev_write)) {
|
||||
bio->bi_bdev = dc->dev_write->bdev;
|
||||
if (bio_sectors(bio))
|
||||
bio->bi_sector = dc->start_write +
|
||||
(bio->bi_sector - ti->begin);
|
||||
|
||||
|
|
Loading…
Reference in New Issue