X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=config%2Flustre-build-zfs.m4;h=5a83455c64f3a4716399caf70d50e340d5fb9573;hb=refs%2Fchanges%2F36%2F43236%2F4;hp=873ad8a6d770f1d24a3059ec06757b7e0140bab7;hpb=947af94817f8eeb5e6108b0b3cde65419b13c8d3;p=fs%2Flustre-release.git diff --git a/config/lustre-build-zfs.m4 b/config/lustre-build-zfs.m4 index 873ad8a..5a83455 100644 --- a/config/lustre-build-zfs.m4 +++ b/config/lustre-build-zfs.m4 @@ -343,7 +343,7 @@ AC_DEFUN([LB_ZFS_USER], [ ZFS_LIBZFS_INCLUDE=${zfsinc} ZFS_LIBZFS_LDFLAGS=${zfslib} - ZFS_LIBZFS_LIBS="-lzfs -lnvpair" + ZFS_LIBZFS_LIBS="-lzfs -lnvpair -lzpool" AC_SUBST(ZFS_LIBZFS_INCLUDE) AC_SUBST(ZFS_LIBZFS_LDFLAGS) AC_SUBST(ZFS_LIBZFS_LIBS) @@ -698,11 +698,14 @@ your distribution. [Have inode_timespec_t]) ]) dnl # ZFS 0.7.12/0.8.x uses zfs_refcount_add() instead of - dnl # refcount_add(). + dnl # refcount_add(). ZFS 2.0 renamed sys/refcount.h to + dnl # sys/zfs_refcount.h, rather the add another check to + dnl # determine the correct header name include it + dnl # indirectly through sys/dnode.h. dnl # LB_CHECK_COMPILE([if ZFS has 'zfs_refcount_add'], zfs_refcount_add, [ - #include + #include ],[ zfs_refcount_add((zfs_refcount_t *) NULL, NULL); ],[ @@ -749,6 +752,21 @@ your distribution. AC_DEFINE(HAVE_DMU_OFFSET_NEXT, 1, [Have dmu_offset_next() exported]) ]) + dnl # + dnl # ZFS 2.0 replaced .db_last_dirty / .dr_next with a list_t + dnl # and list_node_t named .db_dirty_records / .dr_dbuf_node. + dnl # + LB_CHECK_COMPILE([if ZFS has 'db_dirty_records' list_t], + db_dirty_records, [ + #include + ],[ + dmu_buf_impl_t db; + dbuf_dirty_record_t *dr; + dr = list_head(&db.db_dirty_records); + ],[ + AC_DEFINE(HAVE_DB_DIRTY_RECORDS_LIST, 1, + [Have db_dirty_records list_t]) + ]) ]) AS_IF([test "x$enable_zfs" = xyes], [