Whamcloud - gitweb
LU-11024 osd-zfs: properly detect ZFS dnode accounting 18/32418/3
authorFan Yong <fan.yong@intel.com>
Wed, 16 May 2018 08:00:29 +0000 (16:00 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 21 May 2018 16:51:31 +0000 (16:51 +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/32418
Tested-by: Jenkins
Reviewed-by: Jinshan Xiong <jinshan.xiong@gmail.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
config/lustre-build-zfs.m4

index 6debc60..0bcdf20 100644 (file)
@@ -522,11 +522,11 @@ your distribution.
                dnl #
                dnl # ZFS 0.7.0 feature: SPA_FEATURE_USEROBJ_ACCOUNTING
                dnl #
                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>
                ],[
                        #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])
                ],[
                        AC_DEFINE(HAVE_DMU_USEROBJ_ACCOUNTING, 1,
                                [Have native dnode accounting in ZFS])