Whamcloud - gitweb
EX-6127 llite: fix chunk_bits usage in readahead
authorSebastien Buisson <sbuisson@ddn.com>
Thu, 29 Jun 2023 16:06:47 +0000 (18:06 +0200)
committerAndreas Dilger <adilger@whamcloud.com>
Thu, 6 Jul 2023 04:10:48 +0000 (04:10 +0000)
commit7aed194858f6738815c53b987110e37e44c9c7b5
treec7aadcd85641e06b117712eb81d0f25222cd6868
parentfde613d01af60bd7d0dfbfeeb358a5af93a9cd15
EX-6127 llite: fix chunk_bits usage in readahead

For the minimum compression chunk size, chunk bits is zero,
so we cannot use if (chunk_bits) to determine if we're
doing compression.

This also fixes two other things:
1. A rounding error when rounding to chunk
2. Move rounding of end_idx to before first usage of
end_idx, so calculation of number of pages is correct
Without this, when the user reads 1 page or less, readahead
will calculate the readahead page count as 0 and will exit
without reading the chunk.

Fixes: c05d5990f4 ("EX-6127 llite: getting stripe info optimization")
Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: I273506fd4f6ed5f0b8b5020357fd7caf0531e61c
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/51504
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Artem Blagodarenko <ablagodarenko@ddn.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/llite/rw.c
lustre/tests/sanity-pfl.sh