summaryrefslogtreecommitdiff
path: root/fs/btrfs/locking.h
diff options
context:
space:
mode:
authorJosef Bacik <josef@redhat.com>2012-06-08 19:26:47 (GMT)
committerChris Mason <chris.mason@oracle.com>2012-06-15 01:30:54 (GMT)
commit7ddf5a42d311d74fd9f7373cb56def0843c219f8 (patch)
tree3b6a46eec858b867db9184d0e8beefe4ed01e9ec /fs/btrfs/locking.h
parent8180ef8894fa402443205cff1e23417e8d3434df (diff)
downloadlinux-fsl-qoriq-7ddf5a42d311d74fd9f7373cb56def0843c219f8.tar.xz
Btrfs: call filemap_fdatawrite twice for compression
I removed this in an earlier commit and I was wrong. Because compression can return from filemap_fdatawrite() without having actually set any of it's pages as writeback() it can make filemap_fdatawait() do essentially nothing, and then we won't find any ordered extents because they may not have been created yet. So not only does this make fsync() completely useless, but it will also screw up if you truncate on a non-page aligned offset since we zero out the end and then wait on ordered extents and then call drop caches. We can drop the cache before the io completes and then we try to unpin the extent we just wrote we won't find it and everything goes sideways. So fix this by putting it back and put a giant comment there to keep me from trying to remove it in the future. Thanks, Signed-off-by: Josef Bacik <josef@redhat.com>
Diffstat (limited to 'fs/btrfs/locking.h')
0 files changed, 0 insertions, 0 deletions