linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Liu Bo <liubo2009@cn.fujitsu.com>
To: Daniel J Blueman <daniel@quora.org>
Cc: Josef Bacik <josef@redhat.com>,
	Chris Mason <chris.mason@oracle.com>,
	Linux BTRFS <linux-btrfs@vger.kernel.org>,
	Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: [3.4-rc1] attempt to access beyond end of device and livelock
Date: Sun, 08 Apr 2012 16:49:15 +0800	[thread overview]
Message-ID: <4F81510B.60406@cn.fujitsu.com> (raw)
In-Reply-To: <CAMVG2st4VPbujSY1hH+VjbR1gxCR0ZEGznrObYMWnpgo++Ynug@mail.gmail.com>

On 04/06/2012 07:36 PM, Daniel J Blueman wrote:
> Hi Josef, Chris,
> 
> When testing BTRFS with RAID 0 metadata on linux-3.4-rc1, we see
> discard ranges exceeding the end of the block device [1], potentially
> causing dataloss; when this occurs, filesystem writeback becomes
> catatonic due to continual resubmission.
> 
> Simply mounting with discard a raid0 metadata filesystem and copying
> some data in [2] provokes the issue.
> 
> Thanks,
>  Daniel
> 
> --- [1]
> 
> attempt to access beyond end of device
> ram0: rw=129, want=8452072, limit=4096000
> ...
> 
> --- [2]
> 
> modprobe brd rd_size=2048000 (or boot with ramdisk_size=2048000)
> mkfs.btrfs -m raid0 /dev/ram0 /dev/ram1
> mount /dev/ram0 /mnt -o discard
> cd /mnt && tar -xvzf linux.tar.gz
> <access beyond end of device and livelock>

Thanks for the report, this bug shows we've miscalculated the length of discard extents.

I'll send a patch for this soon.

thanks,
-- 
liubo 

  reply	other threads:[~2012-04-08  8:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-25 13:40 attempt to access beyond end of device and livelock Daniel J Blueman
2012-04-06 11:36 ` [3.4-rc1] " Daniel J Blueman
2012-04-08  8:49   ` Liu Bo [this message]
2012-04-09 14:44     ` Daniel J Blueman

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=4F81510B.60406@cn.fujitsu.com \
    --to=liubo2009@cn.fujitsu.com \
    --cc=chris.mason@oracle.com \
    --cc=daniel@quora.org \
    --cc=josef@redhat.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).