]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: set plug for fsync
authorLiu Bo <bo.li.liu@oracle.com>
Wed, 15 Nov 2017 23:10:28 +0000 (16:10 -0700)
committerDavid Sterba <dsterba@suse.com>
Mon, 22 Jan 2018 15:08:13 +0000 (16:08 +0100)
commita184d90c19a51b9c1cc33693fb691e7a4fbfec60
treeb900c92ed8a718f05f81779132754a0609ebce55
parent1336db7ff15ddddcf6d71e6b907494182419981e
Btrfs: set plug for fsync

Setting plug can merge adjacent IOs before dispatching IOs to the disk
driver.

Without plug, it'd not be a problem for single disk usecases, but for
multiple disks using raid profile, a large IO can be split to several
IOs of stripe length, and plug can be helpful to bring them together
for each disk so that we can save several disk access.

Moreover, fsync issues synchronous writes, so plug can really take
effect.

Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/file.c