]> git.proxmox.com Git - mirror_zfs.git/blobdiff - include/sys/dmu.h
Pool allocation classes
[mirror_zfs.git] / include / sys / dmu.h
index 67f4be1c2438814018eedb2f08795481649424b2..bc7046fdced8d56499ae826e65fd0eee8e0e319f 100644 (file)
  */
 /*
  * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2011, 2017 by Delphix. All rights reserved.
+ * Copyright (c) 2011, 2018 by Delphix. All rights reserved.
  * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
  * Copyright (c) 2012, Joyent, Inc. All rights reserved.
  * Copyright 2014 HybridCluster. All rights reserved.
  * Copyright (c) 2014 Spectra Logic Corporation, All rights reserved.
  * Copyright 2013 Saso Kiselkov. All rights reserved.
+ * Copyright (c) 2017, Intel Corporation.
  */
 
 /* Portions Copyright 2010 Robert Milkowski */
@@ -136,6 +137,16 @@ typedef enum dmu_object_byteswap {
        ((ot) & DMU_OT_METADATA) : \
        DMU_OT_IS_METADATA_IMPL(ot))
 
+#define        DMU_OT_IS_DDT(ot) \
+       ((ot) == DMU_OT_DDT_ZAP)
+
+#define        DMU_OT_IS_ZIL(ot) \
+       ((ot) == DMU_OT_INTENT_LOG)
+
+/* Note: ztest uses DMU_OT_UINT64_OTHER as a proxy for file blocks */
+#define        DMU_OT_IS_FILE(ot) \
+       ((ot) == DMU_OT_PLAIN_FILE_CONTENTS || (ot) == DMU_OT_UINT64_OTHER)
+
 #define        DMU_OT_IS_ENCRYPTED(ot) (((ot) & DMU_OT_NEWTYPE) ? \
        ((ot) & DMU_OT_ENCRYPTED) : \
        DMU_OT_IS_ENCRYPTED_IMPL(ot))
@@ -226,7 +237,7 @@ typedef enum dmu_object_type {
         * values.
         *
         * The DMU_OTN_* types do not have entries in the dmu_ot table,
-        * use the DMU_OT_IS_METDATA() and DMU_OT_BYTESWAP() macros instead
+        * use the DMU_OT_IS_METADATA() and DMU_OT_BYTESWAP() macros instead
         * of indexing into dmu_ot directly (this works for both DMU_OT_* types
         * and DMU_OTN_* types).
         */