]> www.infradead.org Git - users/jedix/linux-maple.git/commit
Btrfs: fix orphan backref nodes
authorMiao Xie <miaox@cn.fujitsu.com>
Fri, 11 Nov 2011 01:45:05 +0000 (20:45 -0500)
committerChris Mason <chris.mason@oracle.com>
Wed, 16 Nov 2011 02:21:01 +0000 (21:21 -0500)
commit50a3db2c6a9015b6b3e8b4a1ce6abb5f8ec59be9
tree75e9d3b355e101bc30eb9b936f23c94dbe151cbc
parent8b7e195eb9964ef2f0e4f33001abf38ad556bdae
Btrfs: fix orphan backref nodes

If the root node of a fs/file tree is in the block group that is
being relocated, but the others are not in the other block groups.
when we create a snapshot for this tree between the relocation tree
creation ends and ->create_reloc_tree is set to 0, Btrfs will create
some backref nodes that are the lowest nodes of the backrefs cache.
But we forget to add them into ->leaves list of the backref cache
and deal with them, and at last, they will triggered BUG_ON().

  kernel BUG at fs/btrfs/relocation.c:239!

This patch fixes it by adding them into ->leaves list of backref cache.

Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
(cherry picked from commit 76b9e23d25d5c99f994bee3172de39492e452e93)
fs/btrfs/relocation.c