Whamcloud - gitweb
LU-16413 osd-ldiskfs: fix T10PI for CentOS 8.x 41/49441/5
authorLi Dongyang <dongyangli@ddn.com>
Mon, 19 Dec 2022 10:03:47 +0000 (21:03 +1100)
committerOleg Drokin <green@whamcloud.com>
Sat, 7 Jan 2023 07:57:56 +0000 (07:57 +0000)
commit4f0273b3bc7d2159d255ea8ce8ec1804fa67bfd8
tree16818a4271315d66d1c422117ad03e3da6872039
parent374f12ba110921df8479d3e8a702200074951459
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.

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/fs/lustre-release/+/49441
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Li Xi <lixi@ddn.com>
Reviewed-by: Oleg Drokin <green@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