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>

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/fs/zfs/sys/zio.h
          +++ new/usr/src/uts/common/fs/zfs/sys/zio.h
↓ open down ↓ 16 lines elided ↑ open up ↑
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  
  22   22  /*
  23   23   * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
  24   24   */
  25   25  /*
  26   26   * Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
       27 + * Copyright (c) 2012 by Delphix. All rights reserved.
  27   28   */
  28   29  
  29   30  #ifndef _ZIO_H
  30   31  #define _ZIO_H
  31   32  
  32   33  #include <sys/zfs_context.h>
  33   34  #include <sys/spa.h>
  34   35  #include <sys/txg.h>
  35   36  #include <sys/avl.h>
  36   37  #include <sys/fs/zfs.h>
↓ open down ↓ 228 lines elided ↑ open up ↑
 265  266  
 266  267  #define ZB_DESTROYED_OBJSET     (-1ULL)
 267  268  
 268  269  #define ZB_ROOT_OBJECT          (0ULL)
 269  270  #define ZB_ROOT_LEVEL           (-1LL)
 270  271  #define ZB_ROOT_BLKID           (0ULL)
 271  272  
 272  273  #define ZB_ZIL_OBJECT           (0ULL)
 273  274  #define ZB_ZIL_LEVEL            (-2LL)
 274  275  
      276 +#define ZB_IS_ZERO(zb)                                          \
      277 +        ((zb)->zb_objset == 0 && (zb)->zb_object == 0 &&        \
      278 +        (zb)->zb_level == 0 && (zb)->zb_blkid == 0)
      279 +#define ZB_IS_ROOT(zb)                          \
      280 +        ((zb)->zb_object == ZB_ROOT_OBJECT &&   \
      281 +        (zb)->zb_level == ZB_ROOT_LEVEL &&      \
      282 +        (zb)->zb_blkid == ZB_ROOT_BLKID)
      283 +
 275  284  typedef struct zio_prop {
 276  285          enum zio_checksum       zp_checksum;
 277  286          enum zio_compress       zp_compress;
 278  287          dmu_object_type_t       zp_type;
 279  288          uint8_t                 zp_level;
 280  289          uint8_t                 zp_copies;
 281  290          uint8_t                 zp_dedup;
 282  291          uint8_t                 zp_dedup_verify;
 283  292  } zio_prop_t;
 284  293  
 285  294  typedef struct zio_cksum_report zio_cksum_report_t;
 286  295  
 287  296  typedef void zio_cksum_finish_f(zio_cksum_report_t *rep,
 288  297      const void *good_data);
 289  298  typedef void zio_cksum_free_f(void *cbdata, size_t size);
 290  299  
 291  300  struct zio_bad_cksum;                           /* defined in zio_checksum.h */
      301 +struct dnode_phys;
 292  302  
 293  303  struct zio_cksum_report {
 294  304          struct zio_cksum_report *zcr_next;
 295  305          nvlist_t                *zcr_ereport;
 296  306          nvlist_t                *zcr_detector;
 297  307          void                    *zcr_cbdata;
 298  308          size_t                  zcr_cbinfo;     /* passed to zcr_free() */
 299  309          uint64_t                zcr_align;
 300  310          uint64_t                zcr_length;
 301  311          zio_cksum_finish_f      *zcr_finish;
↓ open down ↓ 249 lines elided ↑ open up ↑
 551  561  extern void zfs_ereport_free_checksum(zio_cksum_report_t *report);
 552  562  
 553  563  /* If we have the good data in hand, this function can be used */
 554  564  extern void zfs_ereport_post_checksum(spa_t *spa, vdev_t *vd,
 555  565      struct zio *zio, uint64_t offset, uint64_t length,
 556  566      const void *good_data, const void *bad_data, struct zio_bad_cksum *info);
 557  567  
 558  568  /* Called from spa_sync(), but primarily an injection handler */
 559  569  extern void spa_handle_ignored_writes(spa_t *spa);
 560  570  
      571 +/* zbookmark functions */
      572 +boolean_t zbookmark_is_before(const struct dnode_phys *dnp,
      573 +    const zbookmark_t *zb1, const zbookmark_t *zb2);
      574 +
 561  575  #ifdef  __cplusplus
 562  576  }
 563  577  #endif
 564  578  
 565  579  #endif  /* _ZIO_H */
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX