Btrfs: only drop modified extents if we logged the whole inode
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Fri Nov 22 17:59:03 EST 2013
Gitweb: http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=d006a04816a306995cd9d394079652a7462f81f8
Commit: d006a04816a306995cd9d394079652a7462f81f8
Parent: 6cfab851f42edcfa72763b3cb8dc26b8fd74e203
Author: Josef Bacik <jbacik at fusionio.com>
AuthorDate: Tue Nov 12 20:54:09 2013 -0500
Committer: Chris Mason <chris.mason at fusionio.com>
CommitDate: Wed Nov 20 20:41:32 2013 -0500
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 at fusionio.com>
Signed-off-by: Chris Mason <chris.mason at fusionio.com>
---
fs/btrfs/tree-log.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c
index b0c7134..9f7fc51 100644
--- a/fs/btrfs/tree-log.c
+++ b/fs/btrfs/tree-log.c
@@ -3802,7 +3802,7 @@ log_extents:
err = ret;
goto out_unlock;
}
- } else {
+ } else if (inode_only == LOG_INODE_ALL) {
struct extent_map_tree *tree = &BTRFS_I(inode)->extent_tree;
struct extent_map *em, *n;
More information about the linux-mtd-cvs
mailing list