]> www.infradead.org Git - users/jedix/linux-maple.git/commit
btrfs: factor out the main loop of btrfs_buffered_write() into a helper
authorQu Wenruo <wqu@suse.com>
Thu, 20 Mar 2025 03:23:27 +0000 (13:53 +1030)
committerDavid Sterba <dsterba@suse.com>
Thu, 15 May 2025 12:30:39 +0000 (14:30 +0200)
commitced47a4db4bf823419a68f36943d243fb6ae4bb1
tree78ed1de72893c8cf8af3eab23e0ffab1aa532b94
parentaf821cba725f31d7305db26cffb07f4d2b96f34f
btrfs: factor out the main loop of btrfs_buffered_write() into a helper

Inside the main loop of btrfs_buffered_write() we are doing a lot of
heavy lifting inside a while() loop.

This makes it pretty hard to read, factor out the content into a helper,
copy_one_range() to do the work.

This has no functional change, but with some minor variable renames,
e.g. rename all "sector" into "block".

Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/file.c