1 /* 2 * GRUB -- GRand Unified Bootloader 3 * Copyright (C) 1999,2000,2001,2002,2003,2004 Free Software Foundation, Inc. 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation; either version 2 of the License, or 8 * (at your option) any later version. 9 * 10 * This program is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU General Public License for more details. 14 * 15 * You should have received a copy of the GNU General Public License 16 * along with this program; if not, write to the Free Software 17 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 */ 19 /* 20 * Copyright 2007 Sun Microsystems, Inc. All rights reserved. 21 * Use is subject to license terms. 22 */ 23 24 #ifndef _SYS_DMU_H 25 #define _SYS_DMU_H 26 27 #pragma ident "%Z%%M% %I% %E% SMI" 28 29 /* 30 * This file describes the interface that the DMU provides for its 31 * consumers. 32 * 33 * The DMU also interacts with the SPA. That interface is described in 34 * dmu_spa.h. 35 */ 36 typedef enum dmu_object_type { 37 DMU_OT_NONE, 38 /* general: */ 39 DMU_OT_OBJECT_DIRECTORY, /* ZAP */ 40 DMU_OT_OBJECT_ARRAY, /* UINT64 */ 41 DMU_OT_PACKED_NVLIST, /* UINT8 (XDR by nvlist_pack/unpack) */ 42 DMU_OT_PACKED_NVLIST_SIZE, /* UINT64 */ 43 DMU_OT_BPLIST, /* UINT64 */ 44 DMU_OT_BPLIST_HDR, /* UINT64 */ 45 /* spa: */ 46 DMU_OT_SPACE_MAP_HEADER, /* UINT64 */ 47 DMU_OT_SPACE_MAP, /* UINT64 */ 48 /* zil: */ 49 DMU_OT_INTENT_LOG, /* UINT64 */ 50 /* dmu: */ 51 DMU_OT_DNODE, /* DNODE */ 52 DMU_OT_OBJSET, /* OBJSET */ 53 /* dsl: */ 54 DMU_OT_DSL_DIR, /* UINT64 */ 55 DMU_OT_DSL_DIR_CHILD_MAP, /* ZAP */ 56 DMU_OT_DSL_DS_SNAP_MAP, /* ZAP */ 57 DMU_OT_DSL_PROPS, /* ZAP */ 58 DMU_OT_DSL_DATASET, /* UINT64 */ 59 /* zpl: */ 60 DMU_OT_ZNODE, /* ZNODE */ 61 DMU_OT_ACL, /* ACL */ 62 DMU_OT_PLAIN_FILE_CONTENTS, /* UINT8 */ 63 DMU_OT_DIRECTORY_CONTENTS, /* ZAP */ 64 DMU_OT_MASTER_NODE, /* ZAP */ 65 DMU_OT_UNLINKED_SET, /* ZAP */ 66 /* zvol: */ 67 DMU_OT_ZVOL, /* UINT8 */ 68 DMU_OT_ZVOL_PROP, /* ZAP */ 69 /* other; for testing only! */ 70 DMU_OT_PLAIN_OTHER, /* UINT8 */ 71 DMU_OT_UINT64_OTHER, /* UINT64 */ 72 DMU_OT_ZAP_OTHER, /* ZAP */ 73 /* new object types: */ 74 DMU_OT_ERROR_LOG, /* ZAP */ 75 DMU_OT_SPA_HISTORY, /* UINT8 */ 76 DMU_OT_SPA_HISTORY_OFFSETS, /* spa_his_phys_t */ 77 DMU_OT_POOL_PROPS, /* ZAP */ 78 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 */ 108