summaryrefslogtreecommitdiffstats
path: root/fs/direct-io.c
diff options
context:
space:
mode:
authorJens Axboe <jens.axboe@oracle.com>2009-04-06 14:48:07 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2009-04-06 08:04:54 -0700
commitaeb6fafb8fa53266d70ca7474fcda2bdaf96524a (patch)
treeebe8e0c616a9dbfdfe5184b64d0150ea02d3d1b2 /fs/direct-io.c
parent644b2d99b7a8677a56909a7b1fde31677eba4471 (diff)
downloadlinux-stable-aeb6fafb8fa53266d70ca7474fcda2bdaf96524a.tar.gz
linux-stable-aeb6fafb8fa53266d70ca7474fcda2bdaf96524a.tar.bz2
linux-stable-aeb6fafb8fa53266d70ca7474fcda2bdaf96524a.zip
block: Add flag for telling the IO schedulers NOT to anticipate more IO
By default, CFQ will anticipate more IO from a given io context if the previously completed IO was sync. This used to be fine, since the only sync IO was reads and O_DIRECT writes. But with more "normal" sync writes being used now, we don't want to anticipate for those. Add a bio/request flag that informs the IO scheduler that this is a sync request that we should not idle for. Introduce WRITE_ODIRECT specifically for O_DIRECT writes, and make sure that the other sync writes set this flag. Signed-off-by: Jens Axboe <jens.axboe@oracle.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/direct-io.c')
-rw-r--r--fs/direct-io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/direct-io.c b/fs/direct-io.c
index b6d43908ff7a..da258e7249cc 100644
--- a/fs/direct-io.c
+++ b/fs/direct-io.c
@@ -1126,7 +1126,7 @@ __blockdev_direct_IO(int rw, struct kiocb *iocb, struct inode *inode,
int acquire_i_mutex = 0;
if (rw & WRITE)
- rw = WRITE_SYNC;
+ rw = WRITE_ODIRECT;
if (bdev)
bdev_blkbits = blksize_bits(bdev_hardsect_size(bdev));