diff options
author | Wang Shilong <wangsl.fnst@cn.fujitsu.com> | 2013-12-11 19:29:51 +0800 |
---|---|---|
committer | Chris Mason <clm@fb.com> | 2013-12-12 07:12:20 -0800 |
commit | c974c4642fee8c58239c7753d0bf548b23799923 (patch) | |
tree | a671a832030045d977a38ec25a84044fcbca5d1e /fs/btrfs/compression.c | |
parent | 639eefc8afd1b8b839b1fd5605378d869d3612a1 (diff) |
Btrfs: fix an oops when doing balance relocation
I hit an oops when inserting reloc root into @reloc_root_tree(it can be
easily triggered when forcing cow for relocation root)
[ 866.494539] [<ffffffffa0499579>] btrfs_init_reloc_root+0x79/0xb0 [btrfs]
[ 866.495321] [<ffffffffa044c240>] record_root_in_trans+0xb0/0x110 [btrfs]
[ 866.496109] [<ffffffffa044d758>] btrfs_record_root_in_trans+0x48/0x80 [btrfs]
[ 866.496908] [<ffffffffa0494da8>] select_reloc_root+0xa8/0x210 [btrfs]
[ 866.497703] [<ffffffffa0495c8a>] do_relocation+0x16a/0x540 [btrfs]
This is because reloc root inserted into @reloc_root_tree is not within one
transaction,reloc root may be cowed and root block bytenr will be reused then
oops happens.We should update reloc root in @reloc_root_tree when cow reloc
root node, fix it.
Signed-off-by: Wang Shilong <wangsl.fnst@cn.fujitsu.com>
Reviewed-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'fs/btrfs/compression.c')
0 files changed, 0 insertions, 0 deletions