summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/tree-log.c
diff options
context:
space:
mode:
authorJosef Bacik2012-08-16 22:32:06 +0200
committerChris Mason2012-10-01 21:19:02 +0200
commit224ecce517af3a952321202cdf304c12e138caca (patch)
tree086997611ebc47bf99fddeb91b52f45a499a484d /fs/btrfs/tree-log.c
parentBtrfs: do not allocate chunks as agressively (diff)
downloadkernel-qcow2-linux-224ecce517af3a952321202cdf304c12e138caca.tar.gz
kernel-qcow2-linux-224ecce517af3a952321202cdf304c12e138caca.tar.xz
kernel-qcow2-linux-224ecce517af3a952321202cdf304c12e138caca.zip
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/tree-log.c')
0 files changed, 0 insertions, 0 deletions