diff options
| author | Christoph Hellwig <hch@lst.de> | 2026-01-09 07:07:48 +0100 |
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2026-01-11 12:55:41 -0700 |
| commit | 66e5a11d2ed6d58006d5cd8276de28751daaa230 (patch) | |
| tree | aed43f96d0af5f27eae56a2ecac33e21c5238e62 /fs/buffer.c | |
| parent | 3d939695e68218d420be2b5dbb2fa39ccb7e97ed (diff) | |
blk-crypto: optimize data unit alignment checking
Avoid the relatively high overhead of constructing and walking per-page
segment bio_vecs for data unit alignment checking by merging the checks
into existing loops.
For hardware support crypto, perform the check in bio_split_io_at, which
already contains a similar alignment check applied for all I/O. This
means bio-based drivers that do not call bio_split_to_limits, should they
ever grow blk-crypto support, need to implement the check themselves,
just like all other queue limits checks.
For blk-crypto-fallback do it in the encryption/decryption loops. This
means alignment errors for decryption will only be detected after I/O
has completed, but that seems like a worthwhile trade off.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eric Biggers <ebiggers@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs/buffer.c')
0 files changed, 0 insertions, 0 deletions
