summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/extent_io.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2023-05-31 08:05:02 +0200
committerDavid Sterba <dsterba@suse.com>2023-06-19 13:59:35 +0200
commit7027f87108ce3d23ea542e1a9a79056530db4a87 (patch)
tree131040b0a58efbcb5c7807b43d8067944f8e13fd /fs/btrfs/extent_io.h
parenteb34dceace983e304e00d4bf711cec0a603959ac (diff)
downloadlinux-7027f87108ce3d23ea542e1a9a79056530db4a87.tar.gz
linux-7027f87108ce3d23ea542e1a9a79056530db4a87.tar.bz2
linux-7027f87108ce3d23ea542e1a9a79056530db4a87.zip
btrfs: don't treat zoned writeback as being from an async helper thread
When extent_write_locked_range was originally added, it was only used writing back compressed pages from an async helper thread. But it is now also used for writing back pages on zoned devices, where it is called directly from the ->writepage context. In this case we want to be able to pass on the writeback_control instead of creating a new one, and more importantly want to use all the normal cgroup interaction instead of potentially deferring writeback to another helper. Fixes: 898793d992c2 ("btrfs: zoned: write out partially allocated region") Reviewed-by: Josef Bacik <josef@toxicpanda.com> Signed-off-by: Christoph Hellwig <hch@lst.de> 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 6723bf3483d9..c5fae3a7d911 100644
--- a/fs/btrfs/extent_io.h
+++ b/fs/btrfs/extent_io.h
@@ -178,7 +178,8 @@ int try_release_extent_mapping(struct page *page, gfp_t mask);
int try_release_extent_buffer(struct page *page);
int btrfs_read_folio(struct file *file, struct folio *folio);
-int extent_write_locked_range(struct inode *inode, u64 start, u64 end);
+int extent_write_locked_range(struct inode *inode, u64 start, u64 end,
+ struct writeback_control *wbc);
int extent_writepages(struct address_space *mapping,
struct writeback_control *wbc);
int btree_write_cache_pages(struct address_space *mapping,