]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
[PATCH] dm crypt: disable barriers
authorMilan Broz <mbroz@redhat.com>
Wed, 13 Jun 2007 19:56:39 +0000 (15:56 -0400)
committerWilly Tarreau <w@1wt.eu>
Wed, 15 Aug 2007 08:02:28 +0000 (10:02 +0200)
Disable barriers in dm-crypt because of current workqueue processing can
reorder requests.

This must be addresed later but for now disabling barriers is needed to
prevent data corruption.

Signed-off-by: Milan Broz <mbroz@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Cc: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/md/dm-crypt.c

index 4c2471ee054aa099a8777de111e7b219fe6c6eb9..f68677d13c4a7683f43f6d793b8c276b02314914 100644 (file)
@@ -954,6 +954,9 @@ static int crypt_map(struct dm_target *ti, struct bio *bio,
        struct crypt_config *cc = ti->private;
        struct crypt_io *io;
 
+       if (bio_barrier(bio))
+               return -EOPNOTSUPP;
+
        io = mempool_alloc(cc->io_pool, GFP_NOIO);
        io->target = ti;
        io->base_bio = bio;