Jorgen Lundman | 9b4a1f9 | 2012-07-19 20:48:25 +0000 | [diff] [blame] | 1 | /* |
| 2 | * GRUB -- GRand Unified Bootloader |
| 3 | * Copyright (C) 1999,2000,2001,2002,2003,2004 Free Software Foundation, Inc. |
| 4 | * |
Wolfgang Denk | d79de1d | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 5 | * SPDX-License-Identifier: GPL-2.0+ |
Jorgen Lundman | 9b4a1f9 | 2012-07-19 20:48:25 +0000 | [diff] [blame] | 6 | */ |
| 7 | /* |
| 8 | * Copyright 2010 Sun Microsystems, Inc. All rights reserved. |
| 9 | * Use is subject to license terms. |
| 10 | */ |
| 11 | |
| 12 | #ifndef _SYS_DMU_H |
| 13 | #define _SYS_DMU_H |
| 14 | |
| 15 | /* |
| 16 | * This file describes the interface that the DMU provides for its |
| 17 | * consumers. |
| 18 | * |
| 19 | * The DMU also interacts with the SPA. That interface is described in |
| 20 | * dmu_spa.h. |
| 21 | */ |
| 22 | typedef enum dmu_object_type { |
| 23 | DMU_OT_NONE, |
| 24 | /* general: */ |
| 25 | DMU_OT_OBJECT_DIRECTORY, /* ZAP */ |
| 26 | DMU_OT_OBJECT_ARRAY, /* UINT64 */ |
| 27 | DMU_OT_PACKED_NVLIST, /* UINT8 (XDR by nvlist_pack/unpack) */ |
| 28 | DMU_OT_PACKED_NVLIST_SIZE, /* UINT64 */ |
| 29 | DMU_OT_BPLIST, /* UINT64 */ |
| 30 | DMU_OT_BPLIST_HDR, /* UINT64 */ |
| 31 | /* spa: */ |
| 32 | DMU_OT_SPACE_MAP_HEADER, /* UINT64 */ |
| 33 | DMU_OT_SPACE_MAP, /* UINT64 */ |
| 34 | /* zil: */ |
| 35 | DMU_OT_INTENT_LOG, /* UINT64 */ |
| 36 | /* dmu: */ |
| 37 | DMU_OT_DNODE, /* DNODE */ |
| 38 | DMU_OT_OBJSET, /* OBJSET */ |
| 39 | /* dsl: */ |
| 40 | DMU_OT_DSL_DIR, /* UINT64 */ |
| 41 | DMU_OT_DSL_DIR_CHILD_MAP, /* ZAP */ |
| 42 | DMU_OT_DSL_DS_SNAP_MAP, /* ZAP */ |
| 43 | DMU_OT_DSL_PROPS, /* ZAP */ |
| 44 | DMU_OT_DSL_DATASET, /* UINT64 */ |
| 45 | /* zpl: */ |
| 46 | DMU_OT_ZNODE, /* ZNODE */ |
| 47 | DMU_OT_OLDACL, /* OLD ACL */ |
| 48 | DMU_OT_PLAIN_FILE_CONTENTS, /* UINT8 */ |
| 49 | DMU_OT_DIRECTORY_CONTENTS, /* ZAP */ |
| 50 | DMU_OT_MASTER_NODE, /* ZAP */ |
| 51 | DMU_OT_UNLINKED_SET, /* ZAP */ |
| 52 | /* zvol: */ |
| 53 | DMU_OT_ZVOL, /* UINT8 */ |
| 54 | DMU_OT_ZVOL_PROP, /* ZAP */ |
| 55 | /* other; for testing only! */ |
| 56 | DMU_OT_PLAIN_OTHER, /* UINT8 */ |
| 57 | DMU_OT_UINT64_OTHER, /* UINT64 */ |
| 58 | DMU_OT_ZAP_OTHER, /* ZAP */ |
| 59 | /* new object types: */ |
| 60 | DMU_OT_ERROR_LOG, /* ZAP */ |
| 61 | DMU_OT_SPA_HISTORY, /* UINT8 */ |
| 62 | DMU_OT_SPA_HISTORY_OFFSETS, /* spa_his_phys_t */ |
| 63 | DMU_OT_POOL_PROPS, /* ZAP */ |
| 64 | DMU_OT_DSL_PERMS, /* ZAP */ |
| 65 | DMU_OT_ACL, /* ACL */ |
| 66 | DMU_OT_SYSACL, /* SYSACL */ |
| 67 | DMU_OT_FUID, /* FUID table (Packed NVLIST UINT8) */ |
| 68 | DMU_OT_FUID_SIZE, /* FUID table size UINT64 */ |
| 69 | DMU_OT_NEXT_CLONES, /* ZAP */ |
| 70 | DMU_OT_SCRUB_QUEUE, /* ZAP */ |
| 71 | DMU_OT_USERGROUP_USED, /* ZAP */ |
| 72 | DMU_OT_USERGROUP_QUOTA, /* ZAP */ |
| 73 | DMU_OT_USERREFS, /* ZAP */ |
| 74 | DMU_OT_DDT_ZAP, /* ZAP */ |
| 75 | DMU_OT_DDT_STATS, /* ZAP */ |
| 76 | DMU_OT_SA, /* System attr */ |
| 77 | DMU_OT_SA_MASTER_NODE, /* ZAP */ |
| 78 | DMU_OT_SA_ATTR_REGISTRATION, /* ZAP */ |
| 79 | DMU_OT_SA_ATTR_LAYOUTS, /* ZAP */ |
| 80 | DMU_OT_NUMTYPES |
| 81 | } dmu_object_type_t; |
| 82 | |
| 83 | typedef enum dmu_objset_type { |
| 84 | DMU_OST_NONE, |
| 85 | DMU_OST_META, |
| 86 | DMU_OST_ZFS, |
| 87 | DMU_OST_ZVOL, |
| 88 | DMU_OST_OTHER, /* For testing only! */ |
| 89 | DMU_OST_ANY, /* Be careful! */ |
| 90 | DMU_OST_NUMTYPES |
| 91 | } dmu_objset_type_t; |
| 92 | |
| 93 | /* |
| 94 | * The names of zap entries in the DIRECTORY_OBJECT of the MOS. |
| 95 | */ |
| 96 | #define DMU_POOL_DIRECTORY_OBJECT 1 |
| 97 | #define DMU_POOL_CONFIG "config" |
| 98 | #define DMU_POOL_ROOT_DATASET "root_dataset" |
| 99 | #define DMU_POOL_SYNC_BPLIST "sync_bplist" |
| 100 | #define DMU_POOL_ERRLOG_SCRUB "errlog_scrub" |
| 101 | #define DMU_POOL_ERRLOG_LAST "errlog_last" |
| 102 | #define DMU_POOL_SPARES "spares" |
| 103 | #define DMU_POOL_DEFLATE "deflate" |
| 104 | #define DMU_POOL_HISTORY "history" |
| 105 | #define DMU_POOL_PROPS "pool_props" |
| 106 | #define DMU_POOL_L2CACHE "l2cache" |
| 107 | |
| 108 | #endif /* _SYS_DMU_H */ |