aboutsummaryrefslogtreecommitdiff
path: root/fs/btrfs/btrfs_inode.h
diff options
context:
space:
mode:
authorJosef Bacik <jbacik@fusionio.com>2012-08-16 16:32:06 -0400
committerChris Mason <chris.mason@fusionio.com>2012-10-01 15:19:02 -0400
commit224ecce517af3a952321202cdf304c12e138caca (patch)
tree086997611ebc47bf99fddeb91b52f45a499a484d /fs/btrfs/btrfs_inode.h
parent54338b5cc4fa3cfe260e8e4ade8b62a9079ea3f9 (diff)
Btrfs: fix possible corruption when fsyncing written prealloced extents
While working on my fsync patch my fsync tester kept hitting mismatching md5sums when I would randomly write to a prealloc'ed region, syncfs() and then write to the prealloced region some more and then fsync() and then immediately reboot. This is because the tree logging code will skip writing csums for file extents who's generation is less than the current running transaction. When we mark extents as written we haven't been updating their generation so they were always being skipped. This wouldn't happen if you were to preallocate and then write in the same transaction, but if you for example prealloced a VM you could definitely run into this problem. This patch makes my fsync tester happy again. Thanks, Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Diffstat (limited to 'fs/btrfs/btrfs_inode.h')
0 files changed, 0 insertions, 0 deletions