Print this page
2619 asynchronous destruction of ZFS file systems
2747 SPA versioning with zfs feature flags
Reviewed by: Matt Ahrens <mahrens@delphix.com>
Reviewed by: George Wilson <gwilson@delphix.com>
Reviewed by: Richard Lowe <richlowe@richlowe.net>
Reviewed by: Dan Kruchinin <dan.kruchinin@gmail.com>
Approved by: Dan McDonald <danmcd@nexenta.com>
        
@@ -22,10 +22,11 @@
 /*
  * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
+ * Copyright (c) 2012 by Delphix. All rights reserved.
  */
 
 #ifndef _ZIO_H
 #define _ZIO_H
 
@@ -270,10 +271,18 @@
 #define ZB_ROOT_BLKID           (0ULL)
 
 #define ZB_ZIL_OBJECT           (0ULL)
 #define ZB_ZIL_LEVEL            (-2LL)
 
+#define ZB_IS_ZERO(zb)                                          \
+        ((zb)->zb_objset == 0 && (zb)->zb_object == 0 &&        \
+        (zb)->zb_level == 0 && (zb)->zb_blkid == 0)
+#define ZB_IS_ROOT(zb)                          \
+        ((zb)->zb_object == ZB_ROOT_OBJECT &&   \
+        (zb)->zb_level == ZB_ROOT_LEVEL &&      \
+        (zb)->zb_blkid == ZB_ROOT_BLKID)
+
 typedef struct zio_prop {
         enum zio_checksum       zp_checksum;
         enum zio_compress       zp_compress;
         dmu_object_type_t       zp_type;
         uint8_t                 zp_level;
@@ -287,10 +296,11 @@
 typedef void zio_cksum_finish_f(zio_cksum_report_t *rep,
     const void *good_data);
 typedef void zio_cksum_free_f(void *cbdata, size_t size);
 
 struct zio_bad_cksum;                           /* defined in zio_checksum.h */
+struct dnode_phys;
 
 struct zio_cksum_report {
         struct zio_cksum_report *zcr_next;
         nvlist_t                *zcr_ereport;
         nvlist_t                *zcr_detector;
@@ -556,10 +566,14 @@
     const void *good_data, const void *bad_data, struct zio_bad_cksum *info);
 
 /* Called from spa_sync(), but primarily an injection handler */
 extern void spa_handle_ignored_writes(spa_t *spa);
 
+/* zbookmark functions */
+boolean_t zbookmark_is_before(const struct dnode_phys *dnp,
+    const zbookmark_t *zb1, const zbookmark_t *zb2);
+
 #ifdef  __cplusplus
 }
 #endif
 
 #endif  /* _ZIO_H */