alistair23-linux/fs/btrfs
Miao Xie 41bd9ca459 Btrfs: just do dirty page flush for the inode with compression before direct IO
As the comment in the btrfs_direct_IO says, only the compressed pages need be
flush again to make sure they are on the disk, but the common pages needn't,
so we add a if statement to check if the inode has compressed pages or not,
if no, skip the flush.

And in order to prevent the write ranges from intersecting, we need wait for
the running ordered extents. But the current code waits for them twice, one
is done before the direct IO starts (in btrfs_wait_ordered_range()), the other
is before we get the blocks, it is unnecessary. because we can do the direct
IO without holding i_mutex, it means that the intersected ordered extents may
happen during the direct IO, the first wait can not avoid this problem. So we
use filemap_fdatawrite_range() instead of btrfs_wait_ordered_range() to remove
the first wait.

Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Josef Bacik <jbacik@fb.com>
2014-03-10 15:17:24 -04:00
..
tests Btrfs: convert printk to btrfs_ and fix BTRFS prefix 2014-01-28 13:20:05 -08:00
acl.c btrfs: remove dead code 2014-01-28 13:19:50 -08:00
async-thread.c btrfs: Add ftrace for btrfs_workqueue 2014-03-10 15:17:21 -04:00
async-thread.h btrfs: Cleanup the btrfs_workqueue related function type 2014-03-10 15:17:20 -04:00
backref.c Btrfs: skip locking when searching commit root 2014-03-10 15:16:55 -04:00
backref.h Btrfs: allocate prelim_ref with a slab allocater 2013-09-01 08:16:27 -04:00
btrfs_inode.h Btrfs: use signed integer instead of unsigned long integer for log transid 2014-03-10 15:16:42 -04:00
check-integrity.c Btrfs: use btrfs_crc32c everywhere instead of libcrc32c 2014-02-03 09:01:27 -08:00
check-integrity.h block: submit_bio_wait() conversions 2013-11-24 16:33:41 -07:00
compression.c Btrfs: fix data corruption when reading/updating compressed extents 2014-02-08 17:57:15 -08:00
compression.h
ctree.c Btrfs: correctly determine if blocks are shared in btrfs_compare_trees 2014-03-10 15:16:50 -04:00
ctree.h Btrfs: introduce btrfs_{start, end}_nocow_write() for each subvolume 2014-03-10 15:17:22 -04:00
delayed-inode.c btrfs: Cleanup the "_struct" suffix in btrfs_workequeue 2014-03-10 15:17:16 -04:00
delayed-inode.h Btrfs: introduce the delayed inode ref deletion for the single link inode 2014-01-28 13:20:09 -08:00
delayed-ref.c Btrfs: cleanup delayed-ref.c:find_ref_head() 2014-03-10 15:16:46 -04:00
delayed-ref.h Btrfs: attach delayed ref updates to delayed ref heads 2014-01-28 13:20:25 -08:00
dev-replace.c Btrfs: fix use-after-free in the finishing procedure of the device replace 2014-03-10 15:15:39 -04:00
dev-replace.h
dir-item.c Btrfs: convert printk to btrfs_ and fix BTRFS prefix 2014-01-28 13:20:05 -08:00
disk-io.c Btrfs: introduce btrfs_{start, end}_nocow_write() for each subvolume 2014-03-10 15:17:22 -04:00
disk-io.h Btrfs: add a sanity test for btrfs_split_item 2013-11-11 21:51:02 -05:00
export.c btrfs: remove fs/btrfs/compat.h 2013-11-11 22:03:19 -05:00
export.h
extent-tree.c Btrfs: introduce btrfs_{start, end}_nocow_write() for each subvolume 2014-03-10 15:17:22 -04:00
extent_io.c Btrfs: more efficient split extent state insertion 2014-03-10 15:16:57 -04:00
extent_io.h Btrfs: move the extent buffer radix tree into the fs_info 2014-01-28 13:19:55 -08:00
extent_map.c Btrfs: more efficient btrfs_drop_extent_cache 2014-03-10 15:16:57 -04:00
extent_map.h Btrfs: more efficient btrfs_drop_extent_cache 2014-03-10 15:16:57 -04:00
file-item.c Btrfs: convert printk to btrfs_ and fix BTRFS prefix 2014-01-28 13:20:05 -08:00
file.c Btrfs: introduce btrfs_{start, end}_nocow_write() for each subvolume 2014-03-10 15:17:22 -04:00
free-space-cache.c Btrfs: convert printk to btrfs_ and fix BTRFS prefix 2014-01-28 13:20:05 -08:00
free-space-cache.h Btrfs: remove path arg from btrfs_truncate_free_space_cache 2013-11-11 21:51:33 -05:00
hash.c Btrfs: fix btrfs boot when compiled as built-in 2014-01-28 13:20:31 -08:00
hash.h Btrfs: fix btrfs boot when compiled as built-in 2014-01-28 13:20:31 -08:00
inode-item.c btrfs: cleanup: removed unused 'btrfs_get_inode_ref_index' 2014-01-28 13:19:39 -08:00
inode-map.c btrfs: Use WARN_ON()'s return value in place of WARN_ON(1) 2013-11-11 22:11:53 -05:00
inode-map.h
inode.c Btrfs: just do dirty page flush for the inode with compression before direct IO 2014-03-10 15:17:24 -04:00
ioctl.c Btrfs: introduce btrfs_{start, end}_nocow_write() for each subvolume 2014-03-10 15:17:22 -04:00
Kconfig Btrfs: fix btrfs boot when compiled as built-in 2014-01-28 13:20:31 -08:00
locking.c
locking.h
lzo.c Btrfs: convert printk to btrfs_ and fix BTRFS prefix 2014-01-28 13:20:05 -08:00
Makefile Btrfs: fix btrfs boot when compiled as built-in 2014-01-28 13:20:31 -08:00
math.h
ordered-data.c Btrfs: wake up the tasks that wait for the io earlier 2014-03-10 15:17:23 -04:00
ordered-data.h btrfs: Cleanup the "_struct" suffix in btrfs_workequeue 2014-03-10 15:17:16 -04:00
orphan.c btrfs: expand btrfs_find_item() to include find_orphan_item functionality 2014-01-28 13:19:37 -08:00
print-tree.c Btrfs: don't use ram_bytes for uncompressed inline items 2014-01-29 07:06:29 -08:00
print-tree.h
props.c Btrfs: add support for inode properties 2014-01-28 13:20:24 -08:00
props.h Btrfs: add support for inode properties 2014-01-28 13:20:24 -08:00
qgroup.c btrfs: Cleanup the "_struct" suffix in btrfs_workequeue 2014-03-10 15:17:16 -04:00
raid56.c btrfs: Cleanup the "_struct" suffix in btrfs_workequeue 2014-03-10 15:17:16 -04:00
raid56.h
rcu-string.h
reada.c btrfs: Cleanup the "_struct" suffix in btrfs_workequeue 2014-03-10 15:17:16 -04:00
relocation.c Btrfs: fix an oops when we fail to relocate tree blocks 2014-01-28 13:20:14 -08:00
root-tree.c btrfs: Use PTR_ERR_OR_ZERO 2014-03-10 15:16:51 -04:00
scrub.c btrfs: Cleanup the "_struct" suffix in btrfs_workequeue 2014-03-10 15:17:16 -04:00
send.c Btrfs: add readahead for send_write 2014-03-10 15:17:19 -04:00
send.h
struct-funcs.c
super.c btrfs: Cleanup the old btrfs_worker. 2014-03-10 15:17:15 -04:00
sysfs.c btrfs: add simple debugfs interface 2014-03-10 15:15:51 -04:00
sysfs.h btrfs: add simple debugfs interface 2014-03-10 15:15:51 -04:00
transaction.c Btrfs: cancel scrub on transaction abortion 2014-03-10 15:16:54 -04:00
transaction.h Btrfs: make fsync latency less sucky 2014-01-28 13:20:25 -08:00
tree-defrag.c Btrfs: cleanup dead code of defragment 2013-11-11 21:59:45 -05:00
tree-log.c Btrfs: stop joining the log transaction if sync log fails 2014-03-10 15:16:44 -04:00
tree-log.h Btrfs: just wait or commit our own log sub-transaction 2014-03-10 15:16:43 -04:00
ulist.c Btrfs: do not export ulist functions 2014-01-29 07:06:27 -08:00
ulist.h Btrfs: do not export ulist functions 2014-01-29 07:06:27 -08:00
uuid-tree.c Btrfs: convert printk to btrfs_ and fix BTRFS prefix 2014-01-28 13:20:05 -08:00
volumes.c btrfs: Cleanup the "_struct" suffix in btrfs_workequeue 2014-03-10 15:17:16 -04:00
volumes.h btrfs: Cleanup the "_struct" suffix in btrfs_workequeue 2014-03-10 15:17:16 -04:00
xattr.c Btrfs: add support for inode properties 2014-01-28 13:20:24 -08:00
xattr.h
zlib.c Btrfs: convert printk to btrfs_ and fix BTRFS prefix 2014-01-28 13:20:05 -08:00