From f809b81269f92131d5b845e1c88c2bff2b06bf2a Mon Sep 17 00:00:00 2001 From: James Simmons Date: Thu, 3 Feb 2022 14:23:16 -0500 Subject: [PATCH] LU-15422 build: Update ZFS version to 2.0.7 Update ZFS version to 2.0.7. The changes are listed in: https://github.com/openzfs/zfs/releases/tag/zfs-2.0.7 Change-Id: I5dcff31af1458c5c9d2fe17256e31751535578d8 Signed-off-by: James Simmons Reviewed-on: https://review.whamcloud.com/46006 Tested-by: jenkins Reviewed-by: Andreas Dilger Reviewed-by: Olaf Faaland-LLNL Tested-by: Maloo Reviewed-by: Oleg Drokin --- config/lustre-build-zfs.m4 | 13 +++++++++++++ contrib/lbuild/lbuild | 2 +- lustre/ChangeLog | 2 +- lustre/osd-zfs/osd_internal.h | 6 ++++++ 4 files changed, 21 insertions(+), 2 deletions(-) diff --git a/config/lustre-build-zfs.m4 b/config/lustre-build-zfs.m4 index 27b0c0f..f17f296 100644 --- a/config/lustre-build-zfs.m4 +++ b/config/lustre-build-zfs.m4 @@ -767,6 +767,19 @@ your distribution. AC_DEFINE(HAVE_DB_DIRTY_RECORDS_LIST, 1, [Have db_dirty_records list_t]) ]) + dnl # + dnl # ZFS 2.0 renamed sys/refcount.h to zfs_refcount.h + dnl # This build issue shows up with ZFS 2.0.7 and Lustre 2.12 LTS + dnl # + LB_CHECK_COMPILE([if ZFS renamed sys/refcount to zfs_refcount.h], + zfs_zfs_refcount, [ + #include + ],[ + zfs_refcount_add((zfs_refcount_t *) NULL, NULL); + ],[ + AC_DEFINE(HAVE_ZFS_REFCOUNT_HEADER, 1, + [Have zfs_refcount.h]) + ]) ]) AS_IF([test "x$enable_zfs" = xyes], [ diff --git a/contrib/lbuild/lbuild b/contrib/lbuild/lbuild index 303d332..1f64c5d 100755 --- a/contrib/lbuild/lbuild +++ b/contrib/lbuild/lbuild @@ -1019,7 +1019,7 @@ build_spl_zfs() { # The spl/zfs spec files expect RPM_BUILD_ROOT to point to the root of the # destination for the rpms export RPM_BUILD_ROOT=$TOPDIR - SPLZFSVER=${SPLZFSVER:-2.0.6} + SPLZFSVER=${SPLZFSVER:-2.0.7} SPLZFSTAG=${SPLZFSTAG:-} # "spl zfs" prior to 0.8.0 # "zfs" for 0.8.0 and later diff --git a/lustre/ChangeLog b/lustre/ChangeLog index b3fa609..978b554 100644 --- a/lustre/ChangeLog +++ b/lustre/ChangeLog @@ -53,7 +53,7 @@ TBD Whamcloud 5.11.0-31 (Ubuntu 20.04.3 HWE) 5.11.0 (vanilla kernel.org) * Recommended e2fsprogs version: 1.46.2.wc1 or newer - * Recommended ZFS version: 2.0.6 + * Recommended ZFS version: 2.0.7 * NFS export disabled when stack size < 8192 (32-bit Lustre clients), since the NFSv4 export of Lustre filesystem with 4K stack may cause a stack overflow. For more information, please refer to bugzilla 17630. diff --git a/lustre/osd-zfs/osd_internal.h b/lustre/osd-zfs/osd_internal.h index e3fcd3d..176ef7b 100644 --- a/lustre/osd-zfs/osd_internal.h +++ b/lustre/osd-zfs/osd_internal.h @@ -39,6 +39,7 @@ #ifndef _OSD_INTERNAL_H #define _OSD_INTERNAL_H +#include #include #include #include @@ -49,6 +50,9 @@ #endif #include #include +#ifdef HAVE_ZFS_REFCOUNT_HEADER +#include +#endif #include #include #include @@ -98,9 +102,11 @@ #define OSD_MAX_CACHE_SIZE OBD_OBJECT_EOF +#ifndef HAVE_ZFS_REFCOUNT_HEADER #ifndef HAVE_ZFS_REFCOUNT_ADD #define zfs_refcount_add refcount_add #endif +#endif extern const struct dt_body_operations osd_body_scrub_ops; extern const struct dt_body_operations osd_body_ops; -- 1.8.3.1