From: Liu Bo Date: Fri, 18 Aug 2017 17:54:02 +0000 (-0600) Subject: Btrfs: do not async submit for nodatasum inodes X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=9b4a9b283d5efbe9a221e2282e41e272e9db5ae9;p=openwrt%2Fstaging%2Fblogic.git Btrfs: do not async submit for nodatasum inodes While we submit direct writes, if the inode is flagged with nodatasum, there's no benefit to submit asynchronously, because a) we don't have to calculate checksum across processors, b) and direct IO has started a plug, but async submit makes us queue IO on each device's scheduled IO list instead of DIO's plug list, so that IOs get much less merges in general. Lets use sync submit for nodatasum inodes. Signed-off-by: Liu Bo Reviewed-by: Josef Bacik Signed-off-by: David Sterba --- diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index d94e3f68b9b1..0460c5431a72 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -8577,7 +8577,7 @@ __btrfs_submit_dio_bio(struct bio *bio, struct inode *inode, u64 file_offset, goto err; } map: - ret = btrfs_map_bio(fs_info, bio, 0, async_submit); + ret = btrfs_map_bio(fs_info, bio, 0, 0); err: bio_put(bio); return ret;