alistair23-linux/fs/btrfs
Josef Bacik 7ddf5a42d3 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>
2012-06-14 21:30:54 -04:00
..
acl.c Btrfs: cache no acl on new inodes 2012-05-30 10:23:27 -04:00
async-thread.c btrfs: return void in functions without error conditions 2012-03-22 01:45:34 +01:00
async-thread.h btrfs: return void in functions without error conditions 2012-03-22 01:45:34 +01:00
backref.c Btrfs: add inodes before dropping the extent lock in find_all_leafs 2012-05-31 19:53:08 +02:00
backref.h Btrfs: use the tree modification log for backref resolving 2012-05-30 15:17:34 +02:00
btrfs_inode.h Btrfs: call filemap_fdatawrite twice for compression 2012-06-14 21:30:54 -04:00
check-integrity.c Btrfs: use rcu to protect device->name 2012-06-14 21:29:16 -04:00
check-integrity.h
compat.h
compression.c Merge branch 'for-linus-min' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs 2012-04-13 19:41:27 -07:00
compression.h btrfs: return void in functions without error conditions 2012-03-22 01:45:34 +01:00
ctree.c Merge branch 'for-chris' of git://git.jan-o-sch.net/btrfs-unstable into for-linus 2012-05-31 16:49:53 -04:00
ctree.h Merge branch 'for-chris' of git://git.jan-o-sch.net/btrfs-unstable into for-linus 2012-05-31 16:49:53 -04:00
delayed-inode.c Btrfs: convert the inode bit field to use the actual bit operations 2012-05-30 10:23:36 -04:00
delayed-inode.h
delayed-ref.c Btrfs: use delayed ref sequence numbers for all fs-tree updates 2012-05-30 18:18:21 +02:00
delayed-ref.h Btrfs: use delayed ref sequence numbers for all fs-tree updates 2012-05-30 18:18:21 +02:00
dir-item.c btrfs: replace many BUG_ONs with proper error handling 2012-03-22 11:52:54 +01:00
disk-io.c Btrfs: use rcu to protect device->name 2012-06-14 21:29:16 -04:00
disk-io.h btrfs: Drop unused function btrfs_abort_devices() 2012-05-30 10:23:39 -04:00
export.c btrfs: replace many BUG_ONs with proper error handling 2012-03-22 11:52:54 +01:00
export.h
extent-tree.c Merge branch 'for-chris' of git://git.jan-o-sch.net/btrfs-unstable into for-linus 2012-05-31 16:49:53 -04:00
extent_io.c Btrfs: use rcu to protect device->name 2012-06-14 21:29:16 -04:00
extent_io.h Merge branch 'for-chris' of git://git.jan-o-sch.net/btrfs-unstable into for-linus 2012-05-31 16:49:53 -04:00
extent_map.c
extent_map.h
file-item.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs 2012-03-30 12:44:29 -07:00
file.c Btrfs: check to see if the inode is in the log before fsyncing 2012-05-30 10:23:42 -04:00
free-space-cache.c Btrfs: merge contigous regions when loading free space cache 2012-05-30 10:23:36 -04:00
free-space-cache.h
hash.h
inode-item.c Merge branch 'error-handling' into for-linus 2012-03-28 20:31:37 -04:00
inode-map.c Btrfs: show useful info in space reservation tracepoint 2012-03-29 09:57:44 -04:00
inode-map.h
inode.c Btrfs: call filemap_fdatawrite twice for compression 2012-06-14 21:30:54 -04:00
ioctl.c Btrfs: use rcu to protect device->name 2012-06-14 21:29:16 -04:00
ioctl.h Btrfs: add ioctl to get and reset the device stats 2012-05-30 10:23:40 -04:00
Kconfig
locking.c btrfs: return void in functions without error conditions 2012-03-22 01:45:34 +01:00
locking.h btrfs: return void in functions without error conditions 2012-03-22 01:45:34 +01:00
lzo.c
Makefile
ordered-data.c Btrfs: call filemap_fdatawrite twice for compression 2012-06-14 21:30:54 -04:00
ordered-data.h Btrfs: finish ordered extents in their own thread 2012-05-30 10:23:33 -04:00
orphan.c btrfs: replace many BUG_ONs with proper error handling 2012-03-22 11:52:54 +01:00
print-tree.c Btrfs: read device stats on mount, write modified ones during commit 2012-05-30 10:23:41 -04:00
print-tree.h
rcu-string.h Btrfs: use rcu to protect device->name 2012-06-14 21:29:16 -04:00
reada.c Btrfs: set ioprio of scrub readahead to idle 2012-05-30 10:23:43 -04:00
relocation.c Btrfs: Fix space checking during fs resize 2012-04-27 13:55:14 -04:00
root-tree.c btrfs: replace many BUG_ONs with proper error handling 2012-03-22 11:52:54 +01:00
scrub.c Btrfs: use rcu to protect device->name 2012-06-14 21:29:16 -04:00
struct-funcs.c Btrfs: add the ability to cache a pointer into the eb 2012-03-26 17:04:23 -04:00
super.c Btrfs: implement ->show_devname 2012-06-14 21:30:37 -04:00
sysfs.c
transaction.c Btrfs: abort the transaction if the commit fails 2012-06-14 21:29:13 -04:00
transaction.h btrfs: enhance transaction abort infrastructure 2012-03-22 01:45:40 +01:00
tree-defrag.c
tree-log.c Btrfs: fix return code in drop_objectid_items 2012-05-30 10:23:42 -04:00
tree-log.h btrfs: return void in functions without error conditions 2012-03-22 01:45:34 +01:00
ulist.c Merge branch 'for-chris' of git://git.jan-o-sch.net/btrfs-unstable into for-linus 2012-05-31 16:49:53 -04:00
ulist.h Merge branch 'for-chris' of git://git.jan-o-sch.net/btrfs-unstable into for-linus 2012-05-31 16:49:53 -04:00
version.h
volumes.c Btrfs: use rcu to protect device->name 2012-06-14 21:29:16 -04:00
volumes.h Btrfs: use rcu to protect device->name 2012-06-14 21:29:16 -04:00
xattr.c Btrfs: use i_version instead of our own sequence 2012-05-30 10:23:27 -04:00
xattr.h
zlib.c