From: Milan Broz <mbroz@redhat.com>
To: Marti Raudsepp <marti@juffo.org>
Cc: Christophe Saout <christophe@saout.de>,
Kernel hackers <linux-kernel@vger.kernel.org>,
device-mapper development <dm-devel@redhat.com>,
Lennart Sorensen <lsorense@csclub.uwaterloo.ca>,
Andrew Morton <akpm@linux-foundation.org>,
Alasdair G Kergon <agk@redhat.com>
Subject: [PATCH] disable barriers in dm-crypt [was Re: BUG: Files corrupt after moving LVM volume to USB disk]
Date: Fri, 23 Mar 2007 15:45:26 +0100 [thread overview]
Message-ID: <4603E806.3030205@redhat.com> (raw)
In-Reply-To: <2a12af650703221742p6691f4b5i21667a5c98217fb6@mail.gmail.com>
> 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@redhat.com
From: Milan Broz <mbroz@redhat.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@redhat.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;
WARNING: multiple messages have this Message-ID (diff)
From: Milan Broz <mbroz@redhat.com>
To: Marti Raudsepp <marti@juffo.org>
Cc: Alasdair G Kergon <agk@redhat.com>,
Lennart Sorensen <lsorense@csclub.uwaterloo.ca>,
device-mapper development <dm-devel@redhat.com>,
Kernel hackers <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Christophe Saout <christophe@saout.de>
Subject: [PATCH] disable barriers in dm-crypt [was Re: BUG: Files corrupt after moving LVM volume to USB disk]
Date: Fri, 23 Mar 2007 15:45:26 +0100 [thread overview]
Message-ID: <4603E806.3030205@redhat.com> (raw)
In-Reply-To: <2a12af650703221742p6691f4b5i21667a5c98217fb6@mail.gmail.com>
> 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@redhat.com
From: Milan Broz <mbroz@redhat.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@redhat.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;
next prev parent reply other threads:[~2007-03-23 14:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-22 8:03 Fw: BUG: Files corrupt after moving LVM volume to USB disk Andrew Morton
2007-03-22 15:33 ` Alasdair G Kergon
2007-03-23 0:42 ` [dm-devel] " Marti Raudsepp
2007-03-23 14:45 ` Milan Broz [this message]
2007-03-23 14:45 ` [PATCH] disable barriers in dm-crypt [was Re: BUG: Files corrupt after moving LVM volume to USB disk] Milan Broz
2007-03-26 0:05 ` Marti Raudsepp
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4603E806.3030205@redhat.com \
--to=mbroz@redhat.com \
--cc=agk@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=christophe@saout.de \
--cc=dm-devel@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lsorense@csclub.uwaterloo.ca \
--cc=marti@juffo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.