libzfs.h revision 9d9a58e3638ed2e79c339c93e9c52b7150075364
c5c4113dfcabb1eed3d4bdf7609de5170027a794nw * CDDL HEADER START
c5c4113dfcabb1eed3d4bdf7609de5170027a794nw * The contents of this file are subject to the terms of the
c5c4113dfcabb1eed3d4bdf7609de5170027a794nw * Common Development and Distribution License (the "License").
c5c4113dfcabb1eed3d4bdf7609de5170027a794nw * You may not use this file except in compliance with the License.
c5c4113dfcabb1eed3d4bdf7609de5170027a794nw * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
c5c4113dfcabb1eed3d4bdf7609de5170027a794nw * See the License for the specific language governing permissions
c5c4113dfcabb1eed3d4bdf7609de5170027a794nw * and limitations under the License.
c5c4113dfcabb1eed3d4bdf7609de5170027a794nw * When distributing Covered Code, include this CDDL HEADER in each
c5c4113dfcabb1eed3d4bdf7609de5170027a794nw * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
c5c4113dfcabb1eed3d4bdf7609de5170027a794nw * If applicable, add the following below this CDDL HEADER, with the
c5c4113dfcabb1eed3d4bdf7609de5170027a794nw * fields enclosed by brackets "[]" replaced with your own identifying
c5c4113dfcabb1eed3d4bdf7609de5170027a794nw * information: Portions Copyright [yyyy] [name of copyright owner]
c5c4113dfcabb1eed3d4bdf7609de5170027a794nw * CDDL HEADER END
c5c4113dfcabb1eed3d4bdf7609de5170027a794nw * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
1fcced4c370617db71610fecffd5451a5894ca5eJordan Brown * Miscellaneous ZFS constants
1fcced4c370617db71610fecffd5451a5894ca5eJordan Brown * libzfs errors
1fcced4c370617db71610fecffd5451a5894ca5eJordan Brown EZFS_PROPREADONLY, /* cannot set readonly property */
1fcced4c370617db71610fecffd5451a5894ca5eJordan Brown EZFS_PROPTYPE, /* property does not apply to dataset type */
1fcced4c370617db71610fecffd5451a5894ca5eJordan Brown EZFS_PROPNONINHERIT, /* property is not inheritable */
1fcced4c370617db71610fecffd5451a5894ca5eJordan Brown EZFS_BADTYPE, /* dataset is not of appropriate type */
1fcced4c370617db71610fecffd5451a5894ca5eJordan Brown EZFS_EXISTS, /* pool or dataset already exists */
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States EZFS_BADSTREAM, /* bad backup stream */
c5c4113dfcabb1eed3d4bdf7609de5170027a794nw EZFS_VOLTOOBIG, /* volume is too large for 32-bit system */
1fcced4c370617db71610fecffd5451a5894ca5eJordan Brown EZFS_POOLUNAVAIL, /* pool is currently unavailable */
1fcced4c370617db71610fecffd5451a5894ca5eJordan Brown EZFS_DEVOVERFLOW, /* too many devices in one vdev */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright EZFS_CROSSTARGET, /* rename or clone across pool or dataset */
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright EZFS_UMOUNTFAILED, /* failed to unmount dataset */
1fcced4c370617db71610fecffd5451a5894ca5eJordan Brown EZFS_INVALCONFIG, /* invalid vdev configuration */
1fcced4c370617db71610fecffd5451a5894ca5eJordan Brown EZFS_POOLPROPS, /* couldn't retrieve pool props */
1fcced4c370617db71610fecffd5451a5894ca5eJordan Brown EZFS_POOL_NOTSUP, /* ops not supported for this type of pool */
1fcced4c370617db71610fecffd5451a5894ca5eJordan Brown EZFS_POOL_INVALARG, /* invalid argument for this pool operation */
1fcced4c370617db71610fecffd5451a5894ca5eJordan Brown EZFS_NAMETOOLONG, /* dataset name is too long */
c5c4113dfcabb1eed3d4bdf7609de5170027a794nw EZFS_NODELEGATION, /* delegated administration is disabled */
1fcced4c370617db71610fecffd5451a5894ca5eJordan Brown EZFS_UNSHARESMBFAILED, /* failed to unshare over smb */
1fcced4c370617db71610fecffd5451a5894ca5eJordan Brown EZFS_SHARESMBFAILED, /* failed to share over smb */
1fcced4c370617db71610fecffd5451a5894ca5eJordan Brown EZFS_NOTSUP, /* ops not supported on this dataset */
1fcced4c370617db71610fecffd5451a5894ca5eJordan Brown EZFS_ACTIVE_SPARE, /* pool has active shared spare devices */
1fcced4c370617db71610fecffd5451a5894ca5eJordan Brown EZFS_UNPLAYED_LOGS, /* log device has unplayed logs */
1fcced4c370617db71610fecffd5451a5894ca5eJordan Brown EZFS_REFTAG_RELE, /* snapshot release: tag not found */
1fcced4c370617db71610fecffd5451a5894ca5eJordan Brown EZFS_REFTAG_HOLD, /* snapshot hold: tag already exists */
1fcced4c370617db71610fecffd5451a5894ca5eJordan Brown EZFS_TAGTOOLONG, /* snapshot hold/rele: tag too long */
1fcced4c370617db71610fecffd5451a5894ca5eJordan Brown EZFS_THREADCREATEFAILED, /* thread create failed */
1fcced4c370617db71610fecffd5451a5894ca5eJordan Brown EZFS_POSTSPLIT_ONLINE, /* onlining a disk after splitting it */
1fcced4c370617db71610fecffd5451a5894ca5eJordan Brown * The following data structures are all part
1fcced4c370617db71610fecffd5451a5894ca5eJordan Brown * of the zfs_allow_t data structure which is
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States * used for printing 'allow' permissions.
1fcced4c370617db71610fecffd5451a5894ca5eJordan Brown * It is a linked list of zfs_allow_t's which
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright * then contain avl tree's for user/group/sets/...
1fcced4c370617db71610fecffd5451a5894ca5eJordan Brown * and each one of the entries in those trees have
1fcced4c370617db71610fecffd5451a5894ca5eJordan Brown * avl tree's for the permissions they belong to and
1fcced4c370617db71610fecffd5451a5894ca5eJordan Brown * whether they are local,descendent or local+descendent
1fcced4c370617db71610fecffd5451a5894ca5eJordan Brown * permissions. The AVL trees are used primarily for
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright * sorting purposes, but also so that we can quickly find
1fcced4c370617db71610fecffd5451a5894ca5eJordan Brown * a given user and or permission.
1fcced4c370617db71610fecffd5451a5894ca5eJordan Browntypedef struct zfs_perm_node {
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wrighttypedef struct zfs_allow_node {
typedef struct zfs_allow {
} zfs_allow_t;
struct mnttab *);
typedef struct splitflags {
} splitflags_t;
vdev_state_t *);
const char *, nvlist_t *, int);
zprop_source_t *);
char *altroot);
nvlist_t *, int);
typedef struct importargs {
} importargs_t;
char *, uint64_t);
struct zfs_cmd;
nvlist_t *);
typedef struct zprop_list {
int pl_prop;
char *pl_user_prop;
} zprop_list_t;
typedef struct zprop_get_cbdata {
int cb_sources;
const char *, const char *, zprop_source_t, const char *,
typedef struct get_all_cb {
} get_all_cb_t;
int libzfs_dataset_cmp(const void *, const void *);
nvlist_t *);
typedef struct sendflags {
} sendflags_t;
typedef struct recvflags {
} recvflags_t;
int, avl_tree_t *);
void *, void *, int, zfs_share_op_t);
#ifdef NDEBUG
boolean_t *);
extern int zpool_clear_label(int);
extern int zvol_check_dump_config(char *);
* Enable and disable datasets within a pool by mounting/unmounting and
#ifdef __cplusplus