FreeBSD ZFS
The Zettabyte File System
Data Fields

dmu_buf_impl Struct Reference

#include <dbuf.h>

Collaboration diagram for dmu_buf_impl:
Collaboration graph
[legend]

Data Fields

dmu_buf_t db
 the publicly visible structure
struct objsetdb_objset
 the objset we belong to
struct dnode_handledb_dnode_handle
 handle to safely access the dnode we belong to (NULL when evicted)
struct dmu_buf_impldb_parent
 our parent buffer; if the dnode points to us directly, db_parent == db_dnode_handle->dnh_dnode->dn_dbuf only accessed by sync thread ??? (NULL when evicted) May change from NULL to non-NULL under the protection of db_mtx (see dbuf_check_blkptr())
struct dmu_buf_impldb_hash_next
 link for hash table of all dmu_buf_impl_t's
uint64_t db_blkid
 our block number
blkptr_tdb_blkptr
 Pointer to the blkptr_t which points to us.
uint8_t db_level
 Our indirection level.
kmutex_t db_mtx
 db_mtx protects the members below
dbuf_states_t db_state
 Current state of the buffer.
refcount_t db_holds
 Refcount accessed by dmu_buf_{hold,rele}.
arc_buf_tdb_buf
 buffer holding our data
kcondvar_t db_changed
dbuf_dirty_record_tdb_data_pending
dbuf_dirty_record_tdb_last_dirty
 pointer to most recent dirty record for this buffer
list_node_t db_link
 Our link on the owner dnodes's dn_dbufs list.
void * db_user_ptr
 Data which is unique to data (leaf) blocks:
void ** db_user_data_ptr_ptr
dmu_buf_evict_func_tdb_evict_func
uint8_t db_immediate_evict
uint8_t db_freed_in_flight
uint8_t db_dirtycnt

Detailed Description

Definition at line 149 of file dbuf.h.


Field Documentation

the publicly visible structure

Definition at line 156 of file dbuf.h.

our block number

Definition at line 182 of file dbuf.h.

Pointer to the blkptr_t which points to us.

May be NULL if we don't have one yet. (NULL when evicted)

Definition at line 188 of file dbuf.h.

buffer holding our data

Definition at line 214 of file dbuf.h.

Definition at line 216 of file dbuf.h.

Definition at line 217 of file dbuf.h.

Definition at line 238 of file dbuf.h.

handle to safely access the dnode we belong to (NULL when evicted)

Definition at line 164 of file dbuf.h.

Definition at line 233 of file dbuf.h.

Definition at line 236 of file dbuf.h.

link for hash table of all dmu_buf_impl_t's

Definition at line 179 of file dbuf.h.

Refcount accessed by dmu_buf_{hold,rele}.

If nonzero, the buffer can't be destroyed. Protected by db_mtx.

Definition at line 211 of file dbuf.h.

Definition at line 235 of file dbuf.h.

pointer to most recent dirty record for this buffer

Definition at line 220 of file dbuf.h.

Our indirection level.

Data buffers have db_level==0. Indirect buffers which point to data buffers have db_level==1. etc. Buffers which contain dnodes have db_level==0, since the dnodes are stored in a file.

Definition at line 196 of file dbuf.h.

list_node_t dmu_buf_impl::db_link

Our link on the owner dnodes's dn_dbufs list.

Protected by its dn_dbufs_mtx.

Definition at line 226 of file dbuf.h.

db_mtx protects the members below

Definition at line 199 of file dbuf.h.

the objset we belong to

Definition at line 159 of file dbuf.h.

our parent buffer; if the dnode points to us directly, db_parent == db_dnode_handle->dnh_dnode->dn_dbuf only accessed by sync thread ??? (NULL when evicted) May change from NULL to non-NULL under the protection of db_mtx (see dbuf_check_blkptr())

Definition at line 174 of file dbuf.h.

Current state of the buffer.

Definition at line 204 of file dbuf.h.

Definition at line 232 of file dbuf.h.

Data which is unique to data (leaf) blocks:

stuff we store for the user (see dmu_buf_set_user)

Definition at line 231 of file dbuf.h.


The documentation for this struct was generated from the following file:
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines