]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: only drop modified extents if we logged the whole inode
authorJosef Bacik <jbacik@fusionio.com>
Wed, 13 Nov 2013 01:54:09 +0000 (20:54 -0500)
committerChris Mason <chris.mason@fusionio.com>
Thu, 21 Nov 2013 01:41:32 +0000 (20:41 -0500)
commit688c5211f76a11c5a5fc8f6c1d6c2aee158fdc60
treedadb038189ee9e2e2ea582bf6014f1a48c19239c
parent6cac317f8df6a74f649558d64b4dc3dfffd2dcb6
Btrfs: only drop modified extents if we logged the whole inode

If we fsync, seek and write, rename and then fsync again we will lose the
modified hole extent because the rename will drop all of the modified extents
since we didn't do the fast search.  We need to only drop the modified extents
if we didn't do the fast search and we were logging the entire inode as we don't
need them anymore, otherwise this is being premature.  Thanks,

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