btrfs: introduce struct to consolidate extent buffer write context
authorNaohiro Aota <naohiro.aota@wdc.com>
Mon, 7 Aug 2023 16:12:31 +0000 (01:12 +0900)
committerDavid Sterba <dsterba@suse.com>
Mon, 21 Aug 2023 12:52:19 +0000 (14:52 +0200)
commit861093eff4f01319edfc1d1ee276a7f2bf720f1d
treee2200f7c502a9a7e58c641c6b446f3391f6d950f
parent9c93c238c15ffd8d5622c51a475d5fb35f65ca07
btrfs: introduce struct to consolidate extent buffer write context

Introduce btrfs_eb_write_context to consolidate writeback_control and the
exntent buffer context.  This will help adding a block group context as
well.

While at it, move the eb context setting before
btrfs_check_meta_write_pointer(). We can set it here because we anyway need
to skip pages in the same eb if that eb is rejected by
btrfs_check_meta_write_pointer().

Suggested-by: Christoph Hellwig <hch@infradead.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/extent_io.c
fs/btrfs/extent_io.h