Whamcloud - gitweb
LU-16413 osd-ldiskfs: fix T10PI for CentOS 8.x
authorLi Dongyang <dongyangli@ddn.com>
Mon, 19 Dec 2022 10:03:47 +0000 (21:03 +1100)
committerAndreas Dilger <adilger@whamcloud.com>
Wed, 4 Jan 2023 20:38:46 +0000 (20:38 +0000)
commitf1bd01f77ce8e7a8f7519332a794a6cdc55ae0bf
treee345fc051d7d96925f5cc5f9123c7e2517469dec
parent4159cd333726afada0c31ca2c217b66b4500d050
LU-16413 osd-ldiskfs: fix T10PI for CentOS 8.x

Recreate the currently broken lustre kernel patches
to allow using custom integrity functions for bio.
Note we don't need to save the generate_fn anymore,
it will be used once we call bio_integrity_prep_fn().

Add upstream fix
b13e0c718568 ("block: bio-integrity: Advance seed correctly
for larger interval sizes") for CentOS 8.0 to 8.6.

Handle the kernel api changes for the T10PI generate and
verify functions introduced in CentOS 8.x kernel,
mostly because of switching to blk_integrity_iter.

Update the custom generate and verify functions, to sync
with upstream versions.
- Add T10-DIF-TYPE2, currently only a place holder,
  not used in upstream either.
- Use __be16 instead of __u16 for guard tags.

Only reuse guard tags if the rpc checksum is the same
one supported on the target. We already have some protection
during checksum type negotiation, the server
will mark the target's T10PI type as the only
T10PI checksum type supported. But it's still good to
have the logic in place.

Do not call bio_integrity_prep() if the custom interface
bio_integrity_prep_fn() does not exist, submit_bio() will
do that for us.

On the servers, show the target's T10PI checksum as
the preferred checksum_type even if it's not the fastest.
Note this is only cosmetic and does not impact the checksum
type used, which is still done during negotiation.

Lustre-change: https://review.whamcloud.com/49441
Lustre-commit: TBD (from a0c96829a760a5cf199e5278bf2693f2618b77c9)

Change-Id: I2d0ba0b80ba9cde2977da24db08095671aa5373c
Test-Parameters: trivial
Fixes: 293844d132 ("LU-16222 kernel: RHEL 8.7 client and server support")
Fixes: f176efd183 ("LU-12269 kernel: RHEL 8.0 server support")
Signed-off-by: Li Dongyang <dongyangli@ddn.com>
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/49483
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
24 files changed:
lustre/autoconf/lustre-core.m4
lustre/include/obd.h
lustre/include/obd_cksum.h
lustre/kernel_patches/patches/block-bio-integrity-Advance-seed-correctly-for-large.patch [new file with mode: 0644]
lustre/kernel_patches/patches/block-integrity-allow-optional-integrity-functions-rhel8.3.patch [moved from lustre/kernel_patches/patches/block-integrity-allow-optional-integrity-functions-rhel8.7.patch with 52% similarity]
lustre/kernel_patches/patches/block-integrity-allow-optional-integrity-functions-rhel8.patch
lustre/kernel_patches/patches/block-pass-bio-into-integrity_processing_fn-rhel8.patch
lustre/kernel_patches/series/4.18-rhel8.1.series
lustre/kernel_patches/series/4.18-rhel8.2.series
lustre/kernel_patches/series/4.18-rhel8.3.series
lustre/kernel_patches/series/4.18-rhel8.4.series
lustre/kernel_patches/series/4.18-rhel8.5.series
lustre/kernel_patches/series/4.18-rhel8.6.series
lustre/kernel_patches/series/4.18-rhel8.7.series
lustre/kernel_patches/series/4.18-rhel8.series
lustre/mdt/mdt_lproc.c
lustre/obdclass/integrity.c
lustre/ofd/lproc_ofd.c
lustre/osc/osc_request.c
lustre/osd-ldiskfs/osd_handler.c
lustre/osd-ldiskfs/osd_integrity.c
lustre/osd-ldiskfs/osd_internal.h
lustre/osd-ldiskfs/osd_io.c
lustre/target/tgt_handler.c