From: Milan Broz Date: Wed, 9 May 2007 09:32:51 +0000 (-0700) Subject: dm crypt: disable barriers X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=9c89f8be1a7d14aad9d2c3f7d90d7d88f82c61e2;p=linux-beck.git dm crypt: disable barriers 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 Signed-off-by: Alasdair G Kergon Cc: Jens Axboe Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c index d8121234c347..8527827b24f1 100644 --- a/drivers/md/dm-crypt.c +++ b/drivers/md/dm-crypt.c @@ -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;