+
+#ifndef HAVE_DSL_POOL_CONFIG
+static inline void dsl_pool_config_enter(dsl_pool_t *dp, char *name)
+{
+}
+
+static inline void dsl_pool_config_exit(dsl_pool_t *dp, char *name)
+{
+}
+#endif
+
+#ifdef HAVE_SPA_MAXBLOCKSIZE
+#define osd_spa_maxblocksize(spa) spa_maxblocksize(spa)
+#define osd_spa_maxblockshift(spa) fls64(spa_maxblocksize(spa) - 1)
+#else
+#define osd_spa_maxblocksize(spa) SPA_MAXBLOCKSIZE
+#define osd_spa_maxblockshift(spa) SPA_MAXBLOCKSHIFT
+#define SPA_OLD_MAXBLOCKSIZE SPA_MAXBLOCKSIZE
+#endif
+
+#ifdef HAVE_SA_SPILL_ALLOC
+static inline void *
+osd_zio_buf_alloc(size_t size)
+{
+ return sa_spill_alloc(KM_SLEEP);
+}
+
+static inline void
+osd_zio_buf_free(void *buf, size_t size)
+{
+ sa_spill_free(buf);
+}
+#else
+#define osd_zio_buf_alloc(size) zio_buf_alloc(size)
+#define osd_zio_buf_free(buf, size) zio_buf_free(buf, size)
+#endif
+