zfs_ioctl.h revision 3cb34c601f3ef3016f638574f5982e80c3735c71
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_ZFS_IOCTL_H
#define _SYS_ZFS_IOCTL_H
#pragma ident "%Z%%M% %I% %E% SMI"
#include <sys/dsl_deleg.h>
#ifdef _KERNEL
#endif /* _KERNEL */
#ifdef __cplusplus
extern "C" {
#endif
/*
* Property values for snapdir
*/
#define ZFS_SNAPDIR_HIDDEN 0
#define ZFS_SNAPDIR_VISIBLE 1
#define DMU_BACKUP_STREAM_VERSION (1ULL)
#define DMU_BACKUP_HEADER_VERSION (2ULL)
#define DMU_BACKUP_MAGIC 0x2F5bacbacULL
#define DRR_FLAG_CLONE (1<<0)
/*
* zfs ioctl command structure
*/
typedef struct dmu_replay_record {
enum {
} drr_type;
union {
struct drr_begin {
char drr_toname[MAXNAMELEN];
} drr_begin;
struct drr_end {
} drr_end;
struct drr_object {
/* bonus content follows */
} drr_object;
struct drr_freeobjects {
struct drr_write {
/* content follows */
} drr_write;
struct drr_free {
} drr_free;
} drr_u;
typedef struct zinject_record {
#define ZINJECT_NULL 0x1
#define ZINJECT_FLUSH_ARC 0x2
#define ZINJECT_UNLOAD_SPA 0x4
typedef struct zfs_share {
} zfs_share_t;
typedef struct zfs_cmd {
char zc_name[MAXPATHLEN];
char zc_string[MAXNAMELEN];
struct drr_begin zc_begin_record;
} zfs_cmd_t;
#ifdef _KERNEL
typedef struct zfs_creat {
int zct_norm;
} zfs_creat_t;
extern dev_info_t *zfs_dip;
extern int zfs_secpolicy_rename_perms(const char *from,
extern int zfs_busy(void);
extern int zfs_unmount_snap(char *, void *);
#endif /* _KERNEL */
#ifdef __cplusplus
}
#endif
#endif /* _SYS_ZFS_IOCTL_H */