diff options
author | Mikulas Patocka <mpatocka@redhat.com> | 2009-06-22 10:12:23 +0100 |
---|---|---|
committer | Alasdair G Kergon <agk@redhat.com> | 2009-06-22 10:12:23 +0100 |
commit | 647c7db14ef9cacc4ccb3683e206b61f0de6dc2b (patch) | |
tree | 4ef2475e295813dcce1123f2c74ba04061db1b7e /drivers/md/dm-crypt.c | |
parent | 374bf7e7f6cc38b0483351a2029a97910eadde1b (diff) | |
download | linux-647c7db14ef9cacc4ccb3683e206b61f0de6dc2b.tar.bz2 |
dm crypt: support flush
Flush support for dm-crypt target.
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Diffstat (limited to 'drivers/md/dm-crypt.c')
-rw-r--r-- | drivers/md/dm-crypt.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c index 53394e863c74..04db6c4004a8 100644 --- a/drivers/md/dm-crypt.c +++ b/drivers/md/dm-crypt.c @@ -1132,6 +1132,7 @@ static int crypt_ctr(struct dm_target *ti, unsigned int argc, char **argv) goto bad_crypt_queue; } + ti->num_flush_requests = 1; ti->private = cc; return 0; @@ -1189,6 +1190,13 @@ static int crypt_map(struct dm_target *ti, struct bio *bio, union map_info *map_context) { struct dm_crypt_io *io; + struct crypt_config *cc; + + if (unlikely(bio_empty_barrier(bio))) { + cc = ti->private; + bio->bi_bdev = cc->dev->bdev; + return DM_MAPIO_REMAPPED; + } io = crypt_io_alloc(ti, bio, bio->bi_sector - ti->begin); |