FreeBSD ZFS
The Zettabyte File System
Data Fields

metaslab Struct Reference

Each metaslab's free space is tracked in space map object in the MOS, which is only updated in syncing context. More...

#include <metaslab_impl.h>

Collaboration diagram for metaslab:
Collaboration graph
[legend]

Data Fields

kmutex_t ms_lock
 metaslab lock
space_map_obj_t ms_smo
 synced space map object
space_map_obj_t ms_smo_syncing
 syncing space map object
space_map_t ms_allocmap [TXG_SIZE]
 allocated this txg
space_map_t ms_freemap [TXG_SIZE]
 freed this txg
space_map_t ms_defermap [TXG_DEFER_SIZE]
 deferred frees
space_map_t ms_map
 in-core free space map
int64_t ms_deferspace
 sum of ms_defermap[] space
uint64_t ms_weight
 weight vs.
metaslab_group_tms_group
 metaslab group
avl_node_t ms_group_node
 node in metaslab group tree
txg_node_t ms_txg_node
 per-txg dirty metaslab links

Detailed Description

Each metaslab's free space is tracked in space map object in the MOS, which is only updated in syncing context.

Each time we sync a txg, we append the allocs and frees from that txg to the space map object. When the txg is done syncing, metaslab_sync_done() updates ms_smo to ms_smo_syncing. Everything in ms_smo is always safe to allocate.

Definition at line 72 of file metaslab_impl.h.


Field Documentation

allocated this txg

Definition at line 76 of file metaslab_impl.h.

deferred frees

Definition at line 78 of file metaslab_impl.h.

sum of ms_defermap[] space

Definition at line 80 of file metaslab_impl.h.

freed this txg

Definition at line 77 of file metaslab_impl.h.

metaslab group

Definition at line 82 of file metaslab_impl.h.

node in metaslab group tree

Definition at line 83 of file metaslab_impl.h.

metaslab lock

Definition at line 73 of file metaslab_impl.h.

in-core free space map

Definition at line 79 of file metaslab_impl.h.

synced space map object

Definition at line 74 of file metaslab_impl.h.

syncing space map object

Definition at line 75 of file metaslab_impl.h.

per-txg dirty metaslab links

Definition at line 84 of file metaslab_impl.h.

weight vs.

others in group

Definition at line 81 of file metaslab_impl.h.


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