FreeBSD ZFS
The Zettabyte File System
Data Structures | Defines | Typedefs | Functions

sys/bpobj.h File Reference

#include <sys/dmu.h>
#include <sys/spa.h>
#include <sys/txg.h>
#include <sys/zio.h>
#include <sys/zfs_context.h>
Include dependency graph for bpobj.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  bpobj_phys
struct  bpobj

Defines

#define BPOBJ_SIZE_V0   (2 * sizeof (uint64_t))
#define BPOBJ_SIZE_V1   (4 * sizeof (uint64_t))

Typedefs

typedef struct bpobj_phys bpobj_phys_t
typedef struct bpobj bpobj_t
typedef int bpobj_itor_t (void *arg, const blkptr_t *bp, dmu_tx_t *tx)

Functions

uint64_t bpobj_alloc (objset_t *mos, int blocksize, dmu_tx_t *tx)
uint64_t bpobj_alloc_empty (objset_t *os, int blocksize, dmu_tx_t *tx)
 Return an empty bpobj, preferably the empty dummy one (dp_empty_bpobj).
void bpobj_free (objset_t *os, uint64_t obj, dmu_tx_t *tx)
void bpobj_decr_empty (objset_t *os, dmu_tx_t *tx)
int bpobj_open (bpobj_t *bpo, objset_t *mos, uint64_t object)
void bpobj_close (bpobj_t *bpo)
int bpobj_iterate (bpobj_t *bpo, bpobj_itor_t func, void *arg, dmu_tx_t *tx)
 Iterate and remove the entries.
int bpobj_iterate_nofree (bpobj_t *bpo, bpobj_itor_t func, void *, dmu_tx_t *)
 Iterate the entries.
int bpobj_iterate_dbg (bpobj_t *bpo, uint64_t *itorp, blkptr_t *bp)
void bpobj_enqueue_subobj (bpobj_t *bpo, uint64_t subobj, dmu_tx_t *tx)
void bpobj_enqueue (bpobj_t *bpo, const blkptr_t *bp, dmu_tx_t *tx)
int bpobj_space (bpobj_t *bpo, uint64_t *usedp, uint64_t *compp, uint64_t *uncompp)
int bpobj_space_range (bpobj_t *bpo, uint64_t mintxg, uint64_t maxtxg, uint64_t *usedp, uint64_t *compp, uint64_t *uncompp)

Define Documentation

#define BPOBJ_SIZE_V0   (2 * sizeof (uint64_t))

Definition at line 53 of file bpobj.h.

#define BPOBJ_SIZE_V1   (4 * sizeof (uint64_t))

Definition at line 54 of file bpobj.h.


Typedef Documentation

typedef int bpobj_itor_t(void *arg, const blkptr_t *bp, dmu_tx_t *tx)

Definition at line 68 of file bpobj.h.

typedef struct bpobj_phys bpobj_phys_t
typedef struct bpobj bpobj_t

Function Documentation

uint64_t bpobj_alloc ( objset_t mos,
int  blocksize,
dmu_tx_t tx 
)

Definition at line 80 of file bpobj.c.

uint64_t bpobj_alloc_empty ( objset_t os,
int  blocksize,
dmu_tx_t tx 
)

Return an empty bpobj, preferably the empty dummy one (dp_empty_bpobj).

Definition at line 37 of file bpobj.c.

void bpobj_close ( bpobj_t bpo)

Definition at line 181 of file bpobj.c.

void bpobj_decr_empty ( objset_t os,
dmu_tx_t tx 
)

Definition at line 63 of file bpobj.c.

void bpobj_enqueue ( bpobj_t bpo,
const blkptr_t bp,
dmu_tx_t tx 
)

Definition at line 438 of file bpobj.c.

void bpobj_enqueue_subobj ( bpobj_t bpo,
uint64_t  subobj,
dmu_tx_t tx 
)

Definition at line 365 of file bpobj.c.

void bpobj_free ( objset_t os,
uint64_t  obj,
dmu_tx_t tx 
)

Definition at line 96 of file bpobj.c.

int bpobj_iterate ( bpobj_t bpo,
bpobj_itor_t  func,
void *  arg,
dmu_tx_t tx 
)

Iterate and remove the entries.

If func returns nonzero, iteration will stop and that entry will not be removed.

Definition at line 350 of file bpobj.c.

int bpobj_iterate_dbg ( bpobj_t bpo,
uint64_t *  itorp,
blkptr_t bp 
)
int bpobj_iterate_nofree ( bpobj_t bpo,
bpobj_itor_t  func,
void *  arg,
dmu_tx_t tx 
)

Iterate the entries.

If func returns nonzero, iteration will stop.

Definition at line 359 of file bpobj.c.

int bpobj_open ( bpobj_t bpo,
objset_t mos,
uint64_t  object 
)

Definition at line 149 of file bpobj.c.

int bpobj_space ( bpobj_t bpo,
uint64_t *  usedp,
uint64_t *  compp,
uint64_t *  uncompp 
)

Definition at line 512 of file bpobj.c.

int bpobj_space_range ( bpobj_t bpo,
uint64_t  mintxg,
uint64_t  maxtxg,
uint64_t *  usedp,
uint64_t *  compp,
uint64_t *  uncompp 
)

Definition at line 534 of file bpobj.c.

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines