FreeBSD ZFS
The Zettabyte File System
Data Structures | Functions

bpobj.c File Reference

#include <sys/bpobj.h>
#include <sys/zfs_context.h>
#include <sys/refcount.h>
#include <sys/dsl_pool.h>
#include <sys/zfeature.h>
#include <sys/zap.h>
Include dependency graph for bpobj.c:

Go to the source code of this file.

Data Structures

struct  space_range_arg

Functions

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_decr_empty (objset_t *os, dmu_tx_t *tx)
uint64_t bpobj_alloc (objset_t *os, int blocksize, dmu_tx_t *tx)
void bpobj_free (objset_t *os, uint64_t obj, dmu_tx_t *tx)
int bpobj_open (bpobj_t *bpo, objset_t *os, uint64_t object)
void bpobj_close (bpobj_t *bpo)
static int bpobj_iterate_impl (bpobj_t *bpo, bpobj_itor_t func, void *arg, dmu_tx_t *tx, boolean_t free)
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 *arg, dmu_tx_t *tx)
 Iterate the entries.
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)
static int space_range_cb (void *arg, 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)

Function Documentation

uint64_t bpobj_alloc ( objset_t os,
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.

static int bpobj_iterate_impl ( bpobj_t bpo,
bpobj_itor_t  func,
void *  arg,
dmu_tx_t tx,
boolean_t  free 
) [static]

Definition at line 199 of file bpobj.c.

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 os,
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.

static int space_range_cb ( void *  arg,
const blkptr_t bp,
dmu_tx_t tx 
) [static]

Definition at line 496 of file bpobj.c.

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines