direct-io: only inc/dec inode->i_dio_count for file systems
authorJens Axboe <axboe@kernel.dk>
Wed, 24 Apr 2013 21:42:09 +0000 (15:42 -0600)
committerJens Axboe <axboe@kernel.dk>
Thu, 23 May 2013 11:11:05 +0000 (13:11 +0200)
commit167129d44ba2a9fcb1580f0d4cab9865fc80c5c9
treede56ae71c3b675cfc393d7c83c37b3d315ebae58
parentb956fe62f6f404910b051487b3c1799deb81144e
direct-io: only inc/dec inode->i_dio_count for file systems

We don't need truncate protection for block devices, so add a flag
bypassing this cache line dirtying twice for every IO. This easily
contributes to 5-10% of the CPU time on high IOPS O_DIRECT testing.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/block_dev.c
fs/direct-io.c
fs/inode.c
include/linux/fs.h