From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.saout.de ([127.0.0.1]) by localhost (mail.saout.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HCCGdgdvg7SR for ; Wed, 25 Jan 2012 19:20:48 +0100 (CET) Received: from mail-gx0-f178.google.com (mail-gx0-f178.google.com [209.85.161.178]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by mail.saout.de (Postfix) with ESMTPS for ; Wed, 25 Jan 2012 19:20:47 +0100 (CET) Received: by ggnp1 with SMTP id p1so3151087ggn.37 for ; Wed, 25 Jan 2012 10:20:46 -0800 (PST) Sender: Mandeep Baines Date: Wed, 25 Jan 2012 10:20:27 -0800 From: Mandeep Singh Baines Message-ID: <20120125182027.GJ4656@google.com> References: <20120125021413.GI4656@google.com> <1327478794.47118.YahooMailClassic@web24104.mail.ird.yahoo.com> MIME-Version: 1.0 In-Reply-To: <1327478794.47118.YahooMailClassic@web24104.mail.ird.yahoo.com> Content-Type: text/plain; charset="iso-8859-1" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Subject: Re: [dm-crypt] Kernel BUG (fs/bio.c:1499) when copying more files to an encrypted device List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Luzipher McLeod Cc: dm-crypt@saout.de, Mandeep Singh Baines Luzipher McLeod (luziphermcleod@yahoo.ie) wrote: > Hi Mandeep, >=20 > Thanks fpr your quick answer. So, what can be done about this ? Should I = try to apply that patch you linked to ? (but I guess a patch from 2007 won'= t apply cleanly ...) >=20 Hi Luzipher, I wouldn't apply the patch directly. Just copy bio_multi_split (might need to do some forward porting) and then modify linear_make_request to use bio_multi_split instead of bio_split. But I'm not really an expert on this particular code. I'm hoping someone else will confirm that this is in fact the bug and not a side effect of something else. Its seem reasonble that you could get a bio that is multi-page and falls on a boundary (spans two or more devices). So I suspect this is the bug. Regards, Mandeep > Regards, > Luzipher >=20 >=20 >=20 > --- On Wed, 25/1/12, Mandeep Singh Baines wrote: >=20 > > From: Mandeep Singh Baines > > Subject: Re: [dm-crypt] Kernel BUG (fs/bio.c:1499) when copying more fi= les to an encrypted device > > To: "Luzipher McLeod" > > Cc: dm-crypt@saout.de, "NeilBrown" > > Date: Wednesday, 25 January, 2012, 2:14 > > Luzipher McLeod (luziphermcleod@yahoo.ie) > > wrote: > > > Hi :-) > > >=20 > > > A few days ago I encountered a kernel bug while copying > > files to an encrypted filesystem. The specific stack for the > > filesystem is: btrfs-on-crypt-on-mdraid. Vasts amounts of > > data copied without problems (about 6.3TB with 1.1 TB > > remaining), but when copying a certain directory, the kernel > > bug surfaces. I repeatedly deleted the affected directory > > and tried to re-copy it, but it always fails at the same > > point (or close to that). More recent test showed that I > > could copy a few more files to the filesystem to a different > > directory, but it very quickly failed there as well (a few > > megabytes later). > > > After talking to the btrfs devs on freenode (as btrfs > > is the most experimental thing in the stack, they came to > > the conclusion that it's most probably the crypto layer. > > >=20 > > > Some details: > > > gentoo kernel 3.2.1 (custom config and ubuntu config) > > > mdraid: linear, 4 disks, each 2TB (total 8TB) > > > crypt: setup via cryptsetup -c aes-xts-plain64 -h plain > > -s 512 -d - create tempraid /dev/md/tempraid_lin > > >=20 > > > I'd appreciate any help with this and would be happy to > > test patches or provide more debug info. > > >=20 > > > Thanks and Regards, > > > Luzipher > > >=20 > > >=20 > > >=20 > > >=20 > > > The kernel bug output retrieved by netconsole (also at > > http://pastebin.com/sjJy7QE4 ): > > >=A0 =A0=A0=A0[=A0 294.538422] netconsole: > > local port 6666 > > >=A0 =A0=A0=A0[=A0 333.423583] SysRq : > > Changing Loglevel > > >=A0 =A0=A0=A0[=A0 333.423609] Loglevel > > set to 9 > > >=A0 =A0=A0=A0[=A0 424.248405] > > ------------[ cut here ]------------ > > >=A0 =A0=A0=A0[=A0 424.248447] kernel BUG > > at fs/bio.c:1499! > >=20 > > Hi Luzipher, > >=20 > > Looks like the BUG is because bio_split only works on > > single-page iovecs. > >=20 > > I see a relevant (old) patch from Neil Brown here: > >=20 > > https://lkml.org/lkml/2007/7/30/496 > >=20 > > Regards, > > Mandeep > >=20 >=20