]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: merge pending IO for tree log write back
authorMiao Xie <miaox@cn.fujitsu.com>
Tue, 28 May 2013 10:05:39 +0000 (10:05 +0000)
committerJosef Bacik <jbacik@fusionio.com>
Fri, 14 Jun 2013 15:30:05 +0000 (11:30 -0400)
commitf35526c0109735302a21803990f3c38d78c1b206
tree45502fe9f6d6468f17dbbe7b7aa83d261626d65c
parentb8625c0d8821a9a7b878d294f603f14cff6fea1d
Btrfs: merge pending IO for tree log write back

Before applying this patch, we flushed the log tree of the fs/file
tree firstly, and then flushed the log root tree. It is ineffective,
especially on the hard disk. This patch improved this problem by wrapping
the above two flushes by the same blk_plug.

By test, the performance of the sync write went up ~60%(2.9MB/s -> 4.6MB/s)
on my scsi disk whose disk buffer was enabled.

Test step:
 # mkfs.btrfs -f -m single <disk>
 # mount <disk> <mnt>
 # dd if=/dev/zero of=<mnt>/file0 bs=32K count=1024 oflag=sync

Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
fs/btrfs/transaction.c
fs/btrfs/tree-log.c