]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: use WRITE_SYNC for synchronous writes
authorChris Mason <chris.mason@oracle.com>
Mon, 20 Apr 2009 19:50:09 +0000 (15:50 -0400)
committerChris Mason <chris.mason@oracle.com>
Mon, 20 Apr 2009 19:53:08 +0000 (15:53 -0400)
commitb5f455b93746e5a56062a3f0225f4d9d37d34dee
tree9ec7b7f2efbb8950ca2654235a899398e82a68b5
parent2afdd9f0aa5ee2c7a3b216eda59631d209092a7a
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>
fs/btrfs/disk-io.c
fs/btrfs/extent_io.c
fs/btrfs/ordered-data.c
fs/btrfs/volumes.c
fs/btrfs/volumes.h