Print this page
*** NO COMMENTS ***

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/fs/zfs/arc.c
          +++ new/usr/src/uts/common/fs/zfs/arc.c
↓ open down ↓ 72 lines elided ↑ open up ↑
  73   73   * The locking model:
  74   74   *
  75   75   * A new reference to a cache buffer can be obtained in two
  76   76   * ways: 1) via a hash table lookup using the DVA as a key,
  77   77   * or 2) via one of the ARC lists.  The arc_read() interface
  78   78   * uses method 1, while the internal arc algorithms for
  79   79   * adjusting the cache use method 2.  We therefor provide two
  80   80   * types of locks: 1) the hash table lock array, and 2) the
  81   81   * arc list locks.
  82   82   *
  83      - * Buffers do not have their own mutexs, rather they rely on the
  84      - * hash table mutexs for the bulk of their protection (i.e. most
  85      - * fields in the arc_buf_hdr_t are protected by these mutexs).
       83 + * Buffers do not have their own mutexes, rather they rely on the
       84 + * hash table mutexes for the bulk of their protection (i.e. most
       85 + * fields in the arc_buf_hdr_t are protected by these mutexes).
  86   86   *
  87   87   * buf_hash_find() returns the appropriate mutex (held) when it
  88   88   * locates the requested buffer in the hash table.  It returns
  89   89   * NULL for the mutex if the buffer was not in the table.
  90   90   *
  91   91   * buf_hash_remove() expects the appropriate hash mutex to be
  92   92   * already held before it is invoked.
  93   93   *
  94   94   * Each arc state also has a mutex which is used to protect the
  95   95   * buffer list associated with the state.  When attempting to
↓ open down ↓ 2533 lines elided ↑ open up ↑
2629 2629  
2630 2630                  callback_list = acb->acb_next;
2631 2631                  kmem_free(acb, sizeof (arc_callback_t));
2632 2632          }
2633 2633  
2634 2634          if (freeable)
2635 2635                  arc_hdr_destroy(hdr);
2636 2636  }
2637 2637  
2638 2638  /*
2639      - * "Read" the block block at the specified DVA (in bp) via the
     2639 + * "Read" the block at the specified DVA (in bp) via the
2640 2640   * cache.  If the block is found in the cache, invoke the provided
2641 2641   * callback immediately and return.  Note that the `zio' parameter
2642 2642   * in the callback will be NULL in this case, since no IO was
2643 2643   * required.  If the block is not in the cache pass the read request
2644 2644   * on to the spa with a substitute callback function, so that the
2645 2645   * requested block will be added to the cache.
2646 2646   *
2647 2647   * If a read request arrives for a block that has a read in-progress,
2648 2648   * either wait for the in-progress read to complete (and return the
2649 2649   * results); or, if this is a read with a "done" func, add a record
↓ open down ↓ 2026 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX