]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: fix broken nocow after balance
authorMiao Xie <miaox@cn.fujitsu.com>
Thu, 6 Jun 2013 03:28:03 +0000 (03:28 +0000)
committerJosef Bacik <jbacik@fusionio.com>
Mon, 1 Jul 2013 12:52:25 +0000 (08:52 -0400)
commit954c40676c220f6ae450f9171e4d76f051d29762
tree2e28c383acea82994e54c330ba7345b436b69656
parent1a9c49b1b48b18d39b039f47e89ec2e56a58cf5e
Btrfs: fix broken nocow after balance

Balance will create reloc_root for each fs root, and it's going to
record last_snapshot to filter shared blocks.  The side effect of
setting last_snapshot is to break nocow attributes of files.

Since the extents are not shared by the relocation tree after the balance,
we can recover the old last_snapshot safely if no one snapshoted the
source tree. We fix the above problem by this way.

Reported-by: Kyle Gates <kylegates@hotmail.com>
Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
fs/btrfs/relocation.c