Whamcloud - gitweb
LU-16925 osd-ldiskfs: Remove unused bio_integrity_enabled 32/51432/2
authorShaun Tancheff <shaun.tancheff@hpe.com>
Sat, 24 Jun 2023 05:08:48 +0000 (12:08 +0700)
committerOleg Drokin <green@whamcloud.com>
Sat, 8 Jul 2023 22:37:22 +0000 (22:37 +0000)
bio_integrity_enabled() is not used in lustre.

Remove the configure check and the associated code.

Test-Parameters: trivial
HPE-bug-id: LUS-10118
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: I9d07333b91210a2f6545945cf48293179a71258e
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/51432
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Petros Koutoupis <petros.koutoupis@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/autoconf/lustre-core.m4
lustre/osd-ldiskfs/osd_compat.c
lustre/osd-ldiskfs/osd_internal.h

index 713d2c3..9057da9 100644 (file)
@@ -2414,26 +2414,6 @@ AC_DEFUN([LC_BI_STATUS], [
 ]) # LC_BI_STATUS
 
 #
-# LC_BIO_INTEGRITY_ENABLED
-#
-# 4.13 removed bio_integrity_enabled
-#
-AC_DEFUN([LC_SRC_BIO_INTEGRITY_ENABLED], [
-       LB2_LINUX_TEST_SRC([bio_integrity_enabled], [
-               #include <linux/bio.h>
-       ],[
-               bio_integrity_enabled(NULL);
-       ])
-])
-AC_DEFUN([LC_BIO_INTEGRITY_ENABLED], [
-       AC_MSG_CHECKING([if 'bio_integrity_enabled' exist])
-       LB2_LINUX_TEST_RESULT([bio_integrity_enabled], [
-               AC_DEFINE(HAVE_BIO_INTEGRITY_ENABLED, 1,
-                       ['bio_integrity_enabled' is available])
-       ])
-]) # LC_BIO_INTEGRITY_ENABLED
-
-#
 # LC_PAGEVEC_INIT_ONE_PARAM
 #
 # 4.14 pagevec_init takes one parameter
@@ -3935,7 +3915,6 @@ AC_DEFUN([LC_PROG_LINUX_SRC], [
        LC_SRC_BI_STATUS
 
        # 4.13
-       LC_SRC_BIO_INTEGRITY_ENABLED
        LC_SRC_HAVE_GET_INODE_USAGE
 
        # 4.14
@@ -4190,7 +4169,6 @@ AC_DEFUN([LC_PROG_LINUX_RESULTS], [
        LC_BI_STATUS
 
        # 4.13
-       LC_BIO_INTEGRITY_ENABLED
        LC_BIO_INTEGRITY_PREP_FN_RETURNS_BOOL
        LC_HAVE_GET_INODE_USAGE
 
index 97fb9c0..f8e766b 100644 (file)
@@ -1467,33 +1467,3 @@ int osd_obj_spec_lookup(struct osd_thread_info *info, struct osd_device *osd,
 
        RETURN(rc);
 }
-
-#ifndef HAVE_BIO_INTEGRITY_ENABLED
-bool bio_integrity_enabled(struct bio *bio)
-{
-       struct blk_integrity *bi = blk_get_integrity(bio_get_disk(bio));
-
-       if (bio_op(bio) != REQ_OP_READ && bio_op(bio) != REQ_OP_WRITE)
-               return false;
-
-       if (!bio_sectors(bio))
-               return false;
-
-        /* Already protected? */
-       if (bio_integrity(bio))
-               return false;
-
-       if (bi == NULL)
-               return false;
-
-       if (bio_data_dir(bio) == READ && bi->profile->verify_fn != NULL &&
-           (bi->flags & BLK_INTEGRITY_VERIFY))
-               return true;
-
-       if (bio_data_dir(bio) == WRITE && bi->profile->generate_fn != NULL &&
-           (bi->flags & BLK_INTEGRITY_GENERATE))
-               return true;
-
-       return false;
-}
-#endif
index 5324ef3..4d57ecb 100644 (file)
@@ -1479,10 +1479,6 @@ static inline struct buffer_head *__ldiskfs_bread(handle_t *handle,
        return bh;
 }
 
-#ifndef HAVE_BIO_INTEGRITY_ENABLED
-bool bio_integrity_enabled(struct bio *bio);
-#endif
-
 #ifdef HAVE_EXT4_JOURNAL_GET_WRITE_ACCESS_4ARGS
 # define osd_ldiskfs_journal_get_write_access(handle, sb, bh, flags) \
         ldiskfs_journal_get_write_access((handle), (sb), (bh), (flags))