AC_DEFINE(HAVE_SPA_MAXBLOCKSIZE, 1,
[Have spa_maxblocksize in ZFS])
])
+
dnl #
dnl # ZFS 0.7.x adds support for large dnodes. This
dnl # allows Lustre to optionally specify the size of a
AC_DEFINE(HAVE_DMU_OBJECT_ALLOC_DNSIZE, 1,
[Have dmu_object_alloc_dnsize in ZFS])
])
+
+ dnl #
+ dnl # ZFS 0.7.x extended dmu_prefetch() to take an additional
+ dnl # 'level' and 'priority' argument. Use a level of 0 and a
+ dnl # priority of ZIO_PRIORITY_SYNC_READ to replicate the
+ dnl # behavior of the four argument version.
+ dnl #
+ LB_CHECK_COMPILE([if ZFS has 'dmu_prefetch' with 6 args],
+ dmu_prefetch, [
+ #include <sys/dmu.h>
+ ],[
+ objset_t *os = NULL;
+ uint64_t object = 0;
+ int64_t level = 0;
+ uint64_t offset = 0;
+ uint64_t len = 0;
+ enum zio_priority pri = ZIO_PRIORITY_SYNC_READ;
+
+ dmu_prefetch(os, object, level, offset, len, pri);
+ ],[
+ AC_DEFINE(HAVE_DMU_PREFETCH_6ARG, 1,
+ [Have 6 argument dmu_pretch in ZFS])
+ ])
])
AM_CONDITIONAL(ZFS_ENABLED, [test "x$enable_zfs" = xyes])
if (unlikely(rc != 0))
break;
- /* dmu_prefetch() was exported in 0.6.2, if you use with
- * an older release, just comment it out - this is an
- * optimization */
- dmu_prefetch(dev->od_os, it->mit_prefetched_dnode, 0, 0);
+ osd_dmu_prefetch(dev->od_os, it->mit_prefetched_dnode,
+ 0, 0, 0, ZIO_PRIORITY_ASYNC_READ);
it->mit_prefetched++;
}
}
#endif /* HAVE_DMU_OBJECT_ALLOC_DNSIZE */
+#ifdef HAVE_DMU_PREFETCH_6ARG
+#define osd_dmu_prefetch(os, obj, lvl, off, len, pri) \
+ dmu_prefetch((os), (obj), (lvl), (off), (len), (pri))
+#else
+#define osd_dmu_prefetch(os, obj, lvl, off, len, pri) \
+ dmu_prefetch((os), (obj), (lvl), (off))
+#endif
+
#endif /* _OSD_INTERNAL_H */
}
if (rc == 0)
- dmu_prefetch(dev->od_os, *oid, 0, 0);
+ osd_dmu_prefetch(dev->od_os, *oid, 0, 0, 0,
+ ZIO_PRIORITY_ASYNC_READ);
RETURN(rc);
}