]> www.infradead.org Git - users/jedix/linux-maple.git/commit
btrfs: subpage: support metadata checksum calculation at write time
authorQu Wenruo <wqu@suse.com>
Thu, 25 Mar 2021 07:14:40 +0000 (15:14 +0800)
committerDavid Sterba <dsterba@suse.com>
Tue, 6 Apr 2021 13:35:58 +0000 (15:35 +0200)
commita0ee728e9ee82bd78f299aa02b59df06a4b840a2
tree6139c9d810b4f56a19d4243e103c7b0595cf1943
parent8473bcf184a6c068441584be0eb3bd1c0dccc276
btrfs: subpage: support metadata checksum calculation at write time

Add a new helper, csum_dirty_subpage_buffers(), to iterate through all
dirty extent buffers in one bvec.

Also extract the code of calculating csum for one extent buffer into
csum_one_extent_buffer(), so that both the existing csum_dirty_buffer()
and the new csum_dirty_subpage_buffers() can reuse the same routine.

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/disk-io.c