All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mandeep Singh Baines <msb@chromium.org>
To: Luzipher McLeod <luziphermcleod@yahoo.ie>
Cc: dm-crypt@saout.de, Mandeep Singh Baines <msb@chromium.org>
Subject: Re: [dm-crypt] Kernel BUG (fs/bio.c:1499) when copying more files to an encrypted device
Date: Wed, 25 Jan 2012 10:20:27 -0800	[thread overview]
Message-ID: <20120125182027.GJ4656@google.com> (raw)
In-Reply-To: <1327478794.47118.YahooMailClassic@web24104.mail.ird.yahoo.com>

Luzipher McLeod (luziphermcleod@yahoo.ie) wrote:
> Hi Mandeep,
> 
> 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 ...)
> 

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
> 
> 
> 
> --- On Wed, 25/1/12, Mandeep Singh Baines <msb@chromium.org> wrote:
> 
> > From: Mandeep Singh Baines <msb@chromium.org>
> > Subject: Re: [dm-crypt] Kernel BUG (fs/bio.c:1499) when copying more files to an encrypted device
> > To: "Luzipher McLeod" <luziphermcleod@yahoo.ie>
> > Cc: dm-crypt@saout.de, "NeilBrown" <neilb@suse.de>
> > Date: Wednesday, 25 January, 2012, 2:14
> > Luzipher McLeod (luziphermcleod@yahoo.ie)
> > wrote:
> > > Hi :-)
> > > 
> > > 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.
> > > 
> > > 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
> > > 
> > > I'd appreciate any help with this and would be happy to
> > test patches or provide more debug info.
> > > 
> > > Thanks and Regards,
> > > Luzipher
> > > 
> > > 
> > > 
> > > 
> > > The kernel bug output retrieved by netconsole (also at
> > http://pastebin.com/sjJy7QE4 ):
> > >     [  294.538422] netconsole:
> > local port 6666
> > >     [  333.423583] SysRq :
> > Changing Loglevel
> > >     [  333.423609] Loglevel
> > set to 9
> > >     [  424.248405]
> > ------------[ cut here ]------------
> > >     [  424.248447] kernel BUG
> > at fs/bio.c:1499!
> > 
> > Hi Luzipher,
> > 
> > Looks like the BUG is because bio_split only works on
> > single-page iovecs.
> > 
> > I see a relevant (old) patch from Neil Brown here:
> > 
> > https://lkml.org/lkml/2007/7/30/496
> > 
> > Regards,
> > Mandeep
> > 
> 

  parent reply	other threads:[~2012-01-25 18:20 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-24 23:45 [dm-crypt] Kernel BUG (fs/bio.c:1499) when copying more files to an encrypted device Luzipher McLeod
2012-01-25  2:14 ` Mandeep Singh Baines
2012-01-25  8:06   ` Luzipher McLeod
2012-01-25  9:08     ` Milan Broz
2012-01-25 18:20     ` Mandeep Singh Baines [this message]
2012-01-25 23:46       ` Mandeep Singh Baines
2012-01-25 23:46         ` Mandeep Singh Baines
2012-01-30  0:46         ` Luzipher McLeod
2012-01-30  0:46           ` Luzipher McLeod
2012-01-31 23:26           ` [dm-crypt] " Luzipher McLeod
2012-01-31 23:26             ` Luzipher McLeod

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=20120125182027.GJ4656@google.com \
    --to=msb@chromium.org \
    --cc=dm-crypt@saout.de \
    --cc=luziphermcleod@yahoo.ie \
    /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.