zfs_ioctl.h revision fa9e4066f08beec538e775443c5be79dd423fcab
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (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 2005 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"
#ifdef __cplusplus
extern "C" {
#endif
#define ZFS_DRIVER_NAME "zfs"
#define ZFS_DS_TYPE "zfs"
/*
* Property values for snapdir
*/
#define HIDDEN 0
#define VISIBLE 1
typedef struct zfs_stats {
char zs_mountpoint[MAXNAMELEN];
char zs_atime_setpoint[MAXNAMELEN];
char zs_recordsize_setpoint[MAXNAMELEN];
char zs_readonly_setpoint[MAXNAMELEN];
char zs_devices_setpoint[MAXNAMELEN];
char zs_setuid_setpoint[MAXNAMELEN];
char zs_exec_setpoint[MAXNAMELEN];
char zs_mountpoint_setpoint[MAXNAMELEN];
char zs_sharenfs[MAXNAMELEN];
char zs_sharenfs_setpoint[MAXNAMELEN];
char zs_snapdir_setpoint[MAXNAMELEN];
char zs_acl_mode_setpoint[MAXNAMELEN];
} zfs_stats_t;
#define DMU_BACKUP_VERSION (1ULL)
#define DMU_BACKUP_MAGIC 0x2F5bacbacULL
/*
* 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 {
} drr_object;
struct drr_freeobjects {
struct drr_write {
} drr_write;
struct drr_free {
} drr_free;
} drr_u;
typedef struct zfs_cmd {
char zc_name[MAXNAMELEN];
char zc_prop_name[MAXNAMELEN];
char zc_prop_value[MAXPATHLEN];
char zc_root[MAXPATHLEN];
char zc_filename[MAXPATHLEN];
struct drr_begin zc_begin_record;
} zfs_cmd_t;
#ifdef _KERNEL
extern dev_info_t *zfs_dip;
extern int zfs_busy(void);
int *rvalp);
extern int zvol_busy(void);
extern void zvol_init(void);
extern void zvol_fini(void);
#endif /* _KERNEL */
#ifdef __cplusplus
}
#endif
#endif /* _SYS_ZFS_IOCTL_H */