Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: liubo <liubo2009@cn.fujitsu.com>
To: Andy Lutomirski <luto@MIT.EDU>
Cc: linux-btrfs@vger.kernel.org, chris.mason@oracle.com
Subject: Re: [PATCH] Btrfs: fix an oops of log replay
Date: Tue, 16 Aug 2011 19:53:28 +0800	[thread overview]
Message-ID: <4E4A5A38.7070607@cn.fujitsu.com> (raw)
In-Reply-To: <4E3FFD02.6010000@mit.edu>

On 08/08/2011 11:13 PM, Andy Lutomirski wrote:
> On 08/06/2011 04:35 AM, Liu Bo wrote:
>> When btrfs recovers from a crash, it may hit the oops below:
>>
>> ------------[ cut here ]------------
>> kernel BUG at fs/btrfs/inode.c:4580!
>> [...]
>> RIP: 0010:[<ffffffffa03df251>]  [<ffffffffa03df251>]
>> btrfs_add_link+0x161/0x1c0 [btrfs]
>> [...]
>> Call Trace:
>>   [<ffffffffa03e7b31>] ? btrfs_inode_ref_index+0x31/0x80 [btrfs]
>>   [<ffffffffa04054e9>] add_inode_ref+0x319/0x3f0 [btrfs]
>>   [<ffffffffa0407087>] replay_one_buffer+0x2c7/0x390 [btrfs]
>>   [<ffffffffa040444a>] walk_down_log_tree+0x32a/0x480 [btrfs]
>>   [<ffffffffa0404695>] walk_log_tree+0xf5/0x240 [btrfs]
>>   [<ffffffffa0406cc0>] btrfs_recover_log_trees+0x250/0x350 [btrfs]
>>   [<ffffffffa0406dc0>] ? btrfs_recover_log_trees+0x350/0x350 [btrfs]
>>   [<ffffffffa03d18b2>] open_ctree+0x1442/0x17d0 [btrfs]
>> [...]
>>
>> This comes from that while replaying an inode ref item, we forget to
>> check those old conflicting DIR_ITEM and DIR_INDEX items in fs/file tree,
>> then we will come to conflict corners which lead to BUG_ON().
>>
>> Signed-off-by: Liu Bo<liubo2009@cn.fujitsu.com>
>> ---
>>   fs/btrfs/tree-log.c |   28 ++++++++++++++++++++++++----
>>   1 files changed, 24 insertions(+), 4 deletions(-)
> 
> This fixes the oops for me.  The bug was a regression in 2.6.39, I believe.
> 
> Tested-by: Andy Lutomirski <luto@mit.edu>
> 

Thanks a lot for testing!

thanks,
liubo

> --Andy
> -- 
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


  reply	other threads:[~2011-08-16 11:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-06  8:35 [PATCH] Btrfs: fix an oops of log replay Liu Bo
2011-08-08 15:13 ` Andy Lutomirski
2011-08-16 11:53   ` liubo [this message]
2011-08-31  8:17 ` Arne Jansen
2011-08-31  8:36   ` Liu Bo

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=4E4A5A38.7070607@cn.fujitsu.com \
    --to=liubo2009@cn.fujitsu.com \
    --cc=chris.mason@oracle.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=luto@MIT.EDU \
    /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