summaryrefslogtreecommitdiffstats
path: root/sound/atmel
diff options
context:
space:
mode:
authorQu Wenruo <wqu@suse.com>2022-09-14 13:32:51 +0800
committerDavid Sterba <dsterba@suse.com>2022-12-05 18:00:56 +0100
commit947a629988f191807d2d22ba63ae18259bb645c5 (patch)
treedd4ef7ccb0aa35d62c985ac7ab96c7237afdc6ec /sound/atmel
parent789d6a3a876e32c23fc9633d5b372d02a5188f0e (diff)
downloadlinux-947a629988f191807d2d22ba63ae18259bb645c5.tar.gz
linux-947a629988f191807d2d22ba63ae18259bb645c5.tar.bz2
linux-947a629988f191807d2d22ba63ae18259bb645c5.zip
btrfs: move tree block parentness check into validate_extent_buffer()
[BACKGROUND] Although both btrfs metadata and data has their read time verification done at endio time (btrfs_validate_metadata_buffer() and btrfs_verify_data_csum()), metadata has extra verification, mostly parentness check including first key/transid/owner_root/level, done at read_tree_block() and btrfs_read_extent_buffer(). On the other hand, all the data verification is done at endio context. [ENHANCEMENT] This patch will make a new union in btrfs_bio, taking the space of the old data checksums, thus it will not increase the memory usage. With that extra btrfs_tree_parent_check inside btrfs_bio, we can just pass the check parameter into read_extent_buffer_pages(), and before submitting the bio, we can copy the check structure into btrfs_bio. And finally at endio time, we can grab btrfs_bio::parent_check and pass it to validate_extent_buffer(), to move the remaining checks into it. This brings the following benefits: - Much simpler btrfs_read_extent_buffer() Now it only needs to iterate through all mirrors. - Simpler read-time transid check Previously we go verify_parent_transid() after reading out the extent buffer. Now the transid check is done inside the endio function, no other code can modify the content. Thus no need to use the extent lock anymore. Signed-off-by: Qu Wenruo <wqu@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'sound/atmel')
0 files changed, 0 insertions, 0 deletions