linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chris Mason <chris.mason@oracle.com>
To: "Yan, Zheng" <yanzheng@21cn.com>
Cc: Li Zefan <lizf@cn.fujitsu.com>,
	Tsutomu Itoh <t-itoh@jp.fujitsu.com>,
	liubo <liubo2009@cn.fujitsu.com>,
	Linux Btrfs <linux-btrfs@vger.kernel.org>,
	Josef Bacik <josef@redhat.com>
Subject: Re: bug caused by removal of trans_mutex? (Was: Re: kernel BUG at fs/btrfs/extent-tree.c:6164!)
Date: Mon, 13 Jun 2011 15:55:51 -0400	[thread overview]
Message-ID: <1307994828-sup-6461@shiny> (raw)
In-Reply-To: <BANLkTi=m2CkcSQNPNja=A7eG62vLstM1sw@mail.gmail.com>

Excerpts from Yan, Zheng's message of 2011-06-13 10:58:35 -0400:
> The usage of trans_mutex in relocation code is subtle. It controls
> interaction of relocation
> with transaction start, transaction commit and snapshot creation.
> Simple replacing
> trans_mutex with trans_lock is wrong.

So, I've got a mutex around the reloc_root here and that was almost but
not quite enough.  It looks like the biggest problem is that we need to
wait in btrfs_record_root_in_trans for anyone inside merge_reloc_roots.

I'm surviving much longer with a patch in place that synchronizes
btrfs_record_root_in_trans better.

Zheng if you have other comments on the locking please let me know.

-chris

  parent reply	other threads:[~2011-06-13 19:55 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-06  8:33 kernel BUG at fs/btrfs/extent-tree.c:6164! Tsutomu Itoh
2011-06-07  5:31 ` liubo
2011-06-07  5:59   ` Tsutomu Itoh
2011-06-07  6:17     ` Tsutomu Itoh
2011-06-07  8:24       ` Tsutomu Itoh
2011-06-07  8:36         ` liubo
2011-06-07 15:46           ` Chris Mason
2011-06-08  5:12             ` Tsutomu Itoh
2011-06-13  7:13               ` bug caused by removal of trans_mutex? (Was: Re: kernel BUG at fs/btrfs/extent-tree.c:6164!) Li Zefan
2011-06-13  7:49                 ` Yan, Zheng 
2011-06-13  8:26                   ` Li Zefan
2011-06-13 13:12                 ` Chris Mason
2011-06-13 15:18                   ` Chris Mason
2011-06-13 14:58                 ` Yan, Zheng 
2011-06-13 15:09                   ` Chris Mason
2011-06-13 19:55                   ` Chris Mason [this message]
2011-06-14  3:24                     ` Yan, Zheng 
2011-06-14  5:44                       ` Li Zefan
2011-06-14  6:53                 ` Yan, Zheng 

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=1307994828-sup-6461@shiny \
    --to=chris.mason@oracle.com \
    --cc=josef@redhat.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=liubo2009@cn.fujitsu.com \
    --cc=lizf@cn.fujitsu.com \
    --cc=t-itoh@jp.fujitsu.com \
    --cc=yanzheng@21cn.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 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).