All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Mason <chris.mason@fusionio.com>
To: Miao Xie <miaox@cn.fujitsu.com>
Cc: "Chris L. Mason" <clmason@fusionio.com>,
	Linux Btrfs <linux-btrfs@vger.kernel.org>,
	David Sterba <dave@jikos.cz>
Subject: Re: [RFC PATCH] Btrfs: fix full backref problem when inserting shared block reference
Date: Fri, 10 Aug 2012 07:56:28 -0400	[thread overview]
Message-ID: <20120810115628.GE32103@shiny> (raw)
In-Reply-To: <5024E4B7.20600@cn.fujitsu.com>

On Fri, Aug 10, 2012 at 04:38:47AM -0600, Miao Xie wrote:
> On 	thu, 9 Aug 2012 14:04:05 -0400, Chris Mason wrote:
> > On Wed, Aug 08, 2012 at 09:10:17PM -0600, Miao Xie wrote:
> >> If we create several snapshots at the same time, the following BUG_ON() will be
> >> triggered.
> >>
> >> 	kernel BUG at fs/btrfs/extent-tree.c:6047!
> >>
> >> Steps to reproduce:
> >>  # mkfs.btrfs <partition>
> >>  # mount <partition> <mnt>
> >>  # cd <mnt>
> >>  # for ((i=0;i<2400;i++)); do touch long_name_to_make_tree_more_deep$i; done
> >>  # for ((i=0; i<4; i++))
> >>  > do
> >>  > mkdir $i
> >>  > for ((j=0; j<200; j++))
> >>  > do
> >>  > btrfs sub snap . $i/$j
> >>  > done &
> >>  > done
> > 
> > snapshot creation has a critical section.  Once we copy a given root to
> > its snapshot, we're not allowed to change it until the transaction
> > is fully committed.
> 
> I knew this critical section. But I think we can kick it away by forcing the
> snapshoted tree to do COW.

Yes, it should be possible.

> 
> BTW, I will take a vacation next week, so I can not reply it until the week after next.
> If it is not urgent, I will continue looking into this problem after I come back.

No problem, we can take the current patch for now and improve add back
the ability to do multiple snapshots per root later.

-chris

  reply	other threads:[~2012-08-10 11:56 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-09  3:10 [RFC PATCH] Btrfs: fix full backref problem when inserting shared block reference Miao Xie
2012-08-09  6:48 ` David Sterba
2012-08-09  7:21   ` David Sterba
2012-08-09  7:50     ` Miao Xie
2012-08-10 10:38     ` Miao Xie
2012-08-21  6:24     ` Miao Xie
2012-08-09 12:23 ` Josef Bacik
2012-08-09 13:11   ` Chris Mason
2012-08-09 13:12     ` Josef Bacik
2012-08-09 13:16       ` Chris Mason
2012-08-09 18:04 ` Chris Mason
2012-08-10 10:38   ` Miao Xie
2012-08-10 11:56     ` Chris Mason [this message]
2013-01-30 18:23       ` Alex Lyakas
2013-01-31  2:42         ` Miao Xie
2013-01-31 13:06           ` Alex Lyakas

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=20120810115628.GE32103@shiny \
    --to=chris.mason@fusionio.com \
    --cc=clmason@fusionio.com \
    --cc=dave@jikos.cz \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=miaox@cn.fujitsu.com \
    /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.