Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 433bcac5 authored by Mikulas Patocka's avatar Mikulas Patocka Committed by Alasdair G Kergon
Browse files

dm: linear support flush



Flush support for the linear target.

Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
Signed-off-by: default avatarAlasdair G Kergon <agk@redhat.com>
parent 52b1fd5a
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -53,6 +53,7 @@ static int linear_ctr(struct dm_target *ti, unsigned int argc, char **argv)
		goto bad;
	}

	ti->num_flush_requests = 1;
	ti->private = lc;
	return 0;

@@ -81,6 +82,7 @@ static void linear_map_bio(struct dm_target *ti, struct bio *bio)
	struct linear_c *lc = ti->private;

	bio->bi_bdev = lc->dev->bdev;
	if (bio_sectors(bio))
		bio->bi_sector = linear_map_sector(ti, bio->bi_sector);
}