From: Chris Horn Date: Wed, 28 Nov 2018 21:00:25 +0000 (-0600) Subject: LU-11712 osd-ldiskfs: Wrap blk integrity with config check X-Git-Tag: 2.12.51~95 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;ds=sidebyside;h=refs%2Fchanges%2F45%2F33745%2F2;hp=28e5420434dceae977e9dc493086b68079c76301;p=fs%2Flustre-release.git LU-11712 osd-ldiskfs: Wrap blk integrity with config check Build is currently broken for kernels without CONFIG_BLK_DEV_INTEGRITY. Build failure introduced by LU-11096 commit c8505c2e70d03ba20edf9fcbf431888e87a21147 https://review.whamcloud.com/#/c/32725/ Use of blk integrity should be wrapped in the config check for HAVE_BLK_INTEGRITY_ENABLED Signed-off-by: Chris Horn Change-Id: Iac9e4a2572024c026132c87c11042cf353b14d48 Reviewed-on: https://review.whamcloud.com/33745 Tested-by: Jenkins Reviewed-by: Andreas Dilger Reviewed-by: James Simmons Tested-by: Maloo Reviewed-by: Oleg Drokin --- diff --git a/lustre/include/lustre_compat.h b/lustre/include/lustre_compat.h index 34465f1..f55f6e5 100644 --- a/lustre/include/lustre_compat.h +++ b/lustre/include/lustre_compat.h @@ -742,6 +742,7 @@ static inline unsigned int bip_size(struct bio_integrity_payload *bip) #endif } +#ifdef HAVE_BLK_INTEGRITY_ENABLED #ifndef INTEGRITY_FLAG_READ #define INTEGRITY_FLAG_READ BLK_INTEGRITY_VERIFY #endif @@ -777,6 +778,12 @@ static inline bool bdev_integrity_enabled(struct block_device *bdev, int rw) return false; } +#else +static inline bool bdev_integrity_enabled(struct block_device *bdev, int rw) +{ + return false; +} +#endif /* HAVE_BLK_INTEGRITY_ENABLED */ #ifdef HAVE_PAGEVEC_INIT_ONE_PARAM #define ll_pagevec_init(pvec, n) pagevec_init(pvec)