dsl_prop.h revision ea2f5b9e5bf4966630882d6d681a94768aea1d75
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
5c0b6a79c494b543020a5d970d3f10597234672cRich Morris * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
fa9e4066f08beec538e775443c5be79dd423fcabahrens * Use is subject to license terms.
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);
fa9e4066f08beec538e775443c5be79dd423fcabahrenstypedef struct dsl_prop_cb_record {
fa9e4066f08beec538e775443c5be79dd423fcabahrensint dsl_prop_register(struct dsl_dataset *ds, const char *propname,
fa9e4066f08beec538e775443c5be79dd423fcabahrensint dsl_prop_unregister(struct dsl_dataset *ds, const char *propname,
fa9e4066f08beec538e775443c5be79dd423fcabahrensint dsl_prop_get(const char *ddname, const char *propname,
fa9e4066f08beec538e775443c5be79dd423fcabahrensint dsl_prop_get_integer(const char *ddname, const char *propname,
745cd3c5371d020efae7a911c58c526aa1fd0dbamaybeeint dsl_prop_get_all(objset_t *os, nvlist_t **nvp, boolean_t local);
bb0ade0978a02d3fe0b0165cd4725fdcb593fbfbahrensint dsl_prop_get_ds(struct dsl_dataset *ds, const char *propname,
bb0ade0978a02d3fe0b0165cd4725fdcb593fbfbahrensint dsl_prop_get_dd(struct dsl_dir *dd, const char *propname,
fa9e4066f08beec538e775443c5be79dd423fcabahrensint dsl_prop_set(const char *ddname, const char *propname,
5c0b6a79c494b543020a5d970d3f10597234672cRich Morrisint dsl_props_set(const char *dsname, nvlist_t *nvl);
a9799022bd90b13722204e80112efaa5bf573099ckvoid dsl_prop_set_uint64_sync(dsl_dir_t *dd, const char *name, uint64_t val,
a2eea2e101e6a163a537dcc6d4e3c4da2a0ea5b2ahrensvoid dsl_prop_nvlist_add_uint64(nvlist_t *nv, zfs_prop_t prop, uint64_t value);
fa9e4066f08beec538e775443c5be79dd423fcabahrens#endif /* _SYS_DSL_PROP_H */