usr/src/grub/grub-0.97/stage2/zfs-include/dmu.h
author Christopher Siden <chris.siden@delphix.com>
Mon, 21 May 2012 12:11:39 -0700
changeset 13700 2889e2596bd6
parent 12034 aba01deaab16
permissions -rw-r--r--
2619 asynchronous destruction of ZFS file systems 2747 SPA versioning with zfs feature flags Reviewed by: Matt Ahrens <[email protected]> Reviewed by: George Wilson <[email protected]> Reviewed by: Richard Lowe <[email protected]> Reviewed by: Dan Kruchinin <[email protected]> Approved by: Eric Schrock <[email protected]>
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3912
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
     1
/*
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
     2
 *  GRUB  --  GRand Unified Bootloader
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
     3
 *  Copyright (C) 1999,2000,2001,2002,2003,2004  Free Software Foundation, Inc.
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
     4
 *
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
     5
 *  This program is free software; you can redistribute it and/or modify
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
     6
 *  it under the terms of the GNU General Public License as published by
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
     7
 *  the Free Software Foundation; either version 2 of the License, or
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
     8
 *  (at your option) any later version.
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
     9
 *
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
    10
 *  This program is distributed in the hope that it will be useful,
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
    11
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
    12
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
    13
 *  GNU General Public License for more details.
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
    14
 *
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
    15
 *  You should have received a copy of the GNU General Public License
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
    16
 *  along with this program; if not, write to the Free Software
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
    17
 *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
    18
 */
13700
2889e2596bd6 2619 asynchronous destruction of ZFS file systems
Christopher Siden <chris.siden@delphix.com>
parents: 12034
diff changeset
    19
3912
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
    20
/*
11935
538c866aaac6 6716117 ZFS needs native system attribute infrastructure
Mark Shellenbaum <Mark.Shellenbaum@Sun.COM>
parents: 8044
diff changeset
    21
 * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
3912
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
    22
 * Use is subject to license terms.
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
    23
 */
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
    24
13700
2889e2596bd6 2619 asynchronous destruction of ZFS file systems
Christopher Siden <chris.siden@delphix.com>
parents: 12034
diff changeset
    25
/*
2889e2596bd6 2619 asynchronous destruction of ZFS file systems
Christopher Siden <chris.siden@delphix.com>
parents: 12034
diff changeset
    26
 * Copyright (c) 2012 by Delphix. All rights reserved.
2889e2596bd6 2619 asynchronous destruction of ZFS file systems
Christopher Siden <chris.siden@delphix.com>
parents: 12034
diff changeset
    27
 */
2889e2596bd6 2619 asynchronous destruction of ZFS file systems
Christopher Siden <chris.siden@delphix.com>
parents: 12034
diff changeset
    28
3912
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
    29
#ifndef	_SYS_DMU_H
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
    30
#define	_SYS_DMU_H
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
    31
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
    32
/*
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
    33
 * This file describes the interface that the DMU provides for its
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
    34
 * consumers.
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
    35
 *
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
    36
 * The DMU also interacts with the SPA.  That interface is described in
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
    37
 * dmu_spa.h.
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
    38
 */
13700
2889e2596bd6 2619 asynchronous destruction of ZFS file systems
Christopher Siden <chris.siden@delphix.com>
parents: 12034
diff changeset
    39
2889e2596bd6 2619 asynchronous destruction of ZFS file systems
Christopher Siden <chris.siden@delphix.com>
parents: 12034
diff changeset
    40
#define	B_FALSE	0
2889e2596bd6 2619 asynchronous destruction of ZFS file systems
Christopher Siden <chris.siden@delphix.com>
parents: 12034
diff changeset
    41
#define	B_TRUE	1
2889e2596bd6 2619 asynchronous destruction of ZFS file systems
Christopher Siden <chris.siden@delphix.com>
parents: 12034
diff changeset
    42
2889e2596bd6 2619 asynchronous destruction of ZFS file systems
Christopher Siden <chris.siden@delphix.com>
parents: 12034
diff changeset
    43
#define	DMU_OT_NEWTYPE 0x80
2889e2596bd6 2619 asynchronous destruction of ZFS file systems
Christopher Siden <chris.siden@delphix.com>
parents: 12034
diff changeset
    44
#define	DMU_OT_METADATA 0x40
2889e2596bd6 2619 asynchronous destruction of ZFS file systems
Christopher Siden <chris.siden@delphix.com>
parents: 12034
diff changeset
    45
#define	DMU_OT_BYTESWAP_MASK 0x3f
2889e2596bd6 2619 asynchronous destruction of ZFS file systems
Christopher Siden <chris.siden@delphix.com>
parents: 12034
diff changeset
    46
2889e2596bd6 2619 asynchronous destruction of ZFS file systems
Christopher Siden <chris.siden@delphix.com>
parents: 12034
diff changeset
    47
#define	DMU_OT(byteswap, metadata) \
2889e2596bd6 2619 asynchronous destruction of ZFS file systems
Christopher Siden <chris.siden@delphix.com>
parents: 12034
diff changeset
    48
	(DMU_OT_NEWTYPE | \
2889e2596bd6 2619 asynchronous destruction of ZFS file systems
Christopher Siden <chris.siden@delphix.com>
parents: 12034
diff changeset
    49
	((metadata) ? DMU_OT_METADATA : 0) | \
2889e2596bd6 2619 asynchronous destruction of ZFS file systems
Christopher Siden <chris.siden@delphix.com>
parents: 12034
diff changeset
    50
	((byteswap) & DMU_OT_BYTESWAP_MASK))
2889e2596bd6 2619 asynchronous destruction of ZFS file systems
Christopher Siden <chris.siden@delphix.com>
parents: 12034
diff changeset
    51
2889e2596bd6 2619 asynchronous destruction of ZFS file systems
Christopher Siden <chris.siden@delphix.com>
parents: 12034
diff changeset
    52
#define	DMU_OT_IS_VALID(ot) (((ot) & DMU_OT_NEWTYPE) ? \
2889e2596bd6 2619 asynchronous destruction of ZFS file systems
Christopher Siden <chris.siden@delphix.com>
parents: 12034
diff changeset
    53
	((ot) & DMU_OT_BYTESWAP_MASK) < DMU_BSWAP_NUMFUNCS : \
2889e2596bd6 2619 asynchronous destruction of ZFS file systems
Christopher Siden <chris.siden@delphix.com>
parents: 12034
diff changeset
    54
	(ot) < DMU_OT_NUMTYPES)
2889e2596bd6 2619 asynchronous destruction of ZFS file systems
Christopher Siden <chris.siden@delphix.com>
parents: 12034
diff changeset
    55
2889e2596bd6 2619 asynchronous destruction of ZFS file systems
Christopher Siden <chris.siden@delphix.com>
parents: 12034
diff changeset
    56
#define	DMU_OT_IS_METADATA(ot) (((ot) & DMU_OT_NEWTYPE) ? \
2889e2596bd6 2619 asynchronous destruction of ZFS file systems
Christopher Siden <chris.siden@delphix.com>
parents: 12034
diff changeset
    57
	((ot) & DMU_OT_METADATA) : \
2889e2596bd6 2619 asynchronous destruction of ZFS file systems
Christopher Siden <chris.siden@delphix.com>
parents: 12034
diff changeset
    58
	dmu_ot[(ot)].ot_metadata)
2889e2596bd6 2619 asynchronous destruction of ZFS file systems
Christopher Siden <chris.siden@delphix.com>
parents: 12034
diff changeset
    59
2889e2596bd6 2619 asynchronous destruction of ZFS file systems
Christopher Siden <chris.siden@delphix.com>
parents: 12034
diff changeset
    60
typedef enum dmu_object_byteswap {
2889e2596bd6 2619 asynchronous destruction of ZFS file systems
Christopher Siden <chris.siden@delphix.com>
parents: 12034
diff changeset
    61
	DMU_BSWAP_UINT8,
2889e2596bd6 2619 asynchronous destruction of ZFS file systems
Christopher Siden <chris.siden@delphix.com>
parents: 12034
diff changeset
    62
	DMU_BSWAP_UINT16,
2889e2596bd6 2619 asynchronous destruction of ZFS file systems
Christopher Siden <chris.siden@delphix.com>
parents: 12034
diff changeset
    63
	DMU_BSWAP_UINT32,
2889e2596bd6 2619 asynchronous destruction of ZFS file systems
Christopher Siden <chris.siden@delphix.com>
parents: 12034
diff changeset
    64
	DMU_BSWAP_UINT64,
2889e2596bd6 2619 asynchronous destruction of ZFS file systems
Christopher Siden <chris.siden@delphix.com>
parents: 12034
diff changeset
    65
	DMU_BSWAP_ZAP,
2889e2596bd6 2619 asynchronous destruction of ZFS file systems
Christopher Siden <chris.siden@delphix.com>
parents: 12034
diff changeset
    66
	DMU_BSWAP_DNODE,
2889e2596bd6 2619 asynchronous destruction of ZFS file systems
Christopher Siden <chris.siden@delphix.com>
parents: 12034
diff changeset
    67
	DMU_BSWAP_OBJSET,
2889e2596bd6 2619 asynchronous destruction of ZFS file systems
Christopher Siden <chris.siden@delphix.com>
parents: 12034
diff changeset
    68
	DMU_BSWAP_ZNODE,
2889e2596bd6 2619 asynchronous destruction of ZFS file systems
Christopher Siden <chris.siden@delphix.com>
parents: 12034
diff changeset
    69
	DMU_BSWAP_OLDACL,
2889e2596bd6 2619 asynchronous destruction of ZFS file systems
Christopher Siden <chris.siden@delphix.com>
parents: 12034
diff changeset
    70
	DMU_BSWAP_ACL,
2889e2596bd6 2619 asynchronous destruction of ZFS file systems
Christopher Siden <chris.siden@delphix.com>
parents: 12034
diff changeset
    71
	DMU_BSWAP_NUMFUNCS
2889e2596bd6 2619 asynchronous destruction of ZFS file systems
Christopher Siden <chris.siden@delphix.com>
parents: 12034
diff changeset
    72
} dmu_object_byteswap_t;
2889e2596bd6 2619 asynchronous destruction of ZFS file systems
Christopher Siden <chris.siden@delphix.com>
parents: 12034
diff changeset
    73
3912
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
    74
typedef enum dmu_object_type {
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
    75
	DMU_OT_NONE,
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
    76
	/* general: */
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
    77
	DMU_OT_OBJECT_DIRECTORY,	/* ZAP */
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
    78
	DMU_OT_OBJECT_ARRAY,		/* UINT64 */
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
    79
	DMU_OT_PACKED_NVLIST,		/* UINT8 (XDR by nvlist_pack/unpack) */
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
    80
	DMU_OT_PACKED_NVLIST_SIZE,	/* UINT64 */
13700
2889e2596bd6 2619 asynchronous destruction of ZFS file systems
Christopher Siden <chris.siden@delphix.com>
parents: 12034
diff changeset
    81
	DMU_OT_BPOBJ,			/* UINT64 */
2889e2596bd6 2619 asynchronous destruction of ZFS file systems
Christopher Siden <chris.siden@delphix.com>
parents: 12034
diff changeset
    82
	DMU_OT_BPOBJ_HDR,		/* UINT64 */
3912
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
    83
	/* spa: */
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
    84
	DMU_OT_SPACE_MAP_HEADER,	/* UINT64 */
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
    85
	DMU_OT_SPACE_MAP,		/* UINT64 */
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
    86
	/* zil: */
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
    87
	DMU_OT_INTENT_LOG,		/* UINT64 */
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
    88
	/* dmu: */
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
    89
	DMU_OT_DNODE,			/* DNODE */
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
    90
	DMU_OT_OBJSET,			/* OBJSET */
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
    91
	/* dsl: */
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
    92
	DMU_OT_DSL_DIR,			/* UINT64 */
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
    93
	DMU_OT_DSL_DIR_CHILD_MAP,	/* ZAP */
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
    94
	DMU_OT_DSL_DS_SNAP_MAP,		/* ZAP */
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
    95
	DMU_OT_DSL_PROPS,		/* ZAP */
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
    96
	DMU_OT_DSL_DATASET,		/* UINT64 */
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
    97
	/* zpl: */
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
    98
	DMU_OT_ZNODE,			/* ZNODE */
13700
2889e2596bd6 2619 asynchronous destruction of ZFS file systems
Christopher Siden <chris.siden@delphix.com>
parents: 12034
diff changeset
    99
	DMU_OT_OLDACL,			/* Old ACL */
3912
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
   100
	DMU_OT_PLAIN_FILE_CONTENTS,	/* UINT8 */
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
   101
	DMU_OT_DIRECTORY_CONTENTS,	/* ZAP */
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
   102
	DMU_OT_MASTER_NODE,		/* ZAP */
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
   103
	DMU_OT_UNLINKED_SET,		/* ZAP */
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
   104
	/* zvol: */
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
   105
	DMU_OT_ZVOL,			/* UINT8 */
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
   106
	DMU_OT_ZVOL_PROP,		/* ZAP */
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
   107
	/* other; for testing only! */
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
   108
	DMU_OT_PLAIN_OTHER,		/* UINT8 */
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
   109
	DMU_OT_UINT64_OTHER,		/* UINT64 */
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
   110
	DMU_OT_ZAP_OTHER,		/* ZAP */
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
   111
	/* new object types: */
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
   112
	DMU_OT_ERROR_LOG,		/* ZAP */
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
   113
	DMU_OT_SPA_HISTORY,		/* UINT8 */
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
   114
	DMU_OT_SPA_HISTORY_OFFSETS,	/* spa_his_phys_t */
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
   115
	DMU_OT_POOL_PROPS,		/* ZAP */
11935
538c866aaac6 6716117 ZFS needs native system attribute infrastructure
Mark Shellenbaum <Mark.Shellenbaum@Sun.COM>
parents: 8044
diff changeset
   116
	DMU_OT_DSL_PERMS,		/* ZAP */
538c866aaac6 6716117 ZFS needs native system attribute infrastructure
Mark Shellenbaum <Mark.Shellenbaum@Sun.COM>
parents: 8044
diff changeset
   117
	DMU_OT_ACL,			/* ACL */
538c866aaac6 6716117 ZFS needs native system attribute infrastructure
Mark Shellenbaum <Mark.Shellenbaum@Sun.COM>
parents: 8044
diff changeset
   118
	DMU_OT_SYSACL,			/* SYSACL */
538c866aaac6 6716117 ZFS needs native system attribute infrastructure
Mark Shellenbaum <Mark.Shellenbaum@Sun.COM>
parents: 8044
diff changeset
   119
	DMU_OT_FUID,			/* FUID table (Packed NVLIST UINT8) */
538c866aaac6 6716117 ZFS needs native system attribute infrastructure
Mark Shellenbaum <Mark.Shellenbaum@Sun.COM>
parents: 8044
diff changeset
   120
	DMU_OT_FUID_SIZE,		/* FUID table size UINT64 */
538c866aaac6 6716117 ZFS needs native system attribute infrastructure
Mark Shellenbaum <Mark.Shellenbaum@Sun.COM>
parents: 8044
diff changeset
   121
	DMU_OT_NEXT_CLONES,		/* ZAP */
13700
2889e2596bd6 2619 asynchronous destruction of ZFS file systems
Christopher Siden <chris.siden@delphix.com>
parents: 12034
diff changeset
   122
	DMU_OT_SCAN_QUEUE,		/* ZAP */
11935
538c866aaac6 6716117 ZFS needs native system attribute infrastructure
Mark Shellenbaum <Mark.Shellenbaum@Sun.COM>
parents: 8044
diff changeset
   123
	DMU_OT_USERGROUP_USED,		/* ZAP */
538c866aaac6 6716117 ZFS needs native system attribute infrastructure
Mark Shellenbaum <Mark.Shellenbaum@Sun.COM>
parents: 8044
diff changeset
   124
	DMU_OT_USERGROUP_QUOTA,		/* ZAP */
538c866aaac6 6716117 ZFS needs native system attribute infrastructure
Mark Shellenbaum <Mark.Shellenbaum@Sun.COM>
parents: 8044
diff changeset
   125
	DMU_OT_USERREFS,		/* ZAP */
538c866aaac6 6716117 ZFS needs native system attribute infrastructure
Mark Shellenbaum <Mark.Shellenbaum@Sun.COM>
parents: 8044
diff changeset
   126
	DMU_OT_DDT_ZAP,			/* ZAP */
538c866aaac6 6716117 ZFS needs native system attribute infrastructure
Mark Shellenbaum <Mark.Shellenbaum@Sun.COM>
parents: 8044
diff changeset
   127
	DMU_OT_DDT_STATS,		/* ZAP */
538c866aaac6 6716117 ZFS needs native system attribute infrastructure
Mark Shellenbaum <Mark.Shellenbaum@Sun.COM>
parents: 8044
diff changeset
   128
	DMU_OT_SA,			/* System attr */
538c866aaac6 6716117 ZFS needs native system attribute infrastructure
Mark Shellenbaum <Mark.Shellenbaum@Sun.COM>
parents: 8044
diff changeset
   129
	DMU_OT_SA_MASTER_NODE,		/* ZAP */
538c866aaac6 6716117 ZFS needs native system attribute infrastructure
Mark Shellenbaum <Mark.Shellenbaum@Sun.COM>
parents: 8044
diff changeset
   130
	DMU_OT_SA_ATTR_REGISTRATION,	/* ZAP */
538c866aaac6 6716117 ZFS needs native system attribute infrastructure
Mark Shellenbaum <Mark.Shellenbaum@Sun.COM>
parents: 8044
diff changeset
   131
	DMU_OT_SA_ATTR_LAYOUTS,		/* ZAP */
13700
2889e2596bd6 2619 asynchronous destruction of ZFS file systems
Christopher Siden <chris.siden@delphix.com>
parents: 12034
diff changeset
   132
	DMU_OT_SCAN_XLATE,		/* ZAP */
2889e2596bd6 2619 asynchronous destruction of ZFS file systems
Christopher Siden <chris.siden@delphix.com>
parents: 12034
diff changeset
   133
	DMU_OT_DEDUP,			/* fake dedup BP from ddt_bp_create() */
2889e2596bd6 2619 asynchronous destruction of ZFS file systems
Christopher Siden <chris.siden@delphix.com>
parents: 12034
diff changeset
   134
	DMU_OT_DEADLIST,		/* ZAP */
2889e2596bd6 2619 asynchronous destruction of ZFS file systems
Christopher Siden <chris.siden@delphix.com>
parents: 12034
diff changeset
   135
	DMU_OT_DEADLIST_HDR,		/* UINT64 */
2889e2596bd6 2619 asynchronous destruction of ZFS file systems
Christopher Siden <chris.siden@delphix.com>
parents: 12034
diff changeset
   136
	DMU_OT_DSL_CLONES,		/* ZAP */
2889e2596bd6 2619 asynchronous destruction of ZFS file systems
Christopher Siden <chris.siden@delphix.com>
parents: 12034
diff changeset
   137
	DMU_OT_BPOBJ_SUBOBJ,		/* UINT64 */
2889e2596bd6 2619 asynchronous destruction of ZFS file systems
Christopher Siden <chris.siden@delphix.com>
parents: 12034
diff changeset
   138
	DMU_OT_NUMTYPES,
2889e2596bd6 2619 asynchronous destruction of ZFS file systems
Christopher Siden <chris.siden@delphix.com>
parents: 12034
diff changeset
   139
2889e2596bd6 2619 asynchronous destruction of ZFS file systems
Christopher Siden <chris.siden@delphix.com>
parents: 12034
diff changeset
   140
	DMU_OTN_UINT8_DATA = DMU_OT(DMU_BSWAP_UINT8, B_FALSE),
2889e2596bd6 2619 asynchronous destruction of ZFS file systems
Christopher Siden <chris.siden@delphix.com>
parents: 12034
diff changeset
   141
	DMU_OTN_UINT8_METADATA = DMU_OT(DMU_BSWAP_UINT8, B_TRUE),
2889e2596bd6 2619 asynchronous destruction of ZFS file systems
Christopher Siden <chris.siden@delphix.com>
parents: 12034
diff changeset
   142
	DMU_OTN_UINT16_DATA = DMU_OT(DMU_BSWAP_UINT16, B_FALSE),
2889e2596bd6 2619 asynchronous destruction of ZFS file systems
Christopher Siden <chris.siden@delphix.com>
parents: 12034
diff changeset
   143
	DMU_OTN_UINT16_METADATA = DMU_OT(DMU_BSWAP_UINT16, B_TRUE),
2889e2596bd6 2619 asynchronous destruction of ZFS file systems
Christopher Siden <chris.siden@delphix.com>
parents: 12034
diff changeset
   144
	DMU_OTN_UINT32_DATA = DMU_OT(DMU_BSWAP_UINT32, B_FALSE),
2889e2596bd6 2619 asynchronous destruction of ZFS file systems
Christopher Siden <chris.siden@delphix.com>
parents: 12034
diff changeset
   145
	DMU_OTN_UINT32_METADATA = DMU_OT(DMU_BSWAP_UINT32, B_TRUE),
2889e2596bd6 2619 asynchronous destruction of ZFS file systems
Christopher Siden <chris.siden@delphix.com>
parents: 12034
diff changeset
   146
	DMU_OTN_UINT64_DATA = DMU_OT(DMU_BSWAP_UINT64, B_FALSE),
2889e2596bd6 2619 asynchronous destruction of ZFS file systems
Christopher Siden <chris.siden@delphix.com>
parents: 12034
diff changeset
   147
	DMU_OTN_UINT64_METADATA = DMU_OT(DMU_BSWAP_UINT64, B_TRUE),
2889e2596bd6 2619 asynchronous destruction of ZFS file systems
Christopher Siden <chris.siden@delphix.com>
parents: 12034
diff changeset
   148
	DMU_OTN_ZAP_DATA = DMU_OT(DMU_BSWAP_ZAP, B_FALSE),
2889e2596bd6 2619 asynchronous destruction of ZFS file systems
Christopher Siden <chris.siden@delphix.com>
parents: 12034
diff changeset
   149
	DMU_OTN_ZAP_METADATA = DMU_OT(DMU_BSWAP_ZAP, B_TRUE),
3912
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
   150
} dmu_object_type_t;
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
   151
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
   152
typedef enum dmu_objset_type {
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
   153
	DMU_OST_NONE,
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
   154
	DMU_OST_META,
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
   155
	DMU_OST_ZFS,
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
   156
	DMU_OST_ZVOL,
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
   157
	DMU_OST_OTHER,			/* For testing only! */
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
   158
	DMU_OST_ANY,			/* Be careful! */
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
   159
	DMU_OST_NUMTYPES
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
   160
} dmu_objset_type_t;
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
   161
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
   162
/*
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
   163
 * The names of zap entries in the DIRECTORY_OBJECT of the MOS.
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
   164
 */
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
   165
#define	DMU_POOL_DIRECTORY_OBJECT	1
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
   166
#define	DMU_POOL_CONFIG			"config"
13700
2889e2596bd6 2619 asynchronous destruction of ZFS file systems
Christopher Siden <chris.siden@delphix.com>
parents: 12034
diff changeset
   167
#define	DMU_POOL_FEATURES_FOR_READ	"features_for_read"
2889e2596bd6 2619 asynchronous destruction of ZFS file systems
Christopher Siden <chris.siden@delphix.com>
parents: 12034
diff changeset
   168
#define	DMU_POOL_FEATURES_FOR_WRITE	"features_for_write"
2889e2596bd6 2619 asynchronous destruction of ZFS file systems
Christopher Siden <chris.siden@delphix.com>
parents: 12034
diff changeset
   169
#define	DMU_POOL_FEATURE_DESCRIPTIONS	"feature_descriptions"
3912
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
   170
#define	DMU_POOL_ROOT_DATASET		"root_dataset"
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
   171
#define	DMU_POOL_SYNC_BPLIST		"sync_bplist"
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
   172
#define	DMU_POOL_ERRLOG_SCRUB		"errlog_scrub"
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
   173
#define	DMU_POOL_ERRLOG_LAST		"errlog_last"
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
   174
#define	DMU_POOL_SPARES			"spares"
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
   175
#define	DMU_POOL_DEFLATE		"deflate"
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
   176
#define	DMU_POOL_HISTORY		"history"
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
   177
#define	DMU_POOL_PROPS			"pool_props"
5450
b25030891c44 PSARC 2007/618 ZFS L2ARC
brendan
parents: 3912
diff changeset
   178
#define	DMU_POOL_L2CACHE		"l2cache"
3912
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
   179
f6891a60bd72 PSARC 2007/083 ZFS bootable datasets
lling
parents:
diff changeset
   180
#endif	/* _SYS_DMU_H */