diff options
author | Josef Bacik <jbacik@fusionio.com> | 2012-08-16 20:32:06 (GMT) |
---|---|---|
committer | Chris Mason <chris.mason@fusionio.com> | 2012-10-01 19:19:02 (GMT) |
commit | 224ecce517af3a952321202cdf304c12e138caca (patch) | |
tree | 086997611ebc47bf99fddeb91b52f45a499a484d /fs/exec.c | |
parent | 54338b5cc4fa3cfe260e8e4ade8b62a9079ea3f9 (diff) | |
download | linux-224ecce517af3a952321202cdf304c12e138caca.tar.xz |
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/exec.c')
0 files changed, 0 insertions, 0 deletions