This file contains the top half of the zfs directory structure implementation.
More...
Functions |
static void | zap_leaf_pageout (dmu_buf_t *db, void *vl) |
static uint64_t | zap_allocate_blocks (zap_t *zap, int nblocks) |
void | fzap_byteswap (void *vbuf, size_t size) |
void | fzap_upgrade (zap_t *zap, dmu_tx_t *tx, zap_flags_t flags) |
static int | zap_tryupgradedir (zap_t *zap, dmu_tx_t *tx) |
static int | zap_table_grow (zap_t *zap, zap_table_phys_t *tbl, void(*transfer_func)(const uint64_t *src, uint64_t *dst, int n), dmu_tx_t *tx) |
| Generic routines for dealing with the pointer & cookie tables.
|
static int | zap_table_store (zap_t *zap, zap_table_phys_t *tbl, uint64_t idx, uint64_t val, dmu_tx_t *tx) |
static int | zap_table_load (zap_t *zap, zap_table_phys_t *tbl, uint64_t idx, uint64_t *valp) |
static void | zap_ptrtbl_transfer (const uint64_t *src, uint64_t *dst, int n) |
| Routines for growing the ptrtbl.
|
static int | zap_grow_ptrtbl (zap_t *zap, dmu_tx_t *tx) |
static void | zap_increment_num_entries (zap_t *zap, int delta, dmu_tx_t *tx) |
static zap_leaf_t * | zap_create_leaf (zap_t *zap, dmu_tx_t *tx) |
int | fzap_count (zap_t *zap, uint64_t *count) |
void | zap_put_leaf (zap_leaf_t *l) |
static zap_leaf_t * | zap_open_leaf (uint64_t blkid, dmu_buf_t *db) |
static int | zap_get_leaf_byblk (zap_t *zap, uint64_t blkid, dmu_tx_t *tx, krw_t lt, zap_leaf_t **lp) |
static int | zap_idx_to_blk (zap_t *zap, uint64_t idx, uint64_t *valp) |
static int | zap_set_idx_to_blk (zap_t *zap, uint64_t idx, uint64_t blk, dmu_tx_t *tx) |
static int | zap_deref_leaf (zap_t *zap, uint64_t h, dmu_tx_t *tx, krw_t lt, zap_leaf_t **lp) |
static int | zap_expand_leaf (zap_name_t *zn, zap_leaf_t *l, dmu_tx_t *tx, zap_leaf_t **lp) |
static void | zap_put_leaf_maybe_grow_ptrtbl (zap_name_t *zn, zap_leaf_t *l, dmu_tx_t *tx) |
static int | fzap_checkname (zap_name_t *zn) |
static int | fzap_checksize (uint64_t integer_size, uint64_t num_integers) |
static int | fzap_check (zap_name_t *zn, uint64_t integer_size, uint64_t num_integers) |
int | fzap_lookup (zap_name_t *zn, uint64_t integer_size, uint64_t num_integers, void *buf, char *realname, int rn_len, boolean_t *ncp) |
| Routines for manipulating attributes.
|
int | fzap_add_cd (zap_name_t *zn, uint64_t integer_size, uint64_t num_integers, const void *val, uint32_t cd, dmu_tx_t *tx) |
int | fzap_add (zap_name_t *zn, uint64_t integer_size, uint64_t num_integers, const void *val, dmu_tx_t *tx) |
int | fzap_update (zap_name_t *zn, int integer_size, uint64_t num_integers, const void *val, dmu_tx_t *tx) |
int | fzap_length (zap_name_t *zn, uint64_t *integer_size, uint64_t *num_integers) |
int | fzap_remove (zap_name_t *zn, dmu_tx_t *tx) |
void | fzap_prefetch (zap_name_t *zn) |
uint64_t | zap_create_link (objset_t *os, dmu_object_type_t ot, uint64_t parent_obj, const char *name, dmu_tx_t *tx) |
int | zap_value_search (objset_t *os, uint64_t zapobj, uint64_t value, uint64_t mask, char *name) |
| Search for an entry by za_first_integer.
|
int | zap_join (objset_t *os, uint64_t fromobj, uint64_t intoobj, dmu_tx_t *tx) |
| Transfer all the entries from fromobj into intoobj.
|
int | zap_join_key (objset_t *os, uint64_t fromobj, uint64_t intoobj, uint64_t value, dmu_tx_t *tx) |
| Same as zap_join, but add together any duplicated entries.
|
int | zap_join_increment (objset_t *os, uint64_t fromobj, uint64_t intoobj, dmu_tx_t *tx) |
| Same as zap_join, but set the values to 'value'.
|
int | zap_add_int (objset_t *os, uint64_t obj, uint64_t value, dmu_tx_t *tx) |
| Manipulate entries where the name + value are the "same" (the name is a stringified version of the value).
|
int | zap_remove_int (objset_t *os, uint64_t obj, uint64_t value, dmu_tx_t *tx) |
int | zap_lookup_int (objset_t *os, uint64_t obj, uint64_t value) |
int | zap_add_int_key (objset_t *os, uint64_t obj, uint64_t key, uint64_t value, dmu_tx_t *tx) |
| Here the key is an int and the value is a different int.
|
int | zap_update_int_key (objset_t *os, uint64_t obj, uint64_t key, uint64_t value, dmu_tx_t *tx) |
int | zap_lookup_int_key (objset_t *os, uint64_t obj, uint64_t key, uint64_t *valuep) |
int | zap_increment (objset_t *os, uint64_t obj, const char *name, int64_t delta, dmu_tx_t *tx) |
int | zap_increment_int (objset_t *os, uint64_t obj, uint64_t key, int64_t delta, dmu_tx_t *tx) |
int | fzap_cursor_retrieve (zap_t *zap, zap_cursor_t *zc, zap_attribute_t *za) |
static void | zap_stats_ptrtbl (zap_t *zap, uint64_t *tbl, int len, zap_stats_t *zs) |
int | fzap_cursor_move_to_key (zap_cursor_t *zc, zap_name_t *zn) |
void | fzap_get_stats (zap_t *zap, zap_stats_t *zs) |
int | fzap_count_write (zap_name_t *zn, int add, uint64_t *towrite, uint64_t *tooverwrite) |
Variables |
int | fzap_default_block_shift = 14 |
This file contains the top half of the zfs directory structure implementation.
The bottom half is in zap_leaf.c.
The zdir is an extendable hash data structure. There is a table of pointers to buckets (zap_t->zd_data->zd_leafs). The buckets are each a constant size and hold a variable number of directory entries. The buckets (aka "leaf nodes") are implemented in zap_leaf.c.
The pointer table holds a power of 2 number of pointers. (1<<zap_t->zd_data->zd_phys->zd_prefix_len). The bucket pointed to by the pointer at index i in the table holds entries whose hash value has a zd_prefix_len - bit prefix
Definition in file zap.c.