On 15/07/2025 21:10, Bart Van Assche wrote:
Remove the assumption that bv_len is a multiple of 512 bytes since this is not guaranteed by the block layer. This assumption may cause this function to return a smaller value than it should. This is harmless from a correctness point of view but may result in suboptimal performance. Note: unsigned int is sufficient for num_bytes since bio_for_each_segment() yields at most one page per iteration and since PAGE_SIZE * BIO_MAX_VECS fits in an unsigned int. Suggested-by: John Garry <john.g.garry@xxxxxxxxxx> Fixes: 488f6682c832 ("block: blk-crypto-fallback for Inline Encryption")
is this really a fix?
Signed-off-by: Bart Van Assche <bvanassche@xxxxxxx>
Reviewed-by: John Garry <john.g.garry@xxxxxxxxxx>