diff options
author | Chris Mason <chris.mason@oracle.com> | 2008-10-03 12:30:02 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2008-10-03 12:30:02 -0400 |
commit | cb843a6f513a1a91c54951005e60bd9b95bdf973 (patch) | |
tree | 12edfb1154691f1a8aaeeadb97899397574aa785 /fs/btrfs/ordered-data.c | |
parent | 323ac95bce442bbde514e3ce57e840402f80d909 (diff) |
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>
Diffstat (limited to 'fs/btrfs/ordered-data.c')
-rw-r--r-- | fs/btrfs/ordered-data.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/btrfs/ordered-data.c b/fs/btrfs/ordered-data.c index dcc1730dd837..2eb6caba57c2 100644 --- a/fs/btrfs/ordered-data.c +++ b/fs/btrfs/ordered-data.c | |||
@@ -397,7 +397,7 @@ void btrfs_start_ordered_extent(struct inode *inode, | |||
397 | /* | 397 | /* |
398 | * Used to wait on ordered extents across a large range of bytes. | 398 | * Used to wait on ordered extents across a large range of bytes. |
399 | */ | 399 | */ |
400 | void btrfs_wait_ordered_range(struct inode *inode, u64 start, u64 len) | 400 | int btrfs_wait_ordered_range(struct inode *inode, u64 start, u64 len) |
401 | { | 401 | { |
402 | u64 end; | 402 | u64 end; |
403 | u64 orig_end; | 403 | u64 orig_end; |
@@ -451,6 +451,7 @@ again: | |||
451 | (unsigned long long)orig_end); | 451 | (unsigned long long)orig_end); |
452 | goto again; | 452 | goto again; |
453 | } | 453 | } |
454 | return 0; | ||
454 | } | 455 | } |
455 | 456 | ||
456 | /* | 457 | /* |