Data Structures |
struct | arc_buf |
Defines |
#define | ARC_WAIT (1 << 1) |
| perform I/O synchronously
|
#define | ARC_NOWAIT (1 << 2) |
| perform I/O asynchronously
|
#define | ARC_PREFETCH (1 << 3) |
| I/O is a prefetch.
|
#define | ARC_CACHED (1 << 4) |
| I/O was already in cache.
|
#define | ARC_L2CACHE (1 << 5) |
| cache in L2ARC
|
Typedefs |
typedef struct arc_buf_hdr | arc_buf_hdr_t |
typedef struct arc_buf | arc_buf_t |
typedef void | arc_done_func_t (zio_t *zio, arc_buf_t *buf, void *priv) |
typedef int | arc_evict_func_t (void *priv) |
typedef enum arc_buf_contents | arc_buf_contents_t |
typedef enum arc_space_type | arc_space_type_t |
| The following breakdows of arc_size exist for kstat only.
|
Enumerations |
enum | arc_buf_contents { ARC_BUFC_DATA,
ARC_BUFC_METADATA,
ARC_BUFC_NUMTYPES
} |
enum | arc_space_type {
ARC_SPACE_DATA,
ARC_SPACE_HDRS,
ARC_SPACE_L2HDRS,
ARC_SPACE_OTHER,
ARC_SPACE_NUMTYPES
} |
| The following breakdows of arc_size exist for kstat only.
More...
|
Functions |
void | arc_space_consume (uint64_t space, arc_space_type_t type) |
void | arc_space_return (uint64_t space, arc_space_type_t type) |
void * | arc_data_buf_alloc (uint64_t space) |
void | arc_data_buf_free (void *buf, uint64_t space) |
arc_buf_t * | arc_buf_alloc (spa_t *spa, int size, void *tag, arc_buf_contents_t type) |
arc_buf_t * | arc_loan_buf (spa_t *spa, int size) |
| Loan out an anonymous arc buffer.
|
void | arc_return_buf (arc_buf_t *buf, void *tag) |
| Return a loaned arc buffer to the arc.
|
void | arc_loan_inuse_buf (arc_buf_t *buf, void *tag) |
| Detach an arc_buf from a dbuf (tag)
|
void | arc_buf_add_ref (arc_buf_t *buf, void *tag) |
int | arc_buf_remove_ref (arc_buf_t *buf, void *tag) |
int | arc_buf_size (arc_buf_t *buf) |
void | arc_release (arc_buf_t *buf, void *tag) |
| Release this buffer from the cache.
|
int | arc_release_bp (arc_buf_t *buf, void *tag, blkptr_t *bp, spa_t *spa, zbookmark_t *zb) |
| Release this buffer.
|
int | arc_released (arc_buf_t *buf) |
int | arc_has_callback (arc_buf_t *buf) |
void | arc_buf_freeze (arc_buf_t *buf) |
void | arc_buf_thaw (arc_buf_t *buf) |
boolean_t | arc_buf_eviction_needed (arc_buf_t *buf) |
| Called from the DMU to determine if the current buffer should be evicted.
|
int | arc_read (zio_t *pio, spa_t *spa, const blkptr_t *bp, arc_buf_t *pbuf, arc_done_func_t *done, void *priv, int priority, int zio_flags, uint32_t *arc_flags, const zbookmark_t *zb) |
| "Read" the block block at the specified DVA (in bp) via the cache.
|
int | arc_read_nolock (zio_t *pio, spa_t *spa, const blkptr_t *bp, arc_done_func_t *done, void *priv, int priority, int flags, uint32_t *arc_flags, const zbookmark_t *zb) |
zio_t * | arc_write (zio_t *pio, spa_t *spa, uint64_t txg, blkptr_t *bp, arc_buf_t *buf, boolean_t l2arc, const zio_prop_t *zp, arc_done_func_t *ready, arc_done_func_t *done, void *priv, int priority, int zio_flags, const zbookmark_t *zb) |
void | arc_set_callback (arc_buf_t *buf, arc_evict_func_t *func, void *priv) |
int | arc_buf_evict (arc_buf_t *buf) |
| This is used by the DMU to let the ARC know that a buffer is being evicted, so the ARC should clean up.
|
void | arc_flush (spa_t *spa) |
| Flush all *evictable* data from the cache for the given spa.
|
void | arc_tempreserve_clear (uint64_t reserve) |
int | arc_tempreserve_space (uint64_t reserve, uint64_t txg) |
void | arc_init (void) |
void | arc_fini (void) |
void | l2arc_add_vdev (spa_t *spa, vdev_t *vd) |
| Add a vdev for use by the L2ARC.
|
void | l2arc_remove_vdev (vdev_t *vd) |
| Remove a vdev from the L2ARC.
|
boolean_t | l2arc_vdev_present (vdev_t *vd) |
void | l2arc_init (void) |
void | l2arc_fini (void) |
void | l2arc_start (void) |
void | l2arc_stop (void) |
Variables |
arc_done_func_t | arc_bcopy_func |
arc_done_func_t | arc_getbuf_func |
"Read" the block block at the specified DVA (in bp) via the cache.
If the block is found in the cache, invoke the provided callback immediately and return. Note that the `zio' parameter in the callback will be NULL in this case, since no IO was required. If the block is not in the cache pass the read request on to the spa with a substitute callback function, so that the requested block will be added to the cache.
If a read request arrives for a block that has a read in-progress, either wait for the in-progress read to complete (and return the results); or, if this is a read with a "done" func, add a record to the read to invoke the "done" func when the read completes, and return; or just return.
arc_read_done() will invoke all the requested "done" functions for readers of this block.
Normal callers should use arc_read and pass the arc buffer and offset for the bp. But if you know you don't need locking, you can use arc_read_nolock.
Definition at line 3076 of file arc.c.