summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/extent_io.h
diff options
context:
space:
mode:
authorLiu Bo2017-10-24 07:18:16 +0200
committerDavid Sterba2017-11-15 14:44:31 +0100
commitf82b735936ffd58b6711cf1f1054616517d8ffcd (patch)
treeb4ad8e86330ccee60b085882d187bd4899010efa /fs/btrfs/extent_io.h
parentbtrfs: Fix bug for misused dev_t when lookup in dev state hash table. (diff)
downloadkernel-qcow2-linux-f82b735936ffd58b6711cf1f1054616517d8ffcd.tar.gz
kernel-qcow2-linux-f82b735936ffd58b6711cf1f1054616517d8ffcd.tar.xz
kernel-qcow2-linux-f82b735936ffd58b6711cf1f1054616517d8ffcd.zip
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>
Diffstat (limited to 'fs/btrfs/extent_io.h')
-rw-r--r--fs/btrfs/extent_io.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/btrfs/extent_io.h b/fs/btrfs/extent_io.h
index 861dacb371c7..d8b27af7101e 100644
--- a/fs/btrfs/extent_io.h
+++ b/fs/btrfs/extent_io.h
@@ -115,7 +115,8 @@ struct extent_io_ops {
*/
int (*fill_delalloc)(void *private_data, struct page *locked_page,
u64 start, u64 end, int *page_started,
- unsigned long *nr_written);
+ unsigned long *nr_written,
+ struct writeback_control *wbc);
int (*writepage_start_hook)(struct page *page, u64 start, u64 end);
void (*writepage_end_io_hook)(struct page *page, u64 start, u64 end,