Whamcloud - gitweb
LU-11024 osd-zfs: properly detect ZFS dnode accounting
[fs/lustre-release.git] / config / lustre-build-zfs.m4
index 07f00dc..0bcdf20 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])
@@ -655,6 +655,19 @@ your distribution.
                        AC_DEFINE(HAVE_DMU_OBJSET_DISOWN_3ARG, 1,
                                [Have dmu_objset_disown() with 3 args])
                ])
+               dnl #
+               dnl # ZFS 0.7.2 adds new method dmu_tx_mark_netfree
+               dnl #
+               LB_CHECK_COMPILE([if ZFS has 'dmu_tx_mark_netfree'],
+               dmu_tx_mark_netfree, [
+                       #include <sys/dmu.h>
+               ],[
+                       dmu_tx_t *tx = NULL;
+                       dmu_tx_mark_netfree(tx);
+               ],[
+                       AC_DEFINE(HAVE_DMU_TX_MARK_NETFREE, 1,
+                               [Have dmu_tx_mark_netfree])
+               ])
        ])
 
        AS_IF([test "x$enable_zfs" = xyes], [