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