diff options
author | Eric Biggers <ebiggers@google.com> | 2022-12-23 12:36:29 -0800 |
---|---|---|
committer | Eric Biggers <ebiggers@google.com> | 2023-01-09 19:05:54 -0800 |
commit | 9098f36b739db9a77d24b7c302dcb9d3fe987308 (patch) | |
tree | 6eab452a3fd714bfb23088ef2f642468f73b7130 /scripts/coccinelle/api/kfree_sensitive.cocci | |
parent | 284d5db5f99efa9e3549eb3cba39379d48879db1 (diff) |
fsverity: simplify Merkle tree readahead size calculation
First, calculate max_ra_pages more efficiently by using the bio size.
Second, calculate the number of readahead pages from the hash page
index, instead of calculating it ahead of time using the data page
index. This ends up being a bit simpler, especially since level 0 is
last in the tree, so we can just limit the readahead to the tree size.
Signed-off-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Andrey Albershteyn <aalbersh@redhat.com>
Tested-by: Ojaswin Mujoo <ojaswin@linux.ibm.com>
Link: https://lore.kernel.org/r/20221223203638.41293-3-ebiggers@kernel.org
Diffstat (limited to 'scripts/coccinelle/api/kfree_sensitive.cocci')
0 files changed, 0 insertions, 0 deletions