Print this page
ZoL PR 9145

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/fs/zfs/sys/dnode.h
          +++ new/usr/src/uts/common/fs/zfs/sys/dnode.h
↓ open down ↓ 38 lines elided ↑ open up ↑
  39   39  
  40   40  #ifdef  __cplusplus
  41   41  extern "C" {
  42   42  #endif
  43   43  
  44   44  /*
  45   45   * dnode_hold() flags.
  46   46   */
  47   47  #define DNODE_MUST_BE_ALLOCATED 1
  48   48  #define DNODE_MUST_BE_FREE      2
       49 +#define DNODE_DRY_RUN           4
  49   50  
  50   51  /*
  51   52   * dnode_next_offset() flags.
  52   53   */
  53   54  #define DNODE_FIND_HOLE         1
  54   55  #define DNODE_FIND_BACKWARDS    2
  55   56  #define DNODE_FIND_HAVELOCK     4
  56   57  
  57   58  /*
  58   59   * Fixed constants.
↓ open down ↓ 327 lines elided ↑ open up ↑
 386  387  void dnode_setbonus_type(dnode_t *dn, dmu_object_type_t, dmu_tx_t *tx);
 387  388  void dnode_rm_spill(dnode_t *dn, dmu_tx_t *tx);
 388  389  
 389  390  int dnode_hold(struct objset *dd, uint64_t object,
 390  391      void *ref, dnode_t **dnp);
 391  392  int dnode_hold_impl(struct objset *dd, uint64_t object, int flag, int dn_slots,
 392  393      void *ref, dnode_t **dnp);
 393  394  boolean_t dnode_add_ref(dnode_t *dn, void *ref);
 394  395  void dnode_rele(dnode_t *dn, void *ref);
 395  396  void dnode_rele_and_unlock(dnode_t *dn, void *tag, boolean_t evicting);
      397 +int dnode_try_claim(objset_t *os, uint64_t object, int slots);
 396  398  void dnode_setdirty(dnode_t *dn, dmu_tx_t *tx);
 397  399  void dnode_sync(dnode_t *dn, dmu_tx_t *tx);
 398  400  void dnode_allocate(dnode_t *dn, dmu_object_type_t ot, int blocksize, int ibs,
 399  401      dmu_object_type_t bonustype, int bonuslen, int dn_slots, dmu_tx_t *tx);
 400  402  void dnode_reallocate(dnode_t *dn, dmu_object_type_t ot, int blocksize,
 401  403      dmu_object_type_t bonustype, int bonuslen, int dn_slots,
 402  404      boolean_t keep_spill, dmu_tx_t *tx);
 403  405  void dnode_free(dnode_t *dn, dmu_tx_t *tx);
 404  406  void dnode_byteswap(dnode_phys_t *dnp);
 405  407  void dnode_buf_byteswap(void *buf, size_t size);
↓ open down ↓ 98 lines elided ↑ open up ↑
 504  506           * Number of times dnode_hold(..., DNODE_MUST_BE_FREE) requested
 505  507           * a range of dnode slots which were held by another thread.
 506  508           */
 507  509          kstat_named_t dnode_hold_free_refcount;
 508  510          /*
 509  511           * Number of times dnode_hold(..., DNODE_MUST_BE_FREE) requested
 510  512           * a range of dnode slots which would overflow the dnode_phys_t.
 511  513           */
 512  514          kstat_named_t dnode_hold_free_overflow;
 513  515          /*
 514      -         * Number of times a dnode_hold(...) was attempted on a dnode
 515      -         * which had already been unlinked in an earlier txg.
 516      -         */
 517      -        kstat_named_t dnode_hold_free_txg;
 518      -        /*
 519  516           * Number of times dnode_free_interior_slots() needed to retry
 520  517           * acquiring a slot zrl lock due to contention.
 521  518           */
 522  519          kstat_named_t dnode_free_interior_lock_retry;
 523  520          /*
 524  521           * Number of new dnodes allocated by dnode_allocate().
 525  522           */
 526  523          kstat_named_t dnode_allocate;
 527  524          /*
 528  525           * Number of dnodes re-allocated by dnode_reallocate().
↓ open down ↓ 77 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX