diff options
author | Josef Bacik <jbacik@fusionio.com> | 2013-07-02 14:38:02 (GMT) |
---|---|---|
committer | Josef Bacik <jbacik@fusionio.com> | 2013-07-02 15:51:49 (GMT) |
commit | 0e267c44c3a402d35111d1935be1167240b5b79f (patch) | |
tree | d09bc2390133da4ca34a4d11ca34ef524d03a87d /Documentation/fb/cmap_xfbdev.txt | |
parent | 7fb7d76f96bfcbea25007d190ba828b18e13d29d (diff) | |
download | linux-fsl-qoriq-0e267c44c3a402d35111d1935be1167240b5b79f.tar.xz |
Btrfs: wait ordered range before doing direct io
My recent truncate patch uncovered this bug, but I can reproduce it without the
truncate patch. If you mount with -o compress-force, do a direct write to some
area, do a buffered write to some other area, and then do a direct read you will
get the wrong data for where you did the buffered write. This is because the
generic direct io helpers only call filemap_write_and_wait once, and for
compression we need it twice. So to be safe add the btrfs_wait_ordered_range to
the start of the direct io function to make sure any compressed writes have
truly been written. This patch makes xfstests 130 pass when you mount with -o
compress-force=lzo. Thanks,
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Diffstat (limited to 'Documentation/fb/cmap_xfbdev.txt')
0 files changed, 0 insertions, 0 deletions