]> git.proxmox.com Git - mirror_ubuntu-bionic-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)
committerKhalid Elmously <khalid.elmously@canonical.com>
Wed, 6 Jun 2018 17:44:25 +0000 (13:44 -0400)
commitfcf434451b495481ab20c24ae94181fe0c4fe94f
tree9d88dbf1068440ae58457040de8fb170cb3d4595
parent8b777b80ca13cb9011fba2d2be02d58666af2c94
Btrfs: set plug for fsync

BugLink: http://bugs.launchpad.net/bugs/1774063
[ Upstream commit 343e4fc1c60971b0734de26dbbd475d433950982 ]

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>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
fs/btrfs/file.c