FreeBSD ZFS
The Zettabyte File System
Data Structures | Typedefs | Enumerations | Functions | Variables

sys/dmu_zfetch.h File Reference

#include <sys/zfs_context.h>
Include dependency graph for dmu_zfetch.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  zstream
struct  zfetch

Typedefs

typedef enum zfetch_dirn zfetch_dirn_t
 so we can reference dnode
typedef struct zstream zstream_t
typedef struct zfetch zfetch_t

Enumerations

enum  zfetch_dirn { ZFETCH_FORWARD = 1, ZFETCH_BACKWARD = -1 }
 

so we can reference dnode

More...

Functions

void zfetch_init (void)
void zfetch_fini (void)
void dmu_zfetch_init (zfetch_t *, struct dnode *)
 Sets up a zfetch data based on an associated dnode.
void dmu_zfetch_rele (zfetch_t *)
 Clean-up state associated with a zfetch structure.
void dmu_zfetch (zfetch_t *, uint64_t, uint64_t, int)
 This is the prefetch entry point.

Variables

uint64_t zfetch_array_rd_sz
 number of bytes in a array_read at which we stop prefetching (1Mb)

Typedef Documentation

typedef enum zfetch_dirn zfetch_dirn_t

so we can reference dnode

typedef struct zfetch zfetch_t
typedef struct zstream zstream_t

Enumeration Type Documentation

so we can reference dnode

Enumerator:
ZFETCH_FORWARD 

prefetch increasing block numbers

ZFETCH_BACKWARD 

prefetch decreasing block numbers

Definition at line 39 of file dmu_zfetch.h.


Function Documentation

void dmu_zfetch ( zfetch_t zf,
uint64_t  offset,
uint64_t  size,
int  prefetched 
)

This is the prefetch entry point.

It calls all of the other dmu_zfetch routines to create, delete, find, or operate upon prefetch streams.

Definition at line 675 of file dmu_zfetch.c.

void dmu_zfetch_init ( zfetch_t zf,
dnode_t dno 
)

Sets up a zfetch data based on an associated dnode.

This takes a pointer to a zfetch structure and a dnode. It performs the necessary setup for the zfetch structure, grokking data from the associated dnode.

Definition at line 286 of file dmu_zfetch.c.

void dmu_zfetch_rele ( zfetch_t zf)

Clean-up state associated with a zfetch structure.

This frees allocated structure members, empties the zf_stream tree, and generally makes things nice. This doesn't free the zfetch_t itself, that's left to the caller.

Definition at line 552 of file dmu_zfetch.c.

void zfetch_fini ( void  )

Definition at line 270 of file dmu_zfetch.c.

void zfetch_init ( void  )

Definition at line 256 of file dmu_zfetch.c.

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines