Btrfs: O_DIRECT writes via buffered writes + invaldiate
authorChris Mason <chris.mason@oracle.com>
Fri, 3 Oct 2008 16:30:02 +0000 (12:30 -0400)
committerChris Mason <chris.mason@oracle.com>
Fri, 3 Oct 2008 16:30:02 +0000 (12:30 -0400)
commitcb843a6f513a1a91c54951005e60bd9b95bdf973
tree12edfb1154691f1a8aaeeadb97899397574aa785
parent323ac95bce442bbde514e3ce57e840402f80d909
Btrfs: O_DIRECT writes via buffered writes + invaldiate

This reworks the btrfs O_DIRECT write code a bit.  It had always fallen
back to buffered IO and done an invalidate, but needed to be updated
for the data=ordered code.  The invalidate wasn't actually removing pages
because they were still inside an ordered extent.

This also combines the O_DIRECT/O_SYNC paths where possible, and kicks
off IO in the main btrfs_file_write loop to keep the pipe down the the
disk full as we process long writes.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/file.c
fs/btrfs/ordered-data.c
fs/btrfs/ordered-data.h