]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: add write_flags for compression bio
authorLiu Bo <bo.li.liu@oracle.com>
Tue, 24 Oct 2017 05:18:16 +0000 (23:18 -0600)
committerDavid Sterba <dsterba@suse.com>
Wed, 15 Nov 2017 13:44:31 +0000 (14:44 +0100)
commit7c027a4b07e2f29d834c633bc64cde0d0e33b9e7
treeb4ad8e86330ccee60b085882d187bd4899010efa
parentd7065b14fa0d1b69fa18432825e9ab31a92ff4a9
Btrfs: add write_flags for compression bio

Compression code path has only flaged bios with REQ_OP_WRITE no matter
where the bios come from, but it could be a sync write if fsync starts
this writeback or a normal writeback write if wb kthread starts a
periodic writeback.

It breaks the rule that sync writes and writeback writes need to be
differentiated from each other, because from the POV of block layer,
all bios need to be recognized by these flags in order to do some
management, e.g. throttlling.

This passes writeback_control to compression write path so that it can
send bios with proper flags to block layer.

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/compression.c
fs/btrfs/compression.h
fs/btrfs/extent_io.c
fs/btrfs/extent_io.h
fs/btrfs/inode.c