Whamcloud - gitweb
LU-2435 osd-zfs: use zfs native dnode accounting
[fs/lustre-release.git] / config / lustre-build-zfs.m4
index ff7f115..ded7085 100644 (file)
@@ -503,6 +503,18 @@ your distribution.
                        AC_DEFINE(HAVE_DMU_PREFETCH_6ARG, 1,
                                [Have 6 argument dmu_pretch in ZFS])
                ])
+               dnl #
+               dnl # ZFS 0.7.0 feature: SPA_FEATURE_USEROBJ_ACCOUNTING
+               dnl #
+               LB_CHECK_COMPILE([if zfs has native dnode accounting supported],
+               dmu_objset_userobjspace_upgrade, [
+                       #include <sys/dmu_objset.h>
+               ],[
+                       dmu_objset_userobjspace_upgrade(NULL);
+               ],[
+                       AC_DEFINE(HAVE_DMU_USEROBJ_ACCOUNTING, 1,
+                               [Have native dnode accounting in ZFS])
+               ])
        ])
 
        AM_CONDITIONAL(ZFS_ENABLED, [test "x$enable_zfs" = xyes])