Print this page
5179 remove unused ZFS ARC functions


  66 #define ARC_WAIT        (1 << 1)  /* perform I/O synchronously */
  67 #define ARC_NOWAIT      (1 << 2)  /* perform I/O asynchronously */
  68 #define ARC_PREFETCH    (1 << 3)  /* I/O is a prefetch */
  69 #define ARC_CACHED      (1 << 4)  /* I/O was already in cache */
  70 #define ARC_L2CACHE     (1 << 5)  /* cache in L2ARC */
  71 #define ARC_L2COMPRESS  (1 << 6)  /* compress in L2ARC */
  72 
  73 /*
  74  * The following breakdows of arc_size exist for kstat only.
  75  */
  76 typedef enum arc_space_type {
  77         ARC_SPACE_DATA,
  78         ARC_SPACE_HDRS,
  79         ARC_SPACE_L2HDRS,
  80         ARC_SPACE_OTHER,
  81         ARC_SPACE_NUMTYPES
  82 } arc_space_type_t;
  83 
  84 void arc_space_consume(uint64_t space, arc_space_type_t type);
  85 void arc_space_return(uint64_t space, arc_space_type_t type);
  86 void *arc_data_buf_alloc(uint64_t space);
  87 void arc_data_buf_free(void *buf, uint64_t space);
  88 arc_buf_t *arc_buf_alloc(spa_t *spa, int size, void *tag,
  89     arc_buf_contents_t type);
  90 arc_buf_t *arc_loan_buf(spa_t *spa, int size);
  91 void arc_return_buf(arc_buf_t *buf, void *tag);
  92 void arc_loan_inuse_buf(arc_buf_t *buf, void *tag);
  93 void arc_buf_add_ref(arc_buf_t *buf, void *tag);
  94 boolean_t arc_buf_remove_ref(arc_buf_t *buf, void *tag);
  95 int arc_buf_size(arc_buf_t *buf);
  96 void arc_release(arc_buf_t *buf, void *tag);
  97 int arc_released(arc_buf_t *buf);
  98 void arc_buf_freeze(arc_buf_t *buf);
  99 void arc_buf_thaw(arc_buf_t *buf);
 100 boolean_t arc_buf_eviction_needed(arc_buf_t *buf);
 101 #ifdef ZFS_DEBUG
 102 int arc_referenced(arc_buf_t *buf);
 103 #endif
 104 
 105 int arc_read(zio_t *pio, spa_t *spa, const blkptr_t *bp,
 106     arc_done_func_t *done, void *private, zio_priority_t priority, int flags,
 107     uint32_t *arc_flags, const zbookmark_phys_t *zb);




  66 #define ARC_WAIT        (1 << 1)  /* perform I/O synchronously */
  67 #define ARC_NOWAIT      (1 << 2)  /* perform I/O asynchronously */
  68 #define ARC_PREFETCH    (1 << 3)  /* I/O is a prefetch */
  69 #define ARC_CACHED      (1 << 4)  /* I/O was already in cache */
  70 #define ARC_L2CACHE     (1 << 5)  /* cache in L2ARC */
  71 #define ARC_L2COMPRESS  (1 << 6)  /* compress in L2ARC */
  72 
  73 /*
  74  * The following breakdows of arc_size exist for kstat only.
  75  */
  76 typedef enum arc_space_type {
  77         ARC_SPACE_DATA,
  78         ARC_SPACE_HDRS,
  79         ARC_SPACE_L2HDRS,
  80         ARC_SPACE_OTHER,
  81         ARC_SPACE_NUMTYPES
  82 } arc_space_type_t;
  83 
  84 void arc_space_consume(uint64_t space, arc_space_type_t type);
  85 void arc_space_return(uint64_t space, arc_space_type_t type);


  86 arc_buf_t *arc_buf_alloc(spa_t *spa, int size, void *tag,
  87     arc_buf_contents_t type);
  88 arc_buf_t *arc_loan_buf(spa_t *spa, int size);
  89 void arc_return_buf(arc_buf_t *buf, void *tag);
  90 void arc_loan_inuse_buf(arc_buf_t *buf, void *tag);
  91 void arc_buf_add_ref(arc_buf_t *buf, void *tag);
  92 boolean_t arc_buf_remove_ref(arc_buf_t *buf, void *tag);
  93 int arc_buf_size(arc_buf_t *buf);
  94 void arc_release(arc_buf_t *buf, void *tag);
  95 int arc_released(arc_buf_t *buf);
  96 void arc_buf_freeze(arc_buf_t *buf);
  97 void arc_buf_thaw(arc_buf_t *buf);
  98 boolean_t arc_buf_eviction_needed(arc_buf_t *buf);
  99 #ifdef ZFS_DEBUG
 100 int arc_referenced(arc_buf_t *buf);
 101 #endif
 102 
 103 int arc_read(zio_t *pio, spa_t *spa, const blkptr_t *bp,
 104     arc_done_func_t *done, void *private, zio_priority_t priority, int flags,
 105     uint32_t *arc_flags, const zbookmark_phys_t *zb);