AC_DEFINE(HAVE_DSL_POOL_CONFIG, 1,
[Have dsl_pool_config_enter/exit in ZFS])
])
+ LB_CHECK_COMPILE([if zfs defines dsl_sync_task_do_nowait],
+ dsl_sync_task_do_nowait, [
+ #include <sys/dsl_synctask.h>
+ ],[
+ dsl_sync_task_do_nowait(NULL, NULL, NULL, NULL, NULL, 0, NULL);
+ ],[
+ AC_DEFINE(HAVE_DSL_SYNC_TASK_DO_NOWAIT, 1,
+ [Have dsl_sync_task_do_nowait in ZFS])
+ ])
])
AM_CONDITIONAL(ZFS_ENABLED, [test "x$enable_zfs" = xyes])
* we go over all the changes cached in per-txg structure
* and apply them to actual ZAPs
*/
+#ifdef HAVE_DSL_SYNC_TASK_DO_NOWAIT
static void osd_zfs_acct_update(void *arg, void *arg2, dmu_tx_t *tx)
+#else
+static void osd_zfs_acct_update(void *arg, dmu_tx_t *tx)
+#endif
{
struct osd_zfs_acct_txg *zat = arg;
struct osd_device *osd = zat->zat_osd;
OBD_FREE_PTR(zat);
}
-static int osd_zfs_acct_check(void *arg1, void *arg2, dmu_tx_t *tx)
-{
- /* check function isn't used currently */
- return 0;
-}
+#ifdef HAVE_DSL_SYNC_TASK_DO_NOWAIT
+#define dsl_sync_task_nowait(pool, func, arg, blocks, tx) \
+ dsl_sync_task_do_nowait(pool, NULL, func, arg, NULL, blocks, tx)
+#endif
/*
* if any change to the object accounting is going to happen,
spa_t *spa = dmu_objset_spa(osd->od_objset.os);
LASSERT(ac->zat_osd == NULL);
ac->zat_osd = osd;
- dsl_sync_task_do_nowait(spa_get_dsl(spa),
- osd_zfs_acct_check,
+ dsl_sync_task_nowait(spa_get_dsl(spa),
osd_zfs_acct_update,
- ac, NULL, 128, oh->ot_tx);
+ ac, 128, oh->ot_tx);
/* no to be freed now */
ac = NULL;