Skip to content

Fix bio splitting by the crypto fallback code

Bart Van Assche linux-block 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest7 patches 13 repliesIn review
  2. v22 patches 13 repliesSuperseded
  3. v13 patches 3 repliesSuperseded

Changes in v3 from the cover letter

- Added a patch that optimizes blk_crypto_max_io_size().
- Added three patches that change calling conventions in the crypto fallback code.
- Added a patch to remove crypto_bio_split.
- Moved the blk_crypto_max_io_size() call into get_max_io_size().

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7block: Improve blk_crypto_fallback_split_bio_if_needed()block/blk-crypto-fallback.c+3 -22 replies
2/7block: Split blk_crypto_fallback_split_bio_if_needed()block/blk-crypto-fallback.c+15 -40 replies
3/7block: Modify the blk_crypto_bio_prep() calling conventionblock/blk-core.c block/blk-crypto-internal.h block/blk-crypto.c+18 -190 replies
4/7block: Modify the blk_crypto_fallback_bio_prep() calling conventionblock/blk-crypto-fallback.c block/blk-crypto-internal.h block/blk-crypto.c+16 -140 replies
5/7block: Change the blk_crypto_fallback_encrypt_bio() calling conventionblock/blk-crypto-fallback.c+9 -140 replies
6/7block: Rework splitting of encrypted biosblock/blk-core.c block/blk-crypto-fallback.c block/blk-crypto-internal.h +1 more+24 -370 replies
7/7block, crypto: Remove crypto_bio_splitblock/blk-crypto-fallback.c+1 -80 replies

Reviews trailers per patch

1 of 7 patches has a Reviewed-by or Acked-by.

PatchJohn Garry
1/7R-b
2/7
3/7
4/7
5/7
6/7
7/7

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/7] Fix bio splitting by the crypto fallback code

Hi Jens,

When using the crypto fallback code, large bios are split twice. A first time by bio_split_to_limits() and a second time by the crypto fallback code. This causes bios not to be submitted in LBA error and hence triggers write errors for zoned block devices. This patch series fixes this by splitting bios once. Please consider this patch series for the next merge window.

Thanks,

Bart.

Changes compared to v2:
- Added a patch that optimizes blk_crypto_max_io_size().
- Added three patches that change calling conventions in the crypto fallback code.
- Added a patch to remove crypto_bio_split.
- Moved the blk_crypto_max_io_size() call into get_max_io_size().

Changes compared to v1:
- Dropped support for bio-based drivers that do not call bio_split_to_limits().
- Removed the BLK_FEAT_CALLS_BIO_SPLIT_TO_LIMITS and BIO_HAS_BEEN_SPLIT flags.

Bart Van Assche (7):
block: Improve blk_crypto_fallback_split_bio_if_needed()
block: Split blk_crypto_fallback_split_bio_if_needed()
block: Modify the blk_crypto_bio_prep() calling convention
block: Modify the blk_crypto_fallback_bio_prep() calling convention
block: Change the blk_crypto_fallback_encrypt_bio() calling convention
block: Rework splitting of encrypted bios
block, crypto: Remove crypto_bio_split

 block/blk-core.c            |  3 --
 block/blk-crypto-fallback.c | 85 ++++++++++++++-----------------------
 block/blk-crypto-internal.h | 25 +++++++----
 block/blk-crypto.c          | 26 ++++++------
 block/blk-merge.c           |  9 +++-
 5 files changed, 68 insertions(+), 80 deletions(-)