]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: make sure to copy everything if we rename
authorJosef Bacik <jbacik@fusionio.com>
Tue, 12 Nov 2013 21:25:58 +0000 (16:25 -0500)
committerChris Mason <chris.mason@fusionio.com>
Thu, 21 Nov 2013 01:41:24 +0000 (20:41 -0500)
commit6cac317f8df6a74f649558d64b4dc3dfffd2dcb6
treee3566395bc5ae3d0812c491ec80ca1d484c0d7a0
parent9f2cbf08505daad4627c199f61049e888d805851
Btrfs: make sure to copy everything if we rename

If we rename a file that is already in the log and we fsync again we will lose
the new name.  This is because we just log the inode update and not the new ref.
To fix this we just need to check if we are logging the new name of the inode
and copy all the metadata instead of just updating the inode itself.  With this
patch my testcase now passes.  Thanks,

Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
fs/btrfs/tree-log.c