usr/src/uts/common/sys/fs/zfs.h
author brendan
Fri, 09 Nov 2007 21:33:30 -0800
changeset 5450 b25030891c44
parent 5378 111aa1baa84a
child 5498 334b476844ca
permissions -rw-r--r--
PSARC 2007/618 ZFS L2ARC 6536054 second tier ("external") ARC
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
789
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
     1
/*
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
     2
 * CDDL HEADER START
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
     3
 *
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
     4
 * The contents of this file are subject to the terms of the
1485
e971e58d18f6 6322005 support for persistent offline
lling
parents: 1356
diff changeset
     5
 * Common Development and Distribution License (the "License").
e971e58d18f6 6322005 support for persistent offline
lling
parents: 1356
diff changeset
     6
 * You may not use this file except in compliance with the License.
789
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
     7
 *
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
     8
 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
     9
 * or http://www.opensolaris.org/os/licensing.
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    10
 * See the License for the specific language governing permissions
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    11
 * and limitations under the License.
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    12
 *
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    13
 * When distributing Covered Code, include this CDDL HEADER in each
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    14
 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    15
 * If applicable, add the following below this CDDL HEADER, with the
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    16
 * fields enclosed by brackets "[]" replaced with your own identifying
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    17
 * information: Portions Copyright [yyyy] [name of copyright owner]
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    18
 *
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    19
 * CDDL HEADER END
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    20
 */
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    21
/*
3377
a2fa338530c1 6393525 vdev_reopen() should verify that it's still the same device
eschrock
parents: 3234
diff changeset
    22
 * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
789
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    23
 * Use is subject to license terms.
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    24
 */
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    25
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    26
#ifndef	_SYS_FS_ZFS_H
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    27
#define	_SYS_FS_ZFS_H
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    28
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    29
#pragma ident	"%Z%%M%	%I%	%E% SMI"
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    30
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    31
#ifdef	__cplusplus
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    32
extern "C" {
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    33
#endif
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    34
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    35
/*
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    36
 * Types and constants shared between userland and the kernel.
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    37
 */
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    38
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    39
/*
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    40
 * Each dataset can be one of the following types.  These constants can be
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    41
 * combined into masks that can be passed to various functions.
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    42
 */
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    43
typedef enum {
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    44
	ZFS_TYPE_FILESYSTEM	= 0x1,
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    45
	ZFS_TYPE_SNAPSHOT	= 0x2,
3912
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents: 3886
diff changeset
    46
	ZFS_TYPE_VOLUME		= 0x4,
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents: 3886
diff changeset
    47
	ZFS_TYPE_POOL		= 0x8
789
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    48
} zfs_type_t;
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    49
5094
71a3e95fb9e2 PSARC 2007/342 Enhanced ZFS Pool Properties
lling
parents: 4849
diff changeset
    50
#define	ZFS_TYPE_DATASET	\
789
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    51
	(ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME | ZFS_TYPE_SNAPSHOT)
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    52
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    53
/*
5094
71a3e95fb9e2 PSARC 2007/342 Enhanced ZFS Pool Properties
lling
parents: 4849
diff changeset
    54
 * Dataset properties are identified by these constants and must be added to
71a3e95fb9e2 PSARC 2007/342 Enhanced ZFS Pool Properties
lling
parents: 4849
diff changeset
    55
 * the end of this list to ensure that external consumers are not affected
71a3e95fb9e2 PSARC 2007/342 Enhanced ZFS Pool Properties
lling
parents: 4849
diff changeset
    56
 * by the change. If you make any changes to this list, be sure to update
3654
9c6042b08979 6483718 need a stable interface to get all native properties
gw25295
parents: 3444
diff changeset
    57
 * the property table in usr/src/common/zfs/zfs_prop.c.
789
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    58
 */
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    59
typedef enum {
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    60
	ZFS_PROP_TYPE,
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    61
	ZFS_PROP_CREATION,
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    62
	ZFS_PROP_USED,
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    63
	ZFS_PROP_AVAILABLE,
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    64
	ZFS_PROP_REFERENCED,
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    65
	ZFS_PROP_COMPRESSRATIO,
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    66
	ZFS_PROP_MOUNTED,
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    67
	ZFS_PROP_ORIGIN,
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    68
	ZFS_PROP_QUOTA,
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    69
	ZFS_PROP_RESERVATION,
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    70
	ZFS_PROP_VOLSIZE,
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    71
	ZFS_PROP_VOLBLOCKSIZE,
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    72
	ZFS_PROP_RECORDSIZE,
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    73
	ZFS_PROP_MOUNTPOINT,
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    74
	ZFS_PROP_SHARENFS,
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    75
	ZFS_PROP_CHECKSUM,
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    76
	ZFS_PROP_COMPRESSION,
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    77
	ZFS_PROP_ATIME,
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    78
	ZFS_PROP_DEVICES,
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    79
	ZFS_PROP_EXEC,
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    80
	ZFS_PROP_SETUID,
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    81
	ZFS_PROP_READONLY,
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    82
	ZFS_PROP_ZONED,
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    83
	ZFS_PROP_SNAPDIR,
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    84
	ZFS_PROP_ACLMODE,
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    85
	ZFS_PROP_ACLINHERIT,
3654
9c6042b08979 6483718 need a stable interface to get all native properties
gw25295
parents: 3444
diff changeset
    86
	ZFS_PROP_CREATETXG,		/* not exposed to the user */
9c6042b08979 6483718 need a stable interface to get all native properties
gw25295
parents: 3444
diff changeset
    87
	ZFS_PROP_NAME,			/* not exposed to the user */
2676
5cee47eddab6 PSARC 2006/486 ZFS canmount property
eschrock
parents: 2199
diff changeset
    88
	ZFS_PROP_CANMOUNT,
3654
9c6042b08979 6483718 need a stable interface to get all native properties
gw25295
parents: 3444
diff changeset
    89
	ZFS_PROP_SHAREISCSI,
9c6042b08979 6483718 need a stable interface to get all native properties
gw25295
parents: 3444
diff changeset
    90
	ZFS_PROP_ISCSIOPTIONS,		/* not exposed to the user */
3234
28b36f7bbd7e PSARC/2006/638 noxattr ZFS property
ck153898
parents: 3126
diff changeset
    91
	ZFS_PROP_XATTR,
3835
063f0749804a PSARC/2007/121 zfs set copies
ahrens
parents: 3741
diff changeset
    92
	ZFS_PROP_NUMCLONES,		/* not exposed to the user */
3912
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents: 3886
diff changeset
    93
	ZFS_PROP_COPIES,
4577
ed36b0e652bc PSARC/2007/328 zfs upgrade
ahrens
parents: 4543
diff changeset
    94
	ZFS_PROP_VERSION,
5331
3047ad28a67b PSARC/2007/218 caller_context_t in all VOPs
amw
parents: 5329
diff changeset
    95
	ZFS_PROP_UTF8ONLY,
3047ad28a67b PSARC/2007/218 caller_context_t in all VOPs
amw
parents: 5329
diff changeset
    96
	ZFS_PROP_NORMALIZE,
3047ad28a67b PSARC/2007/218 caller_context_t in all VOPs
amw
parents: 5329
diff changeset
    97
	ZFS_PROP_CASE,
3047ad28a67b PSARC/2007/218 caller_context_t in all VOPs
amw
parents: 5329
diff changeset
    98
	ZFS_PROP_VSCAN,
3047ad28a67b PSARC/2007/218 caller_context_t in all VOPs
amw
parents: 5329
diff changeset
    99
	ZFS_PROP_NBMAND,
3047ad28a67b PSARC/2007/218 caller_context_t in all VOPs
amw
parents: 5329
diff changeset
   100
	ZFS_PROP_SHARESMB,
5378
111aa1baa84a PSARC 2007/555 zfs fs-only quotas and reservations
ck153898
parents: 5367
diff changeset
   101
	ZFS_PROP_REFQUOTA,
111aa1baa84a PSARC 2007/555 zfs fs-only quotas and reservations
ck153898
parents: 5367
diff changeset
   102
	ZFS_PROP_REFRESERVATION,
4787
602d3f97842c 6393351 unique_* could be improved
ahrens
parents: 4597
diff changeset
   103
	ZFS_NUM_PROPS
789
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   104
} zfs_prop_t;
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   105
5094
71a3e95fb9e2 PSARC 2007/342 Enhanced ZFS Pool Properties
lling
parents: 4849
diff changeset
   106
/*
71a3e95fb9e2 PSARC 2007/342 Enhanced ZFS Pool Properties
lling
parents: 4849
diff changeset
   107
 * Pool properties are identified by these constants and must be added to the
71a3e95fb9e2 PSARC 2007/342 Enhanced ZFS Pool Properties
lling
parents: 4849
diff changeset
   108
 * end of this list to ensure that external conumsers are not affected
71a3e95fb9e2 PSARC 2007/342 Enhanced ZFS Pool Properties
lling
parents: 4849
diff changeset
   109
 * by the change. If you make any changes to this list, be sure to update
71a3e95fb9e2 PSARC 2007/342 Enhanced ZFS Pool Properties
lling
parents: 4849
diff changeset
   110
 * the property table in usr/src/common/zfs/zpool_prop.c.
71a3e95fb9e2 PSARC 2007/342 Enhanced ZFS Pool Properties
lling
parents: 4849
diff changeset
   111
 */
71a3e95fb9e2 PSARC 2007/342 Enhanced ZFS Pool Properties
lling
parents: 4849
diff changeset
   112
typedef enum {
71a3e95fb9e2 PSARC 2007/342 Enhanced ZFS Pool Properties
lling
parents: 4849
diff changeset
   113
	ZPOOL_PROP_NAME,
71a3e95fb9e2 PSARC 2007/342 Enhanced ZFS Pool Properties
lling
parents: 4849
diff changeset
   114
	ZPOOL_PROP_SIZE,
71a3e95fb9e2 PSARC 2007/342 Enhanced ZFS Pool Properties
lling
parents: 4849
diff changeset
   115
	ZPOOL_PROP_USED,
71a3e95fb9e2 PSARC 2007/342 Enhanced ZFS Pool Properties
lling
parents: 4849
diff changeset
   116
	ZPOOL_PROP_AVAILABLE,
71a3e95fb9e2 PSARC 2007/342 Enhanced ZFS Pool Properties
lling
parents: 4849
diff changeset
   117
	ZPOOL_PROP_CAPACITY,
71a3e95fb9e2 PSARC 2007/342 Enhanced ZFS Pool Properties
lling
parents: 4849
diff changeset
   118
	ZPOOL_PROP_ALTROOT,
71a3e95fb9e2 PSARC 2007/342 Enhanced ZFS Pool Properties
lling
parents: 4849
diff changeset
   119
	ZPOOL_PROP_HEALTH,
71a3e95fb9e2 PSARC 2007/342 Enhanced ZFS Pool Properties
lling
parents: 4849
diff changeset
   120
	ZPOOL_PROP_GUID,
71a3e95fb9e2 PSARC 2007/342 Enhanced ZFS Pool Properties
lling
parents: 4849
diff changeset
   121
	ZPOOL_PROP_VERSION,
71a3e95fb9e2 PSARC 2007/342 Enhanced ZFS Pool Properties
lling
parents: 4849
diff changeset
   122
	ZPOOL_PROP_BOOTFS,
71a3e95fb9e2 PSARC 2007/342 Enhanced ZFS Pool Properties
lling
parents: 4849
diff changeset
   123
	ZPOOL_PROP_DELEGATION,
71a3e95fb9e2 PSARC 2007/342 Enhanced ZFS Pool Properties
lling
parents: 4849
diff changeset
   124
	ZPOOL_PROP_AUTOREPLACE,
5363
36eeffc5336d PSARC 2007/607 ZFS cachefile property
eschrock
parents: 5331
diff changeset
   125
	ZPOOL_PROP_CACHEFILE,
5329
33cb98223b2d PSARC 2007/567 zpool failmode property
gw25295
parents: 5147
diff changeset
   126
	ZPOOL_PROP_FAILUREMODE,
5094
71a3e95fb9e2 PSARC 2007/342 Enhanced ZFS Pool Properties
lling
parents: 4849
diff changeset
   127
	ZPOOL_NUM_PROPS
71a3e95fb9e2 PSARC 2007/342 Enhanced ZFS Pool Properties
lling
parents: 4849
diff changeset
   128
} zpool_prop_t;
3912
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents: 3886
diff changeset
   129
5094
71a3e95fb9e2 PSARC 2007/342 Enhanced ZFS Pool Properties
lling
parents: 4849
diff changeset
   130
#define	ZPROP_CONT		-2
71a3e95fb9e2 PSARC 2007/342 Enhanced ZFS Pool Properties
lling
parents: 4849
diff changeset
   131
#define	ZPROP_INVAL		-1
4451
24fbf2d7a5d7 PSARC 2007/197 ZFS hotplug
eschrock
parents: 3975
diff changeset
   132
5094
71a3e95fb9e2 PSARC 2007/342 Enhanced ZFS Pool Properties
lling
parents: 4849
diff changeset
   133
#define	ZPROP_VALUE		"value"
71a3e95fb9e2 PSARC 2007/342 Enhanced ZFS Pool Properties
lling
parents: 4849
diff changeset
   134
#define	ZPROP_SOURCE		"source"
1356
e021b5e4aa0e 6377671 zfs mount -a shouldn't bother checking snapshots
eschrock
parents: 1354
diff changeset
   135
3912
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents: 3886
diff changeset
   136
typedef enum {
5094
71a3e95fb9e2 PSARC 2007/342 Enhanced ZFS Pool Properties
lling
parents: 4849
diff changeset
   137
	ZPROP_SRC_NONE = 0x1,
71a3e95fb9e2 PSARC 2007/342 Enhanced ZFS Pool Properties
lling
parents: 4849
diff changeset
   138
	ZPROP_SRC_DEFAULT = 0x2,
71a3e95fb9e2 PSARC 2007/342 Enhanced ZFS Pool Properties
lling
parents: 4849
diff changeset
   139
	ZPROP_SRC_TEMPORARY = 0x4,
71a3e95fb9e2 PSARC 2007/342 Enhanced ZFS Pool Properties
lling
parents: 4849
diff changeset
   140
	ZPROP_SRC_LOCAL = 0x8,
71a3e95fb9e2 PSARC 2007/342 Enhanced ZFS Pool Properties
lling
parents: 4849
diff changeset
   141
	ZPROP_SRC_INHERITED = 0x10
71a3e95fb9e2 PSARC 2007/342 Enhanced ZFS Pool Properties
lling
parents: 4849
diff changeset
   142
} zprop_source_t;
71a3e95fb9e2 PSARC 2007/342 Enhanced ZFS Pool Properties
lling
parents: 4849
diff changeset
   143
71a3e95fb9e2 PSARC 2007/342 Enhanced ZFS Pool Properties
lling
parents: 4849
diff changeset
   144
#define	ZPROP_SRC_ALL	0x1f
71a3e95fb9e2 PSARC 2007/342 Enhanced ZFS Pool Properties
lling
parents: 4849
diff changeset
   145
71a3e95fb9e2 PSARC 2007/342 Enhanced ZFS Pool Properties
lling
parents: 4849
diff changeset
   146
typedef int (*zprop_func)(int, void *);
3912
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents: 3886
diff changeset
   147
5094
71a3e95fb9e2 PSARC 2007/342 Enhanced ZFS Pool Properties
lling
parents: 4849
diff changeset
   148
/*
71a3e95fb9e2 PSARC 2007/342 Enhanced ZFS Pool Properties
lling
parents: 4849
diff changeset
   149
 * Dataset property functions shared between libzfs and kernel.
71a3e95fb9e2 PSARC 2007/342 Enhanced ZFS Pool Properties
lling
parents: 4849
diff changeset
   150
 */
71a3e95fb9e2 PSARC 2007/342 Enhanced ZFS Pool Properties
lling
parents: 4849
diff changeset
   151
const char *zfs_prop_default_string(zfs_prop_t);
71a3e95fb9e2 PSARC 2007/342 Enhanced ZFS Pool Properties
lling
parents: 4849
diff changeset
   152
uint64_t zfs_prop_default_numeric(zfs_prop_t);
71a3e95fb9e2 PSARC 2007/342 Enhanced ZFS Pool Properties
lling
parents: 4849
diff changeset
   153
boolean_t zfs_prop_readonly(zfs_prop_t);
71a3e95fb9e2 PSARC 2007/342 Enhanced ZFS Pool Properties
lling
parents: 4849
diff changeset
   154
boolean_t zfs_prop_inheritable(zfs_prop_t);
5331
3047ad28a67b PSARC/2007/218 caller_context_t in all VOPs
amw
parents: 5329
diff changeset
   155
boolean_t zfs_prop_setonce(zfs_prop_t);
5094
71a3e95fb9e2 PSARC 2007/342 Enhanced ZFS Pool Properties
lling
parents: 4849
diff changeset
   156
const char *zfs_prop_to_name(zfs_prop_t);
71a3e95fb9e2 PSARC 2007/342 Enhanced ZFS Pool Properties
lling
parents: 4849
diff changeset
   157
zfs_prop_t zfs_name_to_prop(const char *);
71a3e95fb9e2 PSARC 2007/342 Enhanced ZFS Pool Properties
lling
parents: 4849
diff changeset
   158
boolean_t zfs_prop_user(const char *);
71a3e95fb9e2 PSARC 2007/342 Enhanced ZFS Pool Properties
lling
parents: 4849
diff changeset
   159
int zfs_prop_index_to_string(zfs_prop_t, uint64_t, const char **);
71a3e95fb9e2 PSARC 2007/342 Enhanced ZFS Pool Properties
lling
parents: 4849
diff changeset
   160
int zfs_prop_string_to_index(zfs_prop_t, const char *, uint64_t *);
5331
3047ad28a67b PSARC/2007/218 caller_context_t in all VOPs
amw
parents: 5329
diff changeset
   161
int zfs_prop_valid_for_type(int, zfs_type_t);
3912
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents: 3886
diff changeset
   162
5094
71a3e95fb9e2 PSARC 2007/342 Enhanced ZFS Pool Properties
lling
parents: 4849
diff changeset
   163
/*
71a3e95fb9e2 PSARC 2007/342 Enhanced ZFS Pool Properties
lling
parents: 4849
diff changeset
   164
 * Pool property functions shared between libzfs and kernel.
71a3e95fb9e2 PSARC 2007/342 Enhanced ZFS Pool Properties
lling
parents: 4849
diff changeset
   165
 */
71a3e95fb9e2 PSARC 2007/342 Enhanced ZFS Pool Properties
lling
parents: 4849
diff changeset
   166
zpool_prop_t zpool_name_to_prop(const char *);
71a3e95fb9e2 PSARC 2007/342 Enhanced ZFS Pool Properties
lling
parents: 4849
diff changeset
   167
const char *zpool_prop_to_name(zpool_prop_t);
71a3e95fb9e2 PSARC 2007/342 Enhanced ZFS Pool Properties
lling
parents: 4849
diff changeset
   168
const char *zpool_prop_default_string(zpool_prop_t);
71a3e95fb9e2 PSARC 2007/342 Enhanced ZFS Pool Properties
lling
parents: 4849
diff changeset
   169
uint64_t zpool_prop_default_numeric(zpool_prop_t);
71a3e95fb9e2 PSARC 2007/342 Enhanced ZFS Pool Properties
lling
parents: 4849
diff changeset
   170
boolean_t zpool_prop_readonly(zpool_prop_t);
71a3e95fb9e2 PSARC 2007/342 Enhanced ZFS Pool Properties
lling
parents: 4849
diff changeset
   171
int zpool_prop_index_to_string(zpool_prop_t, uint64_t, const char **);
71a3e95fb9e2 PSARC 2007/342 Enhanced ZFS Pool Properties
lling
parents: 4849
diff changeset
   172
int zpool_prop_string_to_index(zpool_prop_t, const char *, uint64_t *);
71a3e95fb9e2 PSARC 2007/342 Enhanced ZFS Pool Properties
lling
parents: 4849
diff changeset
   173
71a3e95fb9e2 PSARC 2007/342 Enhanced ZFS Pool Properties
lling
parents: 4849
diff changeset
   174
/*
71a3e95fb9e2 PSARC 2007/342 Enhanced ZFS Pool Properties
lling
parents: 4849
diff changeset
   175
 * Definitions for the Delegation.
71a3e95fb9e2 PSARC 2007/342 Enhanced ZFS Pool Properties
lling
parents: 4849
diff changeset
   176
 */
4543
12bb2876a62e PSARC/2006/465 ZFS Delegated Administration
marks
parents: 4527
diff changeset
   177
typedef enum {
12bb2876a62e PSARC/2006/465 ZFS Delegated Administration
marks
parents: 4527
diff changeset
   178
	ZFS_DELEG_WHO_UNKNOWN = 0,
12bb2876a62e PSARC/2006/465 ZFS Delegated Administration
marks
parents: 4527
diff changeset
   179
	ZFS_DELEG_USER = 'u',
12bb2876a62e PSARC/2006/465 ZFS Delegated Administration
marks
parents: 4527
diff changeset
   180
	ZFS_DELEG_USER_SETS = 'U',
12bb2876a62e PSARC/2006/465 ZFS Delegated Administration
marks
parents: 4527
diff changeset
   181
	ZFS_DELEG_GROUP = 'g',
12bb2876a62e PSARC/2006/465 ZFS Delegated Administration
marks
parents: 4527
diff changeset
   182
	ZFS_DELEG_GROUP_SETS = 'G',
12bb2876a62e PSARC/2006/465 ZFS Delegated Administration
marks
parents: 4527
diff changeset
   183
	ZFS_DELEG_EVERYONE = 'e',
12bb2876a62e PSARC/2006/465 ZFS Delegated Administration
marks
parents: 4527
diff changeset
   184
	ZFS_DELEG_EVERYONE_SETS = 'E',
12bb2876a62e PSARC/2006/465 ZFS Delegated Administration
marks
parents: 4527
diff changeset
   185
	ZFS_DELEG_CREATE = 'c',
12bb2876a62e PSARC/2006/465 ZFS Delegated Administration
marks
parents: 4527
diff changeset
   186
	ZFS_DELEG_CREATE_SETS = 'C',
12bb2876a62e PSARC/2006/465 ZFS Delegated Administration
marks
parents: 4527
diff changeset
   187
	ZFS_DELEG_NAMED_SET = 's',
12bb2876a62e PSARC/2006/465 ZFS Delegated Administration
marks
parents: 4527
diff changeset
   188
	ZFS_DELEG_NAMED_SET_SETS = 'S'
12bb2876a62e PSARC/2006/465 ZFS Delegated Administration
marks
parents: 4527
diff changeset
   189
} zfs_deleg_who_type_t;
12bb2876a62e PSARC/2006/465 ZFS Delegated Administration
marks
parents: 4527
diff changeset
   190
12bb2876a62e PSARC/2006/465 ZFS Delegated Administration
marks
parents: 4527
diff changeset
   191
typedef enum {
12bb2876a62e PSARC/2006/465 ZFS Delegated Administration
marks
parents: 4527
diff changeset
   192
	ZFS_DELEG_NONE = 0,
12bb2876a62e PSARC/2006/465 ZFS Delegated Administration
marks
parents: 4527
diff changeset
   193
	ZFS_DELEG_PERM_LOCAL = 1,
12bb2876a62e PSARC/2006/465 ZFS Delegated Administration
marks
parents: 4527
diff changeset
   194
	ZFS_DELEG_PERM_DESCENDENT = 2,
12bb2876a62e PSARC/2006/465 ZFS Delegated Administration
marks
parents: 4527
diff changeset
   195
	ZFS_DELEG_PERM_LOCALDESCENDENT = 3,
12bb2876a62e PSARC/2006/465 ZFS Delegated Administration
marks
parents: 4527
diff changeset
   196
	ZFS_DELEG_PERM_CREATE = 4
12bb2876a62e PSARC/2006/465 ZFS Delegated Administration
marks
parents: 4527
diff changeset
   197
} zfs_deleg_inherit_t;
12bb2876a62e PSARC/2006/465 ZFS Delegated Administration
marks
parents: 4527
diff changeset
   198
12bb2876a62e PSARC/2006/465 ZFS Delegated Administration
marks
parents: 4527
diff changeset
   199
#define	ZFS_DELEG_PERM_UID	"uid"
12bb2876a62e PSARC/2006/465 ZFS Delegated Administration
marks
parents: 4527
diff changeset
   200
#define	ZFS_DELEG_PERM_GID	"gid"
12bb2876a62e PSARC/2006/465 ZFS Delegated Administration
marks
parents: 4527
diff changeset
   201
#define	ZFS_DELEG_PERM_GROUPS	"groups"
12bb2876a62e PSARC/2006/465 ZFS Delegated Administration
marks
parents: 4527
diff changeset
   202
5331
3047ad28a67b PSARC/2007/218 caller_context_t in all VOPs
amw
parents: 5329
diff changeset
   203
typedef enum zfs_share_op {
3047ad28a67b PSARC/2007/218 caller_context_t in all VOPs
amw
parents: 5329
diff changeset
   204
	ZFS_SHARE_NFS = 0,
3047ad28a67b PSARC/2007/218 caller_context_t in all VOPs
amw
parents: 5329
diff changeset
   205
	ZFS_UNSHARE_NFS = 1,
3047ad28a67b PSARC/2007/218 caller_context_t in all VOPs
amw
parents: 5329
diff changeset
   206
	ZFS_SHARE_SMB = 2,
3047ad28a67b PSARC/2007/218 caller_context_t in all VOPs
amw
parents: 5329
diff changeset
   207
	ZFS_UNSHARE_SMB = 3
3047ad28a67b PSARC/2007/218 caller_context_t in all VOPs
amw
parents: 5329
diff changeset
   208
} zfs_share_op_t;
3047ad28a67b PSARC/2007/218 caller_context_t in all VOPs
amw
parents: 5329
diff changeset
   209
789
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   210
/*
2082
76b439ec3ac1 PSARC 2006/223 ZFS Hot Spares
eschrock
parents: 1775
diff changeset
   211
 * On-disk version number.
1760
e1ad2821c30d PSARC 2006/206 zpool upgrade
eschrock
parents: 1544
diff changeset
   212
 */
4577
ed36b0e652bc PSARC/2007/328 zfs upgrade
ahrens
parents: 4543
diff changeset
   213
#define	SPA_VERSION_1			1ULL
ed36b0e652bc PSARC/2007/328 zfs upgrade
ahrens
parents: 4543
diff changeset
   214
#define	SPA_VERSION_2			2ULL
ed36b0e652bc PSARC/2007/328 zfs upgrade
ahrens
parents: 4543
diff changeset
   215
#define	SPA_VERSION_3			3ULL
ed36b0e652bc PSARC/2007/328 zfs upgrade
ahrens
parents: 4543
diff changeset
   216
#define	SPA_VERSION_4			4ULL
ed36b0e652bc PSARC/2007/328 zfs upgrade
ahrens
parents: 4543
diff changeset
   217
#define	SPA_VERSION_5			5ULL
ed36b0e652bc PSARC/2007/328 zfs upgrade
ahrens
parents: 4543
diff changeset
   218
#define	SPA_VERSION_6			6ULL
ed36b0e652bc PSARC/2007/328 zfs upgrade
ahrens
parents: 4543
diff changeset
   219
#define	SPA_VERSION_7			7ULL
ed36b0e652bc PSARC/2007/328 zfs upgrade
ahrens
parents: 4543
diff changeset
   220
#define	SPA_VERSION_8			8ULL
5331
3047ad28a67b PSARC/2007/218 caller_context_t in all VOPs
amw
parents: 5329
diff changeset
   221
#define	SPA_VERSION_9			9ULL
5450
b25030891c44 PSARC 2007/618 ZFS L2ARC
brendan
parents: 5378
diff changeset
   222
#define	SPA_VERSION_10			10ULL
5331
3047ad28a67b PSARC/2007/218 caller_context_t in all VOPs
amw
parents: 5329
diff changeset
   223
3912
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents: 3886
diff changeset
   224
/*
4577
ed36b0e652bc PSARC/2007/328 zfs upgrade
ahrens
parents: 4543
diff changeset
   225
 * When bumping up SPA_VERSION, make sure GRUB ZFS understand the on-disk
3912
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents: 3886
diff changeset
   226
 * format change. Go to usr/src/grub/grub-0.95/stage2/{zfs-include/, fsys_zfs*},
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents: 3886
diff changeset
   227
 * and do the appropriate changes.
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents: 3886
diff changeset
   228
 */
5450
b25030891c44 PSARC 2007/618 ZFS L2ARC
brendan
parents: 5378
diff changeset
   229
#define	SPA_VERSION			SPA_VERSION_10
b25030891c44 PSARC 2007/618 ZFS L2ARC
brendan
parents: 5378
diff changeset
   230
#define	SPA_VERSION_STRING		"10"
1775
e51e26b432c0 6410698 ZFS metadata needs to be more highly replicated (ditto blocks)
billm
parents: 1760
diff changeset
   231
e51e26b432c0 6410698 ZFS metadata needs to be more highly replicated (ditto blocks)
billm
parents: 1760
diff changeset
   232
/*
4577
ed36b0e652bc PSARC/2007/328 zfs upgrade
ahrens
parents: 4543
diff changeset
   233
 * Symbolic names for the changes that caused a SPA_VERSION switch.
1775
e51e26b432c0 6410698 ZFS metadata needs to be more highly replicated (ditto blocks)
billm
parents: 1760
diff changeset
   234
 * Used in the code when checking for presence or absence of a feature.
e51e26b432c0 6410698 ZFS metadata needs to be more highly replicated (ditto blocks)
billm
parents: 1760
diff changeset
   235
 * Feel free to define multiple symbolic names for each version if there
e51e26b432c0 6410698 ZFS metadata needs to be more highly replicated (ditto blocks)
billm
parents: 1760
diff changeset
   236
 * were multiple changes to on-disk structures during that version.
e51e26b432c0 6410698 ZFS metadata needs to be more highly replicated (ditto blocks)
billm
parents: 1760
diff changeset
   237
 *
4577
ed36b0e652bc PSARC/2007/328 zfs upgrade
ahrens
parents: 4543
diff changeset
   238
 * NOTE: When checking the current SPA_VERSION in your code, be sure
1775
e51e26b432c0 6410698 ZFS metadata needs to be more highly replicated (ditto blocks)
billm
parents: 1760
diff changeset
   239
 *       to use spa_version() since it reports the version of the
e51e26b432c0 6410698 ZFS metadata needs to be more highly replicated (ditto blocks)
billm
parents: 1760
diff changeset
   240
 *       last synced uberblock.  Checking the in-flight version can
e51e26b432c0 6410698 ZFS metadata needs to be more highly replicated (ditto blocks)
billm
parents: 1760
diff changeset
   241
 *       be dangerous in some cases.
e51e26b432c0 6410698 ZFS metadata needs to be more highly replicated (ditto blocks)
billm
parents: 1760
diff changeset
   242
 */
4577
ed36b0e652bc PSARC/2007/328 zfs upgrade
ahrens
parents: 4543
diff changeset
   243
#define	SPA_VERSION_INITIAL		SPA_VERSION_1
ed36b0e652bc PSARC/2007/328 zfs upgrade
ahrens
parents: 4543
diff changeset
   244
#define	SPA_VERSION_DITTO_BLOCKS	SPA_VERSION_2
ed36b0e652bc PSARC/2007/328 zfs upgrade
ahrens
parents: 4543
diff changeset
   245
#define	SPA_VERSION_SPARES		SPA_VERSION_3
ed36b0e652bc PSARC/2007/328 zfs upgrade
ahrens
parents: 4543
diff changeset
   246
#define	SPA_VERSION_RAID6		SPA_VERSION_3
ed36b0e652bc PSARC/2007/328 zfs upgrade
ahrens
parents: 4543
diff changeset
   247
#define	SPA_VERSION_BPLIST_ACCOUNT	SPA_VERSION_3
ed36b0e652bc PSARC/2007/328 zfs upgrade
ahrens
parents: 4543
diff changeset
   248
#define	SPA_VERSION_RAIDZ_DEFLATE	SPA_VERSION_3
ed36b0e652bc PSARC/2007/328 zfs upgrade
ahrens
parents: 4543
diff changeset
   249
#define	SPA_VERSION_DNODE_BYTES		SPA_VERSION_3
ed36b0e652bc PSARC/2007/328 zfs upgrade
ahrens
parents: 4543
diff changeset
   250
#define	SPA_VERSION_ZPOOL_HISTORY	SPA_VERSION_4
ed36b0e652bc PSARC/2007/328 zfs upgrade
ahrens
parents: 4543
diff changeset
   251
#define	SPA_VERSION_GZIP_COMPRESSION	SPA_VERSION_5
ed36b0e652bc PSARC/2007/328 zfs upgrade
ahrens
parents: 4543
diff changeset
   252
#define	SPA_VERSION_BOOTFS		SPA_VERSION_6
5094
71a3e95fb9e2 PSARC 2007/342 Enhanced ZFS Pool Properties
lling
parents: 4849
diff changeset
   253
#define	SPA_VERSION_SLOGS		SPA_VERSION_7
71a3e95fb9e2 PSARC 2007/342 Enhanced ZFS Pool Properties
lling
parents: 4849
diff changeset
   254
#define	SPA_VERSION_DELEGATED_PERMS	SPA_VERSION_8
5331
3047ad28a67b PSARC/2007/218 caller_context_t in all VOPs
amw
parents: 5329
diff changeset
   255
#define	SPA_VERSION_FUID		SPA_VERSION_9
3047ad28a67b PSARC/2007/218 caller_context_t in all VOPs
amw
parents: 5329
diff changeset
   256
#define	SPA_VERSION_NORMALIZATION	SPA_VERSION_9
5378
111aa1baa84a PSARC 2007/555 zfs fs-only quotas and reservations
ck153898
parents: 5367
diff changeset
   257
#define	SPA_VERSION_REFRESERVATION	SPA_VERSION_9
111aa1baa84a PSARC 2007/555 zfs fs-only quotas and reservations
ck153898
parents: 5367
diff changeset
   258
#define	SPA_VERSION_REFQUOTA		SPA_VERSION_9
111aa1baa84a PSARC 2007/555 zfs fs-only quotas and reservations
ck153898
parents: 5367
diff changeset
   259
#define	SPA_VERSION_UNIQUE_ACCURATE	SPA_VERSION_9
5450
b25030891c44 PSARC 2007/618 ZFS L2ARC
brendan
parents: 5378
diff changeset
   260
#define	SPA_VERSION_L2CACHE		SPA_VERSION_10
4577
ed36b0e652bc PSARC/2007/328 zfs upgrade
ahrens
parents: 4543
diff changeset
   261
ed36b0e652bc PSARC/2007/328 zfs upgrade
ahrens
parents: 4543
diff changeset
   262
/*
ed36b0e652bc PSARC/2007/328 zfs upgrade
ahrens
parents: 4543
diff changeset
   263
 * ZPL version - rev'd whenever an incompatible on-disk format change
ed36b0e652bc PSARC/2007/328 zfs upgrade
ahrens
parents: 4543
diff changeset
   264
 * occurs.  This is independent of SPA/DMU/ZAP versioning.  You must
ed36b0e652bc PSARC/2007/328 zfs upgrade
ahrens
parents: 4543
diff changeset
   265
 * also update the version_table[] and help message in zfs_prop.c.
ed36b0e652bc PSARC/2007/328 zfs upgrade
ahrens
parents: 4543
diff changeset
   266
 *
ed36b0e652bc PSARC/2007/328 zfs upgrade
ahrens
parents: 4543
diff changeset
   267
 * When changing, be sure to teach GRUB how to read the new format!
ed36b0e652bc PSARC/2007/328 zfs upgrade
ahrens
parents: 4543
diff changeset
   268
 * See usr/src/grub/grub-0.95/stage2/{zfs-include/,fsys_zfs*}
ed36b0e652bc PSARC/2007/328 zfs upgrade
ahrens
parents: 4543
diff changeset
   269
 */
ed36b0e652bc PSARC/2007/328 zfs upgrade
ahrens
parents: 4543
diff changeset
   270
#define	ZPL_VERSION_1			1ULL
ed36b0e652bc PSARC/2007/328 zfs upgrade
ahrens
parents: 4543
diff changeset
   271
#define	ZPL_VERSION_2			2ULL
5331
3047ad28a67b PSARC/2007/218 caller_context_t in all VOPs
amw
parents: 5329
diff changeset
   272
#define	ZPL_VERSION_3			3ULL
3047ad28a67b PSARC/2007/218 caller_context_t in all VOPs
amw
parents: 5329
diff changeset
   273
#define	ZPL_VERSION			ZPL_VERSION_3
3047ad28a67b PSARC/2007/218 caller_context_t in all VOPs
amw
parents: 5329
diff changeset
   274
#define	ZPL_VERSION_STRING		"3"
4577
ed36b0e652bc PSARC/2007/328 zfs upgrade
ahrens
parents: 4543
diff changeset
   275
ed36b0e652bc PSARC/2007/328 zfs upgrade
ahrens
parents: 4543
diff changeset
   276
#define	ZPL_VERSION_INITIAL		ZPL_VERSION_1
ed36b0e652bc PSARC/2007/328 zfs upgrade
ahrens
parents: 4543
diff changeset
   277
#define	ZPL_VERSION_DIRENT_TYPE		ZPL_VERSION_2
5331
3047ad28a67b PSARC/2007/218 caller_context_t in all VOPs
amw
parents: 5329
diff changeset
   278
#define	ZPL_VERSION_FUID		ZPL_VERSION_3
3047ad28a67b PSARC/2007/218 caller_context_t in all VOPs
amw
parents: 5329
diff changeset
   279
#define	ZPL_VERSION_SYSATTR		ZPL_VERSION_3
1760
e1ad2821c30d PSARC 2006/206 zpool upgrade
eschrock
parents: 1544
diff changeset
   280
e1ad2821c30d PSARC 2006/206 zpool upgrade
eschrock
parents: 1544
diff changeset
   281
/*
789
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   282
 * The following are configuration names used in the nvlist describing a pool's
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   283
 * configuration.
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   284
 */
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   285
#define	ZPOOL_CONFIG_VERSION		"version"
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   286
#define	ZPOOL_CONFIG_POOL_NAME		"name"
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   287
#define	ZPOOL_CONFIG_POOL_STATE		"state"
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   288
#define	ZPOOL_CONFIG_POOL_TXG		"txg"
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   289
#define	ZPOOL_CONFIG_POOL_GUID		"pool_guid"
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   290
#define	ZPOOL_CONFIG_CREATE_TXG		"create_txg"
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   291
#define	ZPOOL_CONFIG_TOP_GUID		"top_guid"
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   292
#define	ZPOOL_CONFIG_VDEV_TREE		"vdev_tree"
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   293
#define	ZPOOL_CONFIG_TYPE		"type"
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   294
#define	ZPOOL_CONFIG_CHILDREN		"children"
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   295
#define	ZPOOL_CONFIG_ID			"id"
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   296
#define	ZPOOL_CONFIG_GUID		"guid"
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   297
#define	ZPOOL_CONFIG_PATH		"path"
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   298
#define	ZPOOL_CONFIG_DEVID		"devid"
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   299
#define	ZPOOL_CONFIG_METASLAB_ARRAY	"metaslab_array"
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   300
#define	ZPOOL_CONFIG_METASLAB_SHIFT	"metaslab_shift"
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   301
#define	ZPOOL_CONFIG_ASHIFT		"ashift"
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   302
#define	ZPOOL_CONFIG_ASIZE		"asize"
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   303
#define	ZPOOL_CONFIG_DTL		"DTL"
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   304
#define	ZPOOL_CONFIG_STATS		"stats"
1171
b501e9f31cab 6344272 re-think how whole disks are stored
eschrock
parents: 789
diff changeset
   305
#define	ZPOOL_CONFIG_WHOLE_DISK		"whole_disk"
1544
938876158511 PSARC 2006/077 zpool clear
eschrock
parents: 1485
diff changeset
   306
#define	ZPOOL_CONFIG_ERRCOUNT		"error_count"
938876158511 PSARC 2006/077 zpool clear
eschrock
parents: 1485
diff changeset
   307
#define	ZPOOL_CONFIG_NOT_PRESENT	"not_present"
2082
76b439ec3ac1 PSARC 2006/223 ZFS Hot Spares
eschrock
parents: 1775
diff changeset
   308
#define	ZPOOL_CONFIG_SPARES		"spares"
76b439ec3ac1 PSARC 2006/223 ZFS Hot Spares
eschrock
parents: 1775
diff changeset
   309
#define	ZPOOL_CONFIG_IS_SPARE		"is_spare"
76b439ec3ac1 PSARC 2006/223 ZFS Hot Spares
eschrock
parents: 1775
diff changeset
   310
#define	ZPOOL_CONFIG_NPARITY		"nparity"
3975
6674f5d79069 6282725 hostname/hostid should be stored in the label
ek110237
parents: 3912
diff changeset
   311
#define	ZPOOL_CONFIG_HOSTID		"hostid"
6674f5d79069 6282725 hostname/hostid should be stored in the label
ek110237
parents: 3912
diff changeset
   312
#define	ZPOOL_CONFIG_HOSTNAME		"hostname"
6674f5d79069 6282725 hostname/hostid should be stored in the label
ek110237
parents: 3912
diff changeset
   313
#define	ZPOOL_CONFIG_TIMESTAMP		"timestamp" /* not stored on disk */
4451
24fbf2d7a5d7 PSARC 2007/197 ZFS hotplug
eschrock
parents: 3975
diff changeset
   314
#define	ZPOOL_CONFIG_UNSPARE		"unspare"
24fbf2d7a5d7 PSARC 2007/197 ZFS hotplug
eschrock
parents: 3975
diff changeset
   315
#define	ZPOOL_CONFIG_PHYS_PATH		"phys_path"
4527
5d5b6ba91b17 PSARC 2007/171 ZFS Separate Intent Log
perrin
parents: 4451
diff changeset
   316
#define	ZPOOL_CONFIG_IS_LOG		"is_log"
5450
b25030891c44 PSARC 2007/618 ZFS L2ARC
brendan
parents: 5378
diff changeset
   317
#define	ZPOOL_CONFIG_L2CACHE		"l2cache"
4451
24fbf2d7a5d7 PSARC 2007/197 ZFS hotplug
eschrock
parents: 3975
diff changeset
   318
/*
24fbf2d7a5d7 PSARC 2007/197 ZFS hotplug
eschrock
parents: 3975
diff changeset
   319
 * The persistent vdev state is stored as separate values rather than a single
24fbf2d7a5d7 PSARC 2007/197 ZFS hotplug
eschrock
parents: 3975
diff changeset
   320
 * 'vdev_state' entry.  This is because a device can be in multiple states, such
24fbf2d7a5d7 PSARC 2007/197 ZFS hotplug
eschrock
parents: 3975
diff changeset
   321
 * as offline and degraded.
24fbf2d7a5d7 PSARC 2007/197 ZFS hotplug
eschrock
parents: 3975
diff changeset
   322
 */
24fbf2d7a5d7 PSARC 2007/197 ZFS hotplug
eschrock
parents: 3975
diff changeset
   323
#define	ZPOOL_CONFIG_OFFLINE		"offline"
24fbf2d7a5d7 PSARC 2007/197 ZFS hotplug
eschrock
parents: 3975
diff changeset
   324
#define	ZPOOL_CONFIG_FAULTED		"faulted"
24fbf2d7a5d7 PSARC 2007/197 ZFS hotplug
eschrock
parents: 3975
diff changeset
   325
#define	ZPOOL_CONFIG_DEGRADED		"degraded"
24fbf2d7a5d7 PSARC 2007/197 ZFS hotplug
eschrock
parents: 3975
diff changeset
   326
#define	ZPOOL_CONFIG_REMOVED		"removed"
789
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   327
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   328
#define	VDEV_TYPE_ROOT			"root"
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   329
#define	VDEV_TYPE_MIRROR		"mirror"
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   330
#define	VDEV_TYPE_REPLACING		"replacing"
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   331
#define	VDEV_TYPE_RAIDZ			"raidz"
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   332
#define	VDEV_TYPE_DISK			"disk"
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   333
#define	VDEV_TYPE_FILE			"file"
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   334
#define	VDEV_TYPE_MISSING		"missing"
2082
76b439ec3ac1 PSARC 2006/223 ZFS Hot Spares
eschrock
parents: 1775
diff changeset
   335
#define	VDEV_TYPE_SPARE			"spare"
4527
5d5b6ba91b17 PSARC 2007/171 ZFS Separate Intent Log
perrin
parents: 4451
diff changeset
   336
#define	VDEV_TYPE_LOG			"log"
5450
b25030891c44 PSARC 2007/618 ZFS L2ARC
brendan
parents: 5378
diff changeset
   337
#define	VDEV_TYPE_L2CACHE		"l2cache"
789
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   338
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   339
/*
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   340
 * This is needed in userland to report the minimum necessary device size.
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   341
 */
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   342
#define	SPA_MINDEVSIZE		(64ULL << 20)
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   343
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   344
/*
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   345
 * The location of the pool configuration repository, shared between kernel and
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   346
 * userland.
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   347
 */
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   348
#define	ZPOOL_CACHE_DIR		"/etc/zfs"
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   349
#define	ZPOOL_CACHE_FILE	"zpool.cache"
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   350
#define	ZPOOL_CACHE_TMP		".zpool.cache"
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   351
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   352
#define	ZPOOL_CACHE		ZPOOL_CACHE_DIR "/" ZPOOL_CACHE_FILE
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   353
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   354
/*
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   355
 * vdev states are ordered from least to most healthy.
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   356
 * A vdev that's CANT_OPEN or below is considered unusable.
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   357
 */
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   358
typedef enum vdev_state {
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   359
	VDEV_STATE_UNKNOWN = 0,	/* Uninitialized vdev			*/
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   360
	VDEV_STATE_CLOSED,	/* Not currently open			*/
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   361
	VDEV_STATE_OFFLINE,	/* Not allowed to open			*/
4451
24fbf2d7a5d7 PSARC 2007/197 ZFS hotplug
eschrock
parents: 3975
diff changeset
   362
	VDEV_STATE_REMOVED,	/* Explicitly removed from system	*/
789
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   363
	VDEV_STATE_CANT_OPEN,	/* Tried to open, but failed		*/
4451
24fbf2d7a5d7 PSARC 2007/197 ZFS hotplug
eschrock
parents: 3975
diff changeset
   364
	VDEV_STATE_FAULTED,	/* External request to fault device	*/
789
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   365
	VDEV_STATE_DEGRADED,	/* Replicated vdev with unhealthy kids	*/
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   366
	VDEV_STATE_HEALTHY	/* Presumed good			*/
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   367
} vdev_state_t;
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   368
4451
24fbf2d7a5d7 PSARC 2007/197 ZFS hotplug
eschrock
parents: 3975
diff changeset
   369
#define	VDEV_STATE_ONLINE	VDEV_STATE_HEALTHY
24fbf2d7a5d7 PSARC 2007/197 ZFS hotplug
eschrock
parents: 3975
diff changeset
   370
789
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   371
/*
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   372
 * vdev aux states.  When a vdev is in the CANT_OPEN state, the aux field
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   373
 * of the vdev stats structure uses these constants to distinguish why.
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   374
 */
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   375
typedef enum vdev_aux {
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   376
	VDEV_AUX_NONE,		/* no error				*/
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   377
	VDEV_AUX_OPEN_FAILED,	/* ldi_open_*() or vn_open() failed	*/
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   378
	VDEV_AUX_CORRUPT_DATA,	/* bad label or disk contents		*/
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   379
	VDEV_AUX_NO_REPLICAS,	/* insufficient number of replicas	*/
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   380
	VDEV_AUX_BAD_GUID_SUM,	/* vdev guid sum doesn't match		*/
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   381
	VDEV_AUX_TOO_SMALL,	/* vdev size is too small		*/
1760
e1ad2821c30d PSARC 2006/206 zpool upgrade
eschrock
parents: 1544
diff changeset
   382
	VDEV_AUX_BAD_LABEL,	/* the label is OK but invalid		*/
e1ad2821c30d PSARC 2006/206 zpool upgrade
eschrock
parents: 1544
diff changeset
   383
	VDEV_AUX_VERSION_NEWER,	/* on-disk version is too new		*/
2082
76b439ec3ac1 PSARC 2006/223 ZFS Hot Spares
eschrock
parents: 1775
diff changeset
   384
	VDEV_AUX_VERSION_OLDER,	/* on-disk version is too old		*/
4451
24fbf2d7a5d7 PSARC 2007/197 ZFS hotplug
eschrock
parents: 3975
diff changeset
   385
	VDEV_AUX_SPARED,	/* hot spare used in another pool	*/
24fbf2d7a5d7 PSARC 2007/197 ZFS hotplug
eschrock
parents: 3975
diff changeset
   386
	VDEV_AUX_ERR_EXCEEDED	/* too many errors			*/
789
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   387
} vdev_aux_t;
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   388
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   389
/*
1352
b7039548de2f 6343802 zpool(1M) should make better use of libdiskmgt
eschrock
parents: 1175
diff changeset
   390
 * pool state.  The following states are written to disk as part of the normal
5450
b25030891c44 PSARC 2007/618 ZFS L2ARC
brendan
parents: 5378
diff changeset
   391
 * SPA lifecycle: ACTIVE, EXPORTED, DESTROYED, SPARE, L2CACHE.  The remaining
b25030891c44 PSARC 2007/618 ZFS L2ARC
brendan
parents: 5378
diff changeset
   392
 * states are software abstractions used at various levels to communicate
b25030891c44 PSARC 2007/618 ZFS L2ARC
brendan
parents: 5378
diff changeset
   393
 * pool state.
789
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   394
 */
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   395
typedef enum pool_state {
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   396
	POOL_STATE_ACTIVE = 0,		/* In active use		*/
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   397
	POOL_STATE_EXPORTED,		/* Explicitly exported		*/
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   398
	POOL_STATE_DESTROYED,		/* Explicitly destroyed		*/
2082
76b439ec3ac1 PSARC 2006/223 ZFS Hot Spares
eschrock
parents: 1775
diff changeset
   399
	POOL_STATE_SPARE,		/* Reserved for hot spare use	*/
5450
b25030891c44 PSARC 2007/618 ZFS L2ARC
brendan
parents: 5378
diff changeset
   400
	POOL_STATE_L2CACHE,		/* Level 2 ARC device		*/
789
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   401
	POOL_STATE_UNINITIALIZED,	/* Internal spa_t state		*/
5329
33cb98223b2d PSARC 2007/567 zpool failmode property
gw25295
parents: 5147
diff changeset
   402
	POOL_STATE_IO_FAILURE,		/* Internal pool state		*/
1352
b7039548de2f 6343802 zpool(1M) should make better use of libdiskmgt
eschrock
parents: 1175
diff changeset
   403
	POOL_STATE_UNAVAIL,		/* Internal libzfs state	*/
b7039548de2f 6343802 zpool(1M) should make better use of libdiskmgt
eschrock
parents: 1175
diff changeset
   404
	POOL_STATE_POTENTIALLY_ACTIVE	/* Internal libzfs state	*/
789
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   405
} pool_state_t;
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   406
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   407
/*
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   408
 * Scrub types.
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   409
 */
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   410
typedef enum pool_scrub_type {
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   411
	POOL_SCRUB_NONE,
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   412
	POOL_SCRUB_RESILVER,
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   413
	POOL_SCRUB_EVERYTHING,
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   414
	POOL_SCRUB_TYPES
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   415
} pool_scrub_type_t;
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   416
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   417
/*
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   418
 * ZIO types.  Needed to interpret vdev statistics below.
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   419
 */
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   420
typedef enum zio_type {
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   421
	ZIO_TYPE_NULL = 0,
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   422
	ZIO_TYPE_READ,
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   423
	ZIO_TYPE_WRITE,
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   424
	ZIO_TYPE_FREE,
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   425
	ZIO_TYPE_CLAIM,
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   426
	ZIO_TYPE_IOCTL,
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   427
	ZIO_TYPES
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   428
} zio_type_t;
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   429
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   430
/*
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   431
 * Vdev statistics.  Note: all fields should be 64-bit because this
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   432
 * is passed between kernel and userland as an nvlist uint64 array.
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   433
 */
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   434
typedef struct vdev_stat {
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   435
	hrtime_t	vs_timestamp;		/* time since vdev load	*/
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   436
	uint64_t	vs_state;		/* vdev state		*/
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   437
	uint64_t	vs_aux;			/* see vdev_aux_t	*/
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   438
	uint64_t	vs_alloc;		/* space allocated	*/
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   439
	uint64_t	vs_space;		/* total capacity	*/
2082
76b439ec3ac1 PSARC 2006/223 ZFS Hot Spares
eschrock
parents: 1775
diff changeset
   440
	uint64_t	vs_dspace;		/* deflated capacity	*/
1175
759d20c7e57b 6366265 attach/replace should allow a new device size at least the min of all devs in a mirror/raidz
lling
parents: 1171
diff changeset
   441
	uint64_t	vs_rsize;		/* replaceable dev size */
789
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   442
	uint64_t	vs_ops[ZIO_TYPES];	/* operation count	*/
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   443
	uint64_t	vs_bytes[ZIO_TYPES];	/* bytes read/written	*/
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   444
	uint64_t	vs_read_errors;		/* read errors		*/
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   445
	uint64_t	vs_write_errors;	/* write errors		*/
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   446
	uint64_t	vs_checksum_errors;	/* checksum errors	*/
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   447
	uint64_t	vs_self_healed;		/* self-healed bytes	*/
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   448
	uint64_t	vs_scrub_type;		/* pool_scrub_type_t	*/
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   449
	uint64_t	vs_scrub_complete;	/* completed?		*/
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   450
	uint64_t	vs_scrub_examined;	/* bytes examined; top	*/
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   451
	uint64_t	vs_scrub_repaired;	/* bytes repaired; leaf	*/
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   452
	uint64_t	vs_scrub_errors;	/* errors during scrub	*/
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   453
	uint64_t	vs_scrub_start;		/* UTC scrub start time	*/
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   454
	uint64_t	vs_scrub_end;		/* UTC scrub end time	*/
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   455
} vdev_stat_t;
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   456
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   457
#define	ZFS_DRIVER	"zfs"
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   458
#define	ZFS_DEV		"/dev/zfs"
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   459
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   460
/*
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   461
 * zvol paths.  Irritatingly, the devfsadm interfaces want all these
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   462
 * paths without the /dev prefix, but for some things, we want the
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   463
 * /dev prefix.  Below are the names without /dev.
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   464
 */
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   465
#define	ZVOL_DEV_DIR	"zvol/dsk"
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   466
#define	ZVOL_RDEV_DIR	"zvol/rdsk"
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   467
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   468
/*
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   469
 * And here are the things we need with /dev, etc. in front of them.
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   470
 */
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   471
#define	ZVOL_PSEUDO_DEV		"/devices/pseudo/zvol@0:"
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   472
#define	ZVOL_FULL_DEV_DIR	"/dev/" ZVOL_DEV_DIR
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   473
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   474
#define	ZVOL_PROP_NAME		"name"
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   475
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   476
/*
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   477
 * /dev/zfs ioctl numbers.
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   478
 */
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   479
#define	ZFS_IOC		('Z' << 8)
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   480
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   481
typedef enum zfs_ioc {
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   482
	ZFS_IOC_POOL_CREATE = ZFS_IOC,
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   483
	ZFS_IOC_POOL_DESTROY,
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   484
	ZFS_IOC_POOL_IMPORT,
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   485
	ZFS_IOC_POOL_EXPORT,
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   486
	ZFS_IOC_POOL_CONFIGS,
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   487
	ZFS_IOC_POOL_STATS,
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   488
	ZFS_IOC_POOL_TRYIMPORT,
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   489
	ZFS_IOC_POOL_SCRUB,
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   490
	ZFS_IOC_POOL_FREEZE,
1760
e1ad2821c30d PSARC 2006/206 zpool upgrade
eschrock
parents: 1544
diff changeset
   491
	ZFS_IOC_POOL_UPGRADE,
2926
acfcfefbc60d PSARC 2006/288 zpool history
ek110237
parents: 2717
diff changeset
   492
	ZFS_IOC_POOL_GET_HISTORY,
789
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   493
	ZFS_IOC_VDEV_ADD,
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   494
	ZFS_IOC_VDEV_REMOVE,
4451
24fbf2d7a5d7 PSARC 2007/197 ZFS hotplug
eschrock
parents: 3975
diff changeset
   495
	ZFS_IOC_VDEV_SET_STATE,
789
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   496
	ZFS_IOC_VDEV_ATTACH,
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   497
	ZFS_IOC_VDEV_DETACH,
1354
81359ee1ee63 6362672 import gets confused about overlapping slices
eschrock
parents: 1352
diff changeset
   498
	ZFS_IOC_VDEV_SETPATH,
789
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   499
	ZFS_IOC_OBJSET_STATS,
5147
5e950ccc9585 6596190 "zfs list" is slow due to version property
rm160521
parents: 5094
diff changeset
   500
	ZFS_IOC_OBJSET_VERSION,
789
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   501
	ZFS_IOC_DATASET_LIST_NEXT,
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   502
	ZFS_IOC_SNAPSHOT_LIST_NEXT,
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   503
	ZFS_IOC_SET_PROP,
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   504
	ZFS_IOC_CREATE_MINOR,
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   505
	ZFS_IOC_REMOVE_MINOR,
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   506
	ZFS_IOC_CREATE,
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   507
	ZFS_IOC_DESTROY,
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   508
	ZFS_IOC_ROLLBACK,
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   509
	ZFS_IOC_RENAME,
5367
c40abbe796be PSARC/2007/574 zfs send -R
ahrens
parents: 5363
diff changeset
   510
	ZFS_IOC_RECV,
c40abbe796be PSARC/2007/574 zfs send -R
ahrens
parents: 5363
diff changeset
   511
	ZFS_IOC_SEND,
1544
938876158511 PSARC 2006/077 zpool clear
eschrock
parents: 1485
diff changeset
   512
	ZFS_IOC_INJECT_FAULT,
938876158511 PSARC 2006/077 zpool clear
eschrock
parents: 1485
diff changeset
   513
	ZFS_IOC_CLEAR_FAULT,
938876158511 PSARC 2006/077 zpool clear
eschrock
parents: 1485
diff changeset
   514
	ZFS_IOC_INJECT_LIST_NEXT,
938876158511 PSARC 2006/077 zpool clear
eschrock
parents: 1485
diff changeset
   515
	ZFS_IOC_ERROR_LOG,
938876158511 PSARC 2006/077 zpool clear
eschrock
parents: 1485
diff changeset
   516
	ZFS_IOC_CLEAR,
2199
712a788c2dfd PSARC 2006/388 snapshot -r
ahrens
parents: 2082
diff changeset
   517
	ZFS_IOC_PROMOTE,
712a788c2dfd PSARC 2006/388 snapshot -r
ahrens
parents: 2082
diff changeset
   518
	ZFS_IOC_DESTROY_SNAPS,
3444
dc160a70a50d 6410433 'zpool status -v' would be more useful with filenames
ek110237
parents: 3377
diff changeset
   519
	ZFS_IOC_SNAPSHOT,
dc160a70a50d 6410433 'zpool status -v' would be more useful with filenames
ek110237
parents: 3377
diff changeset
   520
	ZFS_IOC_DSOBJ_TO_DSNAME,
3912
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents: 3886
diff changeset
   521
	ZFS_IOC_OBJ_TO_PATH,
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents: 3886
diff changeset
   522
	ZFS_IOC_POOL_SET_PROPS,
4543
12bb2876a62e PSARC/2006/465 ZFS Delegated Administration
marks
parents: 4527
diff changeset
   523
	ZFS_IOC_POOL_GET_PROPS,
12bb2876a62e PSARC/2006/465 ZFS Delegated Administration
marks
parents: 4527
diff changeset
   524
	ZFS_IOC_SET_FSACL,
12bb2876a62e PSARC/2006/465 ZFS Delegated Administration
marks
parents: 4527
diff changeset
   525
	ZFS_IOC_GET_FSACL,
12bb2876a62e PSARC/2006/465 ZFS Delegated Administration
marks
parents: 4527
diff changeset
   526
	ZFS_IOC_ISCSI_PERM_CHECK,
4849
3a61e0a9a953 6536043 arc_byteswap_func_t and dmu_byteswap_func_t are redundant
ahrens
parents: 4787
diff changeset
   527
	ZFS_IOC_SHARE,
3a61e0a9a953 6536043 arc_byteswap_func_t and dmu_byteswap_func_t are redundant
ahrens
parents: 4787
diff changeset
   528
	ZFS_IOC_INHERIT_PROP
789
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   529
} zfs_ioc_t;
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   530
1544
938876158511 PSARC 2006/077 zpool clear
eschrock
parents: 1485
diff changeset
   531
/*
938876158511 PSARC 2006/077 zpool clear
eschrock
parents: 1485
diff changeset
   532
 * Internal SPA load state.  Used by FMA diagnosis engine.
938876158511 PSARC 2006/077 zpool clear
eschrock
parents: 1485
diff changeset
   533
 */
938876158511 PSARC 2006/077 zpool clear
eschrock
parents: 1485
diff changeset
   534
typedef enum {
938876158511 PSARC 2006/077 zpool clear
eschrock
parents: 1485
diff changeset
   535
	SPA_LOAD_NONE,		/* no load in progress */
938876158511 PSARC 2006/077 zpool clear
eschrock
parents: 1485
diff changeset
   536
	SPA_LOAD_OPEN,		/* normal open */
938876158511 PSARC 2006/077 zpool clear
eschrock
parents: 1485
diff changeset
   537
	SPA_LOAD_IMPORT,	/* import in progress */
938876158511 PSARC 2006/077 zpool clear
eschrock
parents: 1485
diff changeset
   538
	SPA_LOAD_TRYIMPORT	/* tryimport in progress */
938876158511 PSARC 2006/077 zpool clear
eschrock
parents: 1485
diff changeset
   539
} spa_load_state_t;
938876158511 PSARC 2006/077 zpool clear
eschrock
parents: 1485
diff changeset
   540
2676
5cee47eddab6 PSARC 2006/486 ZFS canmount property
eschrock
parents: 2199
diff changeset
   541
/*
5cee47eddab6 PSARC 2006/486 ZFS canmount property
eschrock
parents: 2199
diff changeset
   542
 * Bookmark name values.
5cee47eddab6 PSARC 2006/486 ZFS canmount property
eschrock
parents: 2199
diff changeset
   543
 */
3444
dc160a70a50d 6410433 'zpool status -v' would be more useful with filenames
ek110237
parents: 3377
diff changeset
   544
#define	ZPOOL_ERR_LIST		"error list"
2676
5cee47eddab6 PSARC 2006/486 ZFS canmount property
eschrock
parents: 2199
diff changeset
   545
#define	ZPOOL_ERR_DATASET	"dataset"
5cee47eddab6 PSARC 2006/486 ZFS canmount property
eschrock
parents: 2199
diff changeset
   546
#define	ZPOOL_ERR_OBJECT	"object"
5cee47eddab6 PSARC 2006/486 ZFS canmount property
eschrock
parents: 2199
diff changeset
   547
2926
acfcfefbc60d PSARC 2006/288 zpool history
ek110237
parents: 2717
diff changeset
   548
#define	HIS_MAX_RECORD_LEN	(MAXPATHLEN + MAXPATHLEN + 1)
acfcfefbc60d PSARC 2006/288 zpool history
ek110237
parents: 2717
diff changeset
   549
acfcfefbc60d PSARC 2006/288 zpool history
ek110237
parents: 2717
diff changeset
   550
/*
acfcfefbc60d PSARC 2006/288 zpool history
ek110237
parents: 2717
diff changeset
   551
 * The following are names used in the nvlist describing
acfcfefbc60d PSARC 2006/288 zpool history
ek110237
parents: 2717
diff changeset
   552
 * the pool's history log.
acfcfefbc60d PSARC 2006/288 zpool history
ek110237
parents: 2717
diff changeset
   553
 */
acfcfefbc60d PSARC 2006/288 zpool history
ek110237
parents: 2717
diff changeset
   554
#define	ZPOOL_HIST_RECORD	"history record"
acfcfefbc60d PSARC 2006/288 zpool history
ek110237
parents: 2717
diff changeset
   555
#define	ZPOOL_HIST_TIME		"history time"
acfcfefbc60d PSARC 2006/288 zpool history
ek110237
parents: 2717
diff changeset
   556
#define	ZPOOL_HIST_CMD		"history command"
4543
12bb2876a62e PSARC/2006/465 ZFS Delegated Administration
marks
parents: 4527
diff changeset
   557
#define	ZPOOL_HIST_WHO		"history who"
12bb2876a62e PSARC/2006/465 ZFS Delegated Administration
marks
parents: 4527
diff changeset
   558
#define	ZPOOL_HIST_ZONE		"history zone"
12bb2876a62e PSARC/2006/465 ZFS Delegated Administration
marks
parents: 4527
diff changeset
   559
#define	ZPOOL_HIST_HOST		"history hostname"
12bb2876a62e PSARC/2006/465 ZFS Delegated Administration
marks
parents: 4527
diff changeset
   560
#define	ZPOOL_HIST_TXG		"history txg"
12bb2876a62e PSARC/2006/465 ZFS Delegated Administration
marks
parents: 4527
diff changeset
   561
#define	ZPOOL_HIST_INT_EVENT	"history internal event"
12bb2876a62e PSARC/2006/465 ZFS Delegated Administration
marks
parents: 4527
diff changeset
   562
#define	ZPOOL_HIST_INT_STR	"history internal str"
2926
acfcfefbc60d PSARC 2006/288 zpool history
ek110237
parents: 2717
diff changeset
   563
4451
24fbf2d7a5d7 PSARC 2007/197 ZFS hotplug
eschrock
parents: 3975
diff changeset
   564
/*
24fbf2d7a5d7 PSARC 2007/197 ZFS hotplug
eschrock
parents: 3975
diff changeset
   565
 * Flags for ZFS_IOC_VDEV_SET_STATE
24fbf2d7a5d7 PSARC 2007/197 ZFS hotplug
eschrock
parents: 3975
diff changeset
   566
 */
24fbf2d7a5d7 PSARC 2007/197 ZFS hotplug
eschrock
parents: 3975
diff changeset
   567
#define	ZFS_ONLINE_CHECKREMOVE	0x1
24fbf2d7a5d7 PSARC 2007/197 ZFS hotplug
eschrock
parents: 3975
diff changeset
   568
#define	ZFS_ONLINE_UNSPARE	0x2
24fbf2d7a5d7 PSARC 2007/197 ZFS hotplug
eschrock
parents: 3975
diff changeset
   569
#define	ZFS_ONLINE_FORCEFAULT	0x4
24fbf2d7a5d7 PSARC 2007/197 ZFS hotplug
eschrock
parents: 3975
diff changeset
   570
#define	ZFS_OFFLINE_TEMPORARY	0x1
24fbf2d7a5d7 PSARC 2007/197 ZFS hotplug
eschrock
parents: 3975
diff changeset
   571
24fbf2d7a5d7 PSARC 2007/197 ZFS hotplug
eschrock
parents: 3975
diff changeset
   572
/*
24fbf2d7a5d7 PSARC 2007/197 ZFS hotplug
eschrock
parents: 3975
diff changeset
   573
 * Sysevent payload members.  ZFS will generate the following sysevents with the
24fbf2d7a5d7 PSARC 2007/197 ZFS hotplug
eschrock
parents: 3975
diff changeset
   574
 * given payloads:
24fbf2d7a5d7 PSARC 2007/197 ZFS hotplug
eschrock
parents: 3975
diff changeset
   575
 *
24fbf2d7a5d7 PSARC 2007/197 ZFS hotplug
eschrock
parents: 3975
diff changeset
   576
 *	ESC_ZFS_RESILVER_START
24fbf2d7a5d7 PSARC 2007/197 ZFS hotplug
eschrock
parents: 3975
diff changeset
   577
 *	ESC_ZFS_RESILVER_END
24fbf2d7a5d7 PSARC 2007/197 ZFS hotplug
eschrock
parents: 3975
diff changeset
   578
 *	ESC_ZFS_POOL_DESTROY
24fbf2d7a5d7 PSARC 2007/197 ZFS hotplug
eschrock
parents: 3975
diff changeset
   579
 *
24fbf2d7a5d7 PSARC 2007/197 ZFS hotplug
eschrock
parents: 3975
diff changeset
   580
 *		ZFS_EV_POOL_NAME	DATA_TYPE_STRING
24fbf2d7a5d7 PSARC 2007/197 ZFS hotplug
eschrock
parents: 3975
diff changeset
   581
 *		ZFS_EV_POOL_GUID	DATA_TYPE_UINT64
24fbf2d7a5d7 PSARC 2007/197 ZFS hotplug
eschrock
parents: 3975
diff changeset
   582
 *
24fbf2d7a5d7 PSARC 2007/197 ZFS hotplug
eschrock
parents: 3975
diff changeset
   583
 *	ESC_ZFS_VDEV_REMOVE
24fbf2d7a5d7 PSARC 2007/197 ZFS hotplug
eschrock
parents: 3975
diff changeset
   584
 *	ESC_ZFS_VDEV_CLEAR
24fbf2d7a5d7 PSARC 2007/197 ZFS hotplug
eschrock
parents: 3975
diff changeset
   585
 *	ESC_ZFS_VDEV_CHECK
24fbf2d7a5d7 PSARC 2007/197 ZFS hotplug
eschrock
parents: 3975
diff changeset
   586
 *
24fbf2d7a5d7 PSARC 2007/197 ZFS hotplug
eschrock
parents: 3975
diff changeset
   587
 *		ZFS_EV_POOL_NAME	DATA_TYPE_STRING
24fbf2d7a5d7 PSARC 2007/197 ZFS hotplug
eschrock
parents: 3975
diff changeset
   588
 *		ZFS_EV_POOL_GUID	DATA_TYPE_UINT64
24fbf2d7a5d7 PSARC 2007/197 ZFS hotplug
eschrock
parents: 3975
diff changeset
   589
 *		ZFS_EV_VDEV_PATH	DATA_TYPE_STRING	(optional)
24fbf2d7a5d7 PSARC 2007/197 ZFS hotplug
eschrock
parents: 3975
diff changeset
   590
 *		ZFS_EV_VDEV_GUID	DATA_TYPE_UINT64
24fbf2d7a5d7 PSARC 2007/197 ZFS hotplug
eschrock
parents: 3975
diff changeset
   591
 */
24fbf2d7a5d7 PSARC 2007/197 ZFS hotplug
eschrock
parents: 3975
diff changeset
   592
#define	ZFS_EV_POOL_NAME	"pool_name"
24fbf2d7a5d7 PSARC 2007/197 ZFS hotplug
eschrock
parents: 3975
diff changeset
   593
#define	ZFS_EV_POOL_GUID	"pool_guid"
24fbf2d7a5d7 PSARC 2007/197 ZFS hotplug
eschrock
parents: 3975
diff changeset
   594
#define	ZFS_EV_VDEV_PATH	"vdev_path"
24fbf2d7a5d7 PSARC 2007/197 ZFS hotplug
eschrock
parents: 3975
diff changeset
   595
#define	ZFS_EV_VDEV_GUID	"vdev_guid"
24fbf2d7a5d7 PSARC 2007/197 ZFS hotplug
eschrock
parents: 3975
diff changeset
   596
4543
12bb2876a62e PSARC/2006/465 ZFS Delegated Administration
marks
parents: 4527
diff changeset
   597
typedef enum history_internal_events {
12bb2876a62e PSARC/2006/465 ZFS Delegated Administration
marks
parents: 4527
diff changeset
   598
	LOG_NO_EVENT = 0,
12bb2876a62e PSARC/2006/465 ZFS Delegated Administration
marks
parents: 4527
diff changeset
   599
	LOG_POOL_CREATE,
12bb2876a62e PSARC/2006/465 ZFS Delegated Administration
marks
parents: 4527
diff changeset
   600
	LOG_POOL_VDEV_ADD,
12bb2876a62e PSARC/2006/465 ZFS Delegated Administration
marks
parents: 4527
diff changeset
   601
	LOG_POOL_REMOVE,
12bb2876a62e PSARC/2006/465 ZFS Delegated Administration
marks
parents: 4527
diff changeset
   602
	LOG_POOL_DESTROY,
12bb2876a62e PSARC/2006/465 ZFS Delegated Administration
marks
parents: 4527
diff changeset
   603
	LOG_POOL_EXPORT,
12bb2876a62e PSARC/2006/465 ZFS Delegated Administration
marks
parents: 4527
diff changeset
   604
	LOG_POOL_IMPORT,
12bb2876a62e PSARC/2006/465 ZFS Delegated Administration
marks
parents: 4527
diff changeset
   605
	LOG_POOL_VDEV_ATTACH,
12bb2876a62e PSARC/2006/465 ZFS Delegated Administration
marks
parents: 4527
diff changeset
   606
	LOG_POOL_VDEV_REPLACE,
12bb2876a62e PSARC/2006/465 ZFS Delegated Administration
marks
parents: 4527
diff changeset
   607
	LOG_POOL_VDEV_DETACH,
12bb2876a62e PSARC/2006/465 ZFS Delegated Administration
marks
parents: 4527
diff changeset
   608
	LOG_POOL_VDEV_ONLINE,
12bb2876a62e PSARC/2006/465 ZFS Delegated Administration
marks
parents: 4527
diff changeset
   609
	LOG_POOL_VDEV_OFFLINE,
12bb2876a62e PSARC/2006/465 ZFS Delegated Administration
marks
parents: 4527
diff changeset
   610
	LOG_POOL_UPGRADE,
12bb2876a62e PSARC/2006/465 ZFS Delegated Administration
marks
parents: 4527
diff changeset
   611
	LOG_POOL_CLEAR,
12bb2876a62e PSARC/2006/465 ZFS Delegated Administration
marks
parents: 4527
diff changeset
   612
	LOG_POOL_SCRUB,
12bb2876a62e PSARC/2006/465 ZFS Delegated Administration
marks
parents: 4527
diff changeset
   613
	LOG_POOL_PROPSET,
12bb2876a62e PSARC/2006/465 ZFS Delegated Administration
marks
parents: 4527
diff changeset
   614
	LOG_DS_CREATE,
12bb2876a62e PSARC/2006/465 ZFS Delegated Administration
marks
parents: 4527
diff changeset
   615
	LOG_DS_CLONE,
12bb2876a62e PSARC/2006/465 ZFS Delegated Administration
marks
parents: 4527
diff changeset
   616
	LOG_DS_DESTROY,
12bb2876a62e PSARC/2006/465 ZFS Delegated Administration
marks
parents: 4527
diff changeset
   617
	LOG_DS_DESTROY_BEGIN,
12bb2876a62e PSARC/2006/465 ZFS Delegated Administration
marks
parents: 4527
diff changeset
   618
	LOG_DS_INHERIT,
12bb2876a62e PSARC/2006/465 ZFS Delegated Administration
marks
parents: 4527
diff changeset
   619
	LOG_DS_PROPSET,
12bb2876a62e PSARC/2006/465 ZFS Delegated Administration
marks
parents: 4527
diff changeset
   620
	LOG_DS_QUOTA,
12bb2876a62e PSARC/2006/465 ZFS Delegated Administration
marks
parents: 4527
diff changeset
   621
	LOG_DS_PERM_UPDATE,
12bb2876a62e PSARC/2006/465 ZFS Delegated Administration
marks
parents: 4527
diff changeset
   622
	LOG_DS_PERM_REMOVE,
12bb2876a62e PSARC/2006/465 ZFS Delegated Administration
marks
parents: 4527
diff changeset
   623
	LOG_DS_PERM_WHO_REMOVE,
12bb2876a62e PSARC/2006/465 ZFS Delegated Administration
marks
parents: 4527
diff changeset
   624
	LOG_DS_PROMOTE,
12bb2876a62e PSARC/2006/465 ZFS Delegated Administration
marks
parents: 4527
diff changeset
   625
	LOG_DS_RECEIVE,
12bb2876a62e PSARC/2006/465 ZFS Delegated Administration
marks
parents: 4527
diff changeset
   626
	LOG_DS_RENAME,
12bb2876a62e PSARC/2006/465 ZFS Delegated Administration
marks
parents: 4527
diff changeset
   627
	LOG_DS_RESERVATION,
12bb2876a62e PSARC/2006/465 ZFS Delegated Administration
marks
parents: 4527
diff changeset
   628
	LOG_DS_REPLAY_INC_SYNC,
12bb2876a62e PSARC/2006/465 ZFS Delegated Administration
marks
parents: 4527
diff changeset
   629
	LOG_DS_REPLAY_FULL_SYNC,
12bb2876a62e PSARC/2006/465 ZFS Delegated Administration
marks
parents: 4527
diff changeset
   630
	LOG_DS_ROLLBACK,
12bb2876a62e PSARC/2006/465 ZFS Delegated Administration
marks
parents: 4527
diff changeset
   631
	LOG_DS_SNAPSHOT,
4577
ed36b0e652bc PSARC/2007/328 zfs upgrade
ahrens
parents: 4543
diff changeset
   632
	LOG_DS_UPGRADE,
5378
111aa1baa84a PSARC 2007/555 zfs fs-only quotas and reservations
ck153898
parents: 5367
diff changeset
   633
	LOG_DS_REFQUOTA,
111aa1baa84a PSARC 2007/555 zfs fs-only quotas and reservations
ck153898
parents: 5367
diff changeset
   634
	LOG_DS_REFRESERV,
4543
12bb2876a62e PSARC/2006/465 ZFS Delegated Administration
marks
parents: 4527
diff changeset
   635
	LOG_END
12bb2876a62e PSARC/2006/465 ZFS Delegated Administration
marks
parents: 4527
diff changeset
   636
} history_internal_events_t;
12bb2876a62e PSARC/2006/465 ZFS Delegated Administration
marks
parents: 4527
diff changeset
   637
789
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   638
#ifdef	__cplusplus
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   639
}
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   640
#endif
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   641
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   642
#endif	/* _SYS_FS_ZFS_H */