Whamcloud - gitweb
LU-11024 osd-zfs: properly detect ZFS dnode accounting 22/32422/2
authorFan Yong <fan.yong@intel.com>
Wed, 16 May 2018 08:00:29 +0000 (16:00 +0800)
committerJohn L. Hammond <john.hammond@intel.com>
Fri, 18 May 2018 17:47:55 +0000 (17:47 +0000)
Properly detect if native ZFS dnode accounting is available for
ZFS 0.7.x releases that do not contain ZFS project quota.  The
function signature changed after ZFS Project Quota was landed,
but we still need to check for the old function for 0.7.x.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: Icd40e0bdaa0b7738e9aa761836167780843ebbe5
Reviewed-on: https://review.whamcloud.com/32422
Tested-by: Jenkins
Reviewed-by: John L. Hammond <john.hammond@intel.com>
config/lustre-build-zfs.m4

index e9f8bf0..8428e82 100644 (file)
@@ -522,11 +522,11 @@ your distribution.
                dnl #
                dnl # ZFS 0.7.0 feature: SPA_FEATURE_USEROBJ_ACCOUNTING
                dnl #
-               LB_CHECK_COMPILE([if zfs has native dnode accounting supported],
-               dmu_objset_id_quota_upgrade, [
+               LB_CHECK_COMPILE([if ZFS has native dnode accounting supported],
+               dmu_objset_userobjused_enabled, [
                        #include <sys/dmu_objset.h>
                ],[
-                       dmu_objset_id_quota_upgrade(NULL);
+                       dmu_objset_userobjused_enabled(NULL);
                ],[
                        AC_DEFINE(HAVE_DMU_USEROBJ_ACCOUNTING, 1,
                                [Have native dnode accounting in ZFS])