diff options
author | xianrong.zhou <xianrong.zhou@transsion.com> | 2020-01-07 07:34:24 +0300 |
---|---|---|
committer | Mike Snitzer <snitzer@redhat.com> | 2020-01-07 20:07:33 +0300 |
commit | 0a531c5a39a71279e0a98097562bf14b5a43529e (patch) | |
tree | 2e6063841e2d2de813d1516035e7e0c64f7e6c45 /drivers/md/persistent-data/dm-space-map-disk.c | |
parent | 9402e959014a18b4ebf7558733076875808dd66c (diff) | |
download | linux-0a531c5a39a71279e0a98097562bf14b5a43529e.tar.xz |
dm verity: don't prefetch hash blocks for already-verified data
Try to skip prefetching hash blocks that won't be needed due to the
"check_at_most_once" option being enabled and the corresponding data
blocks already having been verified.
Since prefetching operates on a range of data blocks, do this by just
trimming the two ends of the range. This doesn't skip every unneeded
hash block, since data blocks in the middle of the range could also be
unneeded, and hash blocks are still prefetched in large clusters as
controlled by dm_verity_prefetch_cluster. But it can still help a lot.
In a test on Android Q launching 91 apps every 15s repeated 21 times,
prefetching was only done for 447177/4776629 = 9.36% of data blocks.
Tested-by: ruxian.feng <ruxian.feng@transsion.com>
Co-developed-by: yuanjiong.gao <yuanjiong.gao@transsion.com>
Signed-off-by: yuanjiong.gao <yuanjiong.gao@transsion.com>
Signed-off-by: xianrong.zhou <xianrong.zhou@transsion.com>
[EB: simplified the 'while' loops and improved the commit message]
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/md/persistent-data/dm-space-map-disk.c')
0 files changed, 0 insertions, 0 deletions