diff options
author | Chris Mason <chris.mason@oracle.com> | 2009-04-20 21:50:09 +0200 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2009-04-20 21:53:08 +0200 |
commit | ffbd517d5a8c8e93ddd11046434fb029f3df73aa (patch) | |
tree | 9ec7b7f2efbb8950ca2654235a899398e82a68b5 /fs/btrfs/ordered-data.c | |
parent | Linux 2.6.30-rc2 (diff) | |
download | linux-ffbd517d5a8c8e93ddd11046434fb029f3df73aa.tar.xz linux-ffbd517d5a8c8e93ddd11046434fb029f3df73aa.zip |
Btrfs: use WRITE_SYNC for synchronous writes
Part of reducing fsync/O_SYNC/O_DIRECT latencies is using WRITE_SYNC for
writes we plan on waiting on in the near future. This patch
mirrors recent changes in other filesystems and the generic code to
use WRITE_SYNC when WB_SYNC_ALL is passed and to use WRITE_SYNC for
other latency critical writes.
Btrfs uses async worker threads for checksumming before the write is done,
and then again to actually submit the bios. The bio submission code just
runs a per-device list of bios that need to be sent down the pipe.
This list is split into low priority and high priority lists so the
WRITE_SYNC IO happens first.
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 | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/ordered-data.c b/fs/btrfs/ordered-data.c index 53c87b197d70..d6f0806c682f 100644 --- a/fs/btrfs/ordered-data.c +++ b/fs/btrfs/ordered-data.c @@ -489,7 +489,7 @@ again: /* start IO across the range first to instantiate any delalloc * extents */ - btrfs_fdatawrite_range(inode->i_mapping, start, orig_end, WB_SYNC_NONE); + btrfs_fdatawrite_range(inode->i_mapping, start, orig_end, WB_SYNC_ALL); /* The compression code will leave pages locked but return from * writepage without setting the page writeback. Starting again |