fa9e4066f08beec538e775443c5be79dd423fcabahrens * CDDL HEADER START
fa9e4066f08beec538e775443c5be79dd423fcabahrens * The contents of this file are subject to the terms of the
99653d4ee642c6528e88224f12409a5f23060994eschrock * Common Development and Distribution License (the "License").
99653d4ee642c6528e88224f12409a5f23060994eschrock * You may not use this file except in compliance with the License.
fa9e4066f08beec538e775443c5be79dd423fcabahrens * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
fa9e4066f08beec538e775443c5be79dd423fcabahrens * See the License for the specific language governing permissions
fa9e4066f08beec538e775443c5be79dd423fcabahrens * and limitations under the License.
fa9e4066f08beec538e775443c5be79dd423fcabahrens * When distributing Covered Code, include this CDDL HEADER in each
fa9e4066f08beec538e775443c5be79dd423fcabahrens * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
fa9e4066f08beec538e775443c5be79dd423fcabahrens * If applicable, add the following below this CDDL HEADER, with the
fa9e4066f08beec538e775443c5be79dd423fcabahrens * fields enclosed by brackets "[]" replaced with your own identifying
fa9e4066f08beec538e775443c5be79dd423fcabahrens * information: Portions Copyright [yyyy] [name of copyright owner]
fa9e4066f08beec538e775443c5be79dd423fcabahrens * CDDL HEADER END
3f9d6ad73e45c6823b409f93b0c8d4f62861d2d5Lin Ling * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
4445fffbbb1ea25fd0e9ea68b9380dd7a6709025Matthew Ahrens * Copyright (c) 2012 by Delphix. All rights reserved.
fa9e4066f08beec538e775443c5be79dd423fcabahrensextern "C" {
fa9e4066f08beec538e775443c5be79dd423fcabahrens/* The callback func may not call into the DMU or DSL! */
fa9e4066f08beec538e775443c5be79dd423fcabahrenstypedef void (dsl_prop_changed_cb_t)(void *arg, uint64_t newval);
03bad06fbb261fd4a7151a70dfeff2f5041cce1fJustin Gibbs list_node_t cbr_ds_node; /* link on ds_prop_cbs */
fa9e4066f08beec538e775443c5be79dd423fcabahrensint dsl_prop_register(struct dsl_dataset *ds, const char *propname,
03bad06fbb261fd4a7151a70dfeff2f5041cce1fJustin Gibbsvoid dsl_prop_unregister_all(struct dsl_dataset *ds, void *cbarg);
3b2aab18808792cbd248a12f1edf139b89833c13Matthew Ahrensboolean_t dsl_prop_hascb(struct dsl_dataset *ds);
fa9e4066f08beec538e775443c5be79dd423fcabahrensint dsl_prop_get(const char *ddname, const char *propname,
fa9e4066f08beec538e775443c5be79dd423fcabahrensint dsl_prop_get_integer(const char *ddname, const char *propname,
92241e0b80813d0b83c08e730a29b9d1831794fcTom Ericksonint dsl_prop_get_all(objset_t *os, nvlist_t **nvp);
3b2aab18808792cbd248a12f1edf139b89833c13Matthew Ahrensint dsl_prop_get_received(const char *dsname, nvlist_t **nvp);
bb0ade0978a02d3fe0b0165cd4725fdcb593fbfbahrensint dsl_prop_get_ds(struct dsl_dataset *ds, const char *propname,
3b2aab18808792cbd248a12f1edf139b89833c13Matthew Ahrensint dsl_prop_get_int_ds(struct dsl_dataset *ds, const char *propname,
bb0ade0978a02d3fe0b0165cd4725fdcb593fbfbahrensint dsl_prop_get_dd(struct dsl_dir *dd, const char *propname,
92241e0b80813d0b83c08e730a29b9d1831794fcTom Erickson int intsz, int numints, void *buf, char *setpoint,
3b2aab18808792cbd248a12f1edf139b89833c13Matthew Ahrensvoid dsl_props_set_sync_impl(struct dsl_dataset *ds, zprop_source_t source,
3b2aab18808792cbd248a12f1edf139b89833c13Matthew Ahrensvoid dsl_prop_set_sync_impl(struct dsl_dataset *ds, const char *propname,
3b2aab18808792cbd248a12f1edf139b89833c13Matthew Ahrens zprop_source_t source, int intsz, int numints, const void *value,
92241e0b80813d0b83c08e730a29b9d1831794fcTom Ericksonint dsl_props_set(const char *dsname, zprop_source_t source, nvlist_t *nvl);
3b2aab18808792cbd248a12f1edf139b89833c13Matthew Ahrensint dsl_prop_set_int(const char *dsname, const char *propname,
3b2aab18808792cbd248a12f1edf139b89833c13Matthew Ahrensint dsl_prop_set_string(const char *dsname, const char *propname,
3b2aab18808792cbd248a12f1edf139b89833c13Matthew Ahrensint dsl_prop_inherit(const char *dsname, const char *propname,
3b2aab18808792cbd248a12f1edf139b89833c13Matthew Ahrensint dsl_prop_predict(dsl_dir_t *dd, const char *propname,
3b2aab18808792cbd248a12f1edf139b89833c13Matthew Ahrens zprop_source_t source, uint64_t value, uint64_t *newvalp);
92241e0b80813d0b83c08e730a29b9d1831794fcTom Erickson/* flag first receive on or after SPA_VERSION_RECVD_PROPS */
3b2aab18808792cbd248a12f1edf139b89833c13Matthew Ahrensboolean_t dsl_prop_get_hasrecvd(const char *dsname);
3b2aab18808792cbd248a12f1edf139b89833c13Matthew Ahrensint dsl_prop_set_hasrecvd(const char *dsname);
3b2aab18808792cbd248a12f1edf139b89833c13Matthew Ahrensvoid dsl_prop_unset_hasrecvd(const char *dsname);
a2eea2e101e6a163a537dcc6d4e3c4da2a0ea5b2ahrensvoid dsl_prop_nvlist_add_uint64(nvlist_t *nv, zfs_prop_t prop, uint64_t value);
fa9e4066f08beec538e775443c5be79dd423fcabahrens#endif /* _SYS_DSL_PROP_H */