[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4603E806.3030205@redhat.com>
Date: Fri, 23 Mar 2007 15:45:26 +0100
From: Milan Broz <mbroz@...hat.com>
To: Marti Raudsepp <marti@...fo.org>
CC: Alasdair G Kergon <agk@...hat.com>,
Lennart Sorensen <lsorense@...lub.uwaterloo.ca>,
device-mapper development <dm-devel@...hat.com>,
Kernel hackers <linux-kernel@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Christophe Saout <christophe@...ut.de>
Subject: [PATCH] disable barriers in dm-crypt [was Re: BUG: Files corrupt
after moving LVM volume to USB disk]
> Summary of what I've managed to rule out so far:
>1. this problem does not occur without dm-crypt
Please could you test attached patch ?
Sorry for another annoying reboot :-)
Milan
--
mbroz@...hat.com
From: Milan Broz <mbroz@...hat.com>
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@...hat.com>
Index: linux-2.6.20.1/drivers/md/dm-crypt.c
===================================================================
--- linux-2.6.20.1.orig/drivers/md/dm-crypt.c 2007-03-23 15:07:11.000000000 +0100
+++ linux-2.6.20.1/drivers/md/dm-crypt.c 2007-03-23 15:09:59.000000000 +0100
@@ -925,6 +925,9 @@ static int crypt_map(struct dm_target *t
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;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists