Whamcloud - gitweb
LU-16138 kernel: preserve RHEL8.x server kABI for block integrity 08/48608/2
authorJian Yu <yujian@whamcloud.com>
Tue, 20 Sep 2022 18:19:12 +0000 (11:19 -0700)
committerOleg Drokin <green@whamcloud.com>
Mon, 10 Oct 2022 05:36:36 +0000 (05:36 +0000)
Currently there are two kernel patches supporting SCSI T10-PI feature
left in the RHEL8.x series:

- block-integrity-allow-optional-integrity-functions-rhel8.patch
- block-pass-bio-into-integrity_processing_fn-rhel8.patch

The changes in the patches modified "struct bio_integrity_payload"
and "struct blk_integrity_iter", which caused kABI breakage.

This patch fixes the patches to preserve kABI by using
RH-supplied compatibility macros.

Test-Parameters: trivial fstype=ldiskfs clientdistro=el8.5 serverdistro=el8.5
Test-Parameters: trivial fstype=ldiskfs clientdistro=el8.6 serverdistro=el8.6

Change-Id: If547e1cd4ae4ff1affd315bbfefaeeff4f1dea81
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/48608
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Li Dongyang <dongyangli@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
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

index 5381f2a..5b4ba43 100644 (file)
@@ -164,22 +164,23 @@ Index: linux-4.18.0-80.el8/block/bio-integrity.c
        if (IS_ERR(bip))
                return PTR_ERR(bip);
  
-Index: linux-4.18.0-80.el8/include/linux/bio.h
+Index: linux-4.18.0-372.19.1.el8_6/include/linux/bio.h
 ===================================================================
---- linux-4.18.0-80.el8.orig/include/linux/bio.h
-+++ linux-4.18.0-80.el8/include/linux/bio.h
-@@ -313,6 +313,10 @@ struct bio_integrity_payload {
+--- linux-4.18.0-372.19.1.el8_6.orig/include/linux/bio.h
++++ linux-4.18.0-372.19.1.el8_6/include/linux/bio.h
+@@ -307,8 +307,9 @@ struct bio_integrity_payload {
  
        struct bio_vec          *bip_vec;
  
+-      RH_KABI_RESERVE(1)
+-      RH_KABI_RESERVE(2)
 +      /* put after bip_vec as that is last externally-accessed bip_ field */
-+      integrity_processing_fn *bip_generate_fn;
-+      integrity_processing_fn *bip_verify_fn;
-+
-       RH_KABI_RESERVE(1)
-       RH_KABI_RESERVE(2)
++      RH_KABI_USE(1, integrity_processing_fn *bip_generate_fn)
++      RH_KABI_USE(2, integrity_processing_fn *bip_verify_fn)
  
-@@ -760,6 +764,11 @@ static inline bool bioset_initialized(st
+       struct bio_vec          bip_inline_vecs[0];/* embedded bvec array */
+ };
+@@ -728,6 +729,11 @@ static inline bool bioset_initialized(st
                bip_for_each_vec(_bvl, _bio->bi_integrity, _iter)
  
  extern struct bio_integrity_payload *bio_integrity_alloc(struct bio *, gfp_t, unsigned int);
index b5864b7..44c97e7 100644 (file)
@@ -36,17 +36,17 @@ Index: linux-4.18.0/block/bio-integrity.c
        }
        return ret;
  }
-Index: linux-4.18.0/include/linux/blkdev.h
+Index: linux-4.18.0-372.19.1.el8_6/include/linux/blkdev.h
 ===================================================================
---- linux-4.18.0.orig/include/linux/blkdev.h
-+++ linux-4.18.0/include/linux/blkdev.h
-@@ -1802,7 +1802,9 @@ struct blk_integrity_iter {
+--- linux-4.18.0-372.19.1.el8_6.orig/include/linux/blkdev.h
++++ linux-4.18.0-372.19.1.el8_6/include/linux/blkdev.h
+@@ -1615,7 +1615,9 @@ struct blk_integrity_iter {
        sector_t                seed;
        unsigned int            data_size;
        unsigned short          interval;
-+      unsigned short          bi_idx;
++      RH_KABI_FILL_HOLE(unsigned short bi_idx)
        const char              *disk_name;
-+      struct bio              *bio;
++      RH_KABI_EXTEND(struct bio *bio)
  };
  
  typedef blk_status_t (integrity_processing_fn) (struct blk_integrity_iter *);