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

dmu_traverse.c File Reference

#include <sys/zfs_context.h>
#include <sys/dmu_objset.h>
#include <sys/dmu_traverse.h>
#include <sys/dsl_dataset.h>
#include <sys/dsl_dir.h>
#include <sys/dsl_pool.h>
#include <sys/dnode.h>
#include <sys/spa.h>
#include <sys/zio.h>
#include <sys/dmu_impl.h>
#include <sys/sa.h>
#include <sys/sa_impl.h>
#include <sys/callb.h>
Include dependency graph for dmu_traverse.c:

Go to the source code of this file.

Data Structures

struct  prefetch_data
struct  traverse_data

Typedefs

typedef struct prefetch_data prefetch_data_t
typedef struct traverse_data traverse_data_t
typedef enum resume_skip resume_skip_t

Enumerations

enum  resume_skip { RESUME_SKIP_ALL, RESUME_SKIP_NONE, RESUME_SKIP_CHILDREN }

Functions

static int traverse_dnode (traverse_data_t *td, const dnode_phys_t *dnp, arc_buf_t *buf, uint64_t objset, uint64_t object)
static void prefetch_dnode_metadata (traverse_data_t *td, const dnode_phys_t *, arc_buf_t *buf, uint64_t objset, uint64_t object)
static int traverse_zil_block (zilog_t *zilog, blkptr_t *bp, void *arg, uint64_t claim_txg)
static int traverse_zil_record (zilog_t *zilog, lr_t *lrc, void *arg, uint64_t claim_txg)
static void traverse_zil (traverse_data_t *td, zil_header_t *zh)
static resume_skip_t resume_skip_check (traverse_data_t *td, const dnode_phys_t *dnp, const zbookmark_t *zb)
static void traverse_pause (traverse_data_t *td, const zbookmark_t *zb)
static void traverse_prefetch_metadata (traverse_data_t *td, arc_buf_t *pbuf, const blkptr_t *bp, const zbookmark_t *zb)
static int traverse_visitbp (traverse_data_t *td, const dnode_phys_t *dnp, arc_buf_t *pbuf, const blkptr_t *bp, const zbookmark_t *zb)
static int traverse_prefetcher (spa_t *spa, zilog_t *zilog, const blkptr_t *bp, arc_buf_t *pbuf, const zbookmark_t *zb, const dnode_phys_t *dnp, void *arg)
static void traverse_prefetch_thread (void *arg)
static int traverse_impl (spa_t *spa, dsl_dataset_t *ds, uint64_t objset, blkptr_t *rootbp, uint64_t txg_start, zbookmark_t *resume, int flags, blkptr_cb_t func, void *arg)
 NB: dataset must not be changing on-disk (eg, is a snapshot or we are in syncing context).
int traverse_dataset (dsl_dataset_t *ds, uint64_t txg_start, int flags, blkptr_cb_t func, void *arg)
 NB: dataset must not be changing on-disk (eg, is a snapshot or we are in syncing context).
int traverse_dataset_destroyed (spa_t *spa, blkptr_t *blkptr, uint64_t txg_start, zbookmark_t *resume, int flags, blkptr_cb_t func, void *arg)
int traverse_pool (spa_t *spa, uint64_t txg_start, int flags, blkptr_cb_t func, void *arg)
 NB: pool must not be changing on-disk (eg, from zdb or sync context).

Variables

int zfs_pd_blks_max = 100

Typedef Documentation

typedef enum resume_skip resume_skip_t

Enumeration Type Documentation

Enumerator:
RESUME_SKIP_ALL 
RESUME_SKIP_NONE 
RESUME_SKIP_CHILDREN 

Definition at line 135 of file dmu_traverse.c.


Function Documentation

static void prefetch_dnode_metadata ( traverse_data_t td,
const dnode_phys_t dnp,
arc_buf_t buf,
uint64_t  objset,
uint64_t  object 
) [static]

Definition at line 389 of file dmu_traverse.c.

static resume_skip_t resume_skip_check ( traverse_data_t td,
const dnode_phys_t dnp,
const zbookmark_t zb 
) [static]
Return values:
RESUME_SKIP_ALLtd indicates that we are resuming a traversal and the block indicated by zb does not need to be visited at all.
RESUME_SKIP_CHILDRENWe are resuming a post traversal and we reach the resume point. This indicates that this block should be visited but not its children (since they must have been visited in a previous traversal).
RESUME_SKIP_NONENo skipping required.

Definition at line 153 of file dmu_traverse.c.

int traverse_dataset ( dsl_dataset_t ds,
uint64_t  txg_start,
int  flags,
blkptr_cb_t  func,
void *  arg 
)

NB: dataset must not be changing on-disk (eg, is a snapshot or we are in syncing context).

Definition at line 566 of file dmu_traverse.c.

int traverse_dataset_destroyed ( spa_t spa,
blkptr_t blkptr,
uint64_t  txg_start,
zbookmark_t resume,
int  flags,
blkptr_cb_t  func,
void *  arg 
)

Definition at line 574 of file dmu_traverse.c.

static int traverse_dnode ( traverse_data_t td,
const dnode_phys_t dnp,
arc_buf_t buf,
uint64_t  objset,
uint64_t  object 
) [static]

Definition at line 407 of file dmu_traverse.c.

static int traverse_impl ( spa_t spa,
dsl_dataset_t ds,
uint64_t  objset,
blkptr_t rootbp,
uint64_t  txg_start,
zbookmark_t resume,
int  flags,
blkptr_cb_t  func,
void *  arg 
) [static]

NB: dataset must not be changing on-disk (eg, is a snapshot or we are in syncing context).

Definition at line 495 of file dmu_traverse.c.

static void traverse_pause ( traverse_data_t td,
const zbookmark_t zb 
) [static]

Definition at line 179 of file dmu_traverse.c.

int traverse_pool ( spa_t spa,
uint64_t  txg_start,
int  flags,
blkptr_cb_t  func,
void *  arg 
)

NB: pool must not be changing on-disk (eg, from zdb or sync context).

Definition at line 586 of file dmu_traverse.c.

static void traverse_prefetch_metadata ( traverse_data_t td,
arc_buf_t pbuf,
const blkptr_t bp,
const zbookmark_t zb 
) [static]

Definition at line 187 of file dmu_traverse.c.

static void traverse_prefetch_thread ( void *  arg) [static]

Definition at line 470 of file dmu_traverse.c.

static int traverse_prefetcher ( spa_t spa,
zilog_t zilog,
const blkptr_t bp,
arc_buf_t pbuf,
const zbookmark_t zb,
const dnode_phys_t dnp,
void *  arg 
) [static]

Definition at line 438 of file dmu_traverse.c.

static int traverse_visitbp ( traverse_data_t td,
const dnode_phys_t dnp,
arc_buf_t pbuf,
const blkptr_t bp,
const zbookmark_t zb 
) [static]

Definition at line 212 of file dmu_traverse.c.

static void traverse_zil ( traverse_data_t td,
zil_header_t zh 
) [static]

Definition at line 115 of file dmu_traverse.c.

static int traverse_zil_block ( zilog_t zilog,
blkptr_t bp,
void *  arg,
uint64_t  claim_txg 
) [static]

Definition at line 70 of file dmu_traverse.c.

static int traverse_zil_record ( zilog_t zilog,
lr_t lrc,
void *  arg,
uint64_t  claim_txg 
) [static]

Definition at line 90 of file dmu_traverse.c.


Variable Documentation

int zfs_pd_blks_max = 100

Definition at line 40 of file dmu_traverse.c.

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines