Print this page
3996 want a libzfs_core API to rollback to latest snapshot
Reviewed by: Christopher Siden <christopher.siden@delphix.com>
Reviewed by: Adam Leventhal <ahl@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>


 248 boolean_t dsl_dataset_long_held(dsl_dataset_t *ds);
 249 
 250 int dsl_dataset_clone_swap_check_impl(dsl_dataset_t *clone,
 251     dsl_dataset_t *origin_head, boolean_t force, void *owner, dmu_tx_t *tx);
 252 void dsl_dataset_clone_swap_sync_impl(dsl_dataset_t *clone,
 253     dsl_dataset_t *origin_head, dmu_tx_t *tx);
 254 int dsl_dataset_snapshot_check_impl(dsl_dataset_t *ds, const char *snapname,
 255     dmu_tx_t *tx, boolean_t recv);
 256 void dsl_dataset_snapshot_sync_impl(dsl_dataset_t *ds, const char *snapname,
 257     dmu_tx_t *tx);
 258 
 259 void dsl_dataset_remove_from_next_clones(dsl_dataset_t *ds, uint64_t obj,
 260     dmu_tx_t *tx);
 261 void dsl_dataset_recalc_head_uniq(dsl_dataset_t *ds);
 262 int dsl_dataset_get_snapname(dsl_dataset_t *ds);
 263 int dsl_dataset_snap_lookup(dsl_dataset_t *ds, const char *name,
 264     uint64_t *value);
 265 int dsl_dataset_snap_remove(dsl_dataset_t *ds, const char *name, dmu_tx_t *tx);
 266 void dsl_dataset_set_refreservation_sync_impl(dsl_dataset_t *ds,
 267     zprop_source_t source, uint64_t value, dmu_tx_t *tx);
 268 int dsl_dataset_rollback(const char *fsname, void *owner);
 269 
 270 #ifdef ZFS_DEBUG
 271 #define dprintf_ds(ds, fmt, ...) do { \
 272         if (zfs_flags & ZFS_DEBUG_DPRINTF) { \
 273         char *__ds_name = kmem_alloc(MAXNAMELEN, KM_SLEEP); \
 274         dsl_dataset_name(ds, __ds_name); \
 275         dprintf("ds=%s " fmt, __ds_name, __VA_ARGS__); \
 276         kmem_free(__ds_name, MAXNAMELEN); \
 277         } \
 278 _NOTE(CONSTCOND) } while (0)
 279 #else
 280 #define dprintf_ds(dd, fmt, ...)
 281 #endif
 282 
 283 #ifdef  __cplusplus
 284 }
 285 #endif
 286 
 287 #endif /* _SYS_DSL_DATASET_H */


 248 boolean_t dsl_dataset_long_held(dsl_dataset_t *ds);
 249 
 250 int dsl_dataset_clone_swap_check_impl(dsl_dataset_t *clone,
 251     dsl_dataset_t *origin_head, boolean_t force, void *owner, dmu_tx_t *tx);
 252 void dsl_dataset_clone_swap_sync_impl(dsl_dataset_t *clone,
 253     dsl_dataset_t *origin_head, dmu_tx_t *tx);
 254 int dsl_dataset_snapshot_check_impl(dsl_dataset_t *ds, const char *snapname,
 255     dmu_tx_t *tx, boolean_t recv);
 256 void dsl_dataset_snapshot_sync_impl(dsl_dataset_t *ds, const char *snapname,
 257     dmu_tx_t *tx);
 258 
 259 void dsl_dataset_remove_from_next_clones(dsl_dataset_t *ds, uint64_t obj,
 260     dmu_tx_t *tx);
 261 void dsl_dataset_recalc_head_uniq(dsl_dataset_t *ds);
 262 int dsl_dataset_get_snapname(dsl_dataset_t *ds);
 263 int dsl_dataset_snap_lookup(dsl_dataset_t *ds, const char *name,
 264     uint64_t *value);
 265 int dsl_dataset_snap_remove(dsl_dataset_t *ds, const char *name, dmu_tx_t *tx);
 266 void dsl_dataset_set_refreservation_sync_impl(dsl_dataset_t *ds,
 267     zprop_source_t source, uint64_t value, dmu_tx_t *tx);
 268 int dsl_dataset_rollback(const char *fsname, void *owner, nvlist_t *result);
 269 
 270 #ifdef ZFS_DEBUG
 271 #define dprintf_ds(ds, fmt, ...) do { \
 272         if (zfs_flags & ZFS_DEBUG_DPRINTF) { \
 273         char *__ds_name = kmem_alloc(MAXNAMELEN, KM_SLEEP); \
 274         dsl_dataset_name(ds, __ds_name); \
 275         dprintf("ds=%s " fmt, __ds_name, __VA_ARGS__); \
 276         kmem_free(__ds_name, MAXNAMELEN); \
 277         } \
 278 _NOTE(CONSTCOND) } while (0)
 279 #else
 280 #define dprintf_ds(dd, fmt, ...)
 281 #endif
 282 
 283 #ifdef  __cplusplus
 284 }
 285 #endif
 286 
 287 #endif /* _SYS_DSL_DATASET_H */