FreeBSD ZFS
The Zettabyte File System
Defines | Functions | Variables

sys/metaslab.h File Reference

#include <sys/spa.h>
#include <sys/space_map.h>
#include <sys/txg.h>
#include <sys/zio.h>
#include <sys/avl.h>
Include dependency graph for metaslab.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define METASLAB_HINTBP_FAVOR   0x0
#define METASLAB_HINTBP_AVOID   0x1
#define METASLAB_GANG_HEADER   0x2
#define METASLAB_GANG_CHILD   0x4
#define METASLAB_GANG_AVOID   0x8

Functions

metaslab_tmetaslab_init (metaslab_group_t *mg, space_map_obj_t *smo, uint64_t start, uint64_t size, uint64_t txg)
void metaslab_fini (metaslab_t *msp)
void metaslab_sync (metaslab_t *msp, uint64_t txg)
 Write a metaslab to disk in the context of the specified transaction group.
void metaslab_sync_done (metaslab_t *msp, uint64_t txg)
 Called after a transaction group has completely synced to mark all of the metaslab's free space as usable.
void metaslab_sync_reassess (metaslab_group_t *mg)
int metaslab_alloc (spa_t *spa, metaslab_class_t *mc, uint64_t psize, blkptr_t *bp, int ncopies, uint64_t txg, blkptr_t *hintbp, int flags)
void metaslab_free (spa_t *spa, const blkptr_t *bp, uint64_t txg, boolean_t now)
int metaslab_claim (spa_t *spa, const blkptr_t *bp, uint64_t txg)
metaslab_class_tmetaslab_class_create (spa_t *spa, space_map_ops_t *ops)
void metaslab_class_destroy (metaslab_class_t *mc)
int metaslab_class_validate (metaslab_class_t *mc)
void metaslab_class_space_update (metaslab_class_t *mc, int64_t alloc_delta, int64_t defer_delta, int64_t space_delta, int64_t dspace_delta)
uint64_t metaslab_class_get_alloc (metaslab_class_t *mc)
uint64_t metaslab_class_get_space (metaslab_class_t *mc)
uint64_t metaslab_class_get_dspace (metaslab_class_t *mc)
uint64_t metaslab_class_get_deferred (metaslab_class_t *mc)
metaslab_group_tmetaslab_group_create (metaslab_class_t *mc, vdev_t *vd)
void metaslab_group_destroy (metaslab_group_t *mg)
void metaslab_group_activate (metaslab_group_t *mg)
void metaslab_group_passivate (metaslab_group_t *mg)

Variables

space_map_ops_tzfs_metaslab_ops

Define Documentation

#define METASLAB_GANG_AVOID   0x8

Definition at line 52 of file metaslab.h.

#define METASLAB_GANG_CHILD   0x4

Definition at line 51 of file metaslab.h.

#define METASLAB_GANG_HEADER   0x2

Definition at line 50 of file metaslab.h.

#define METASLAB_HINTBP_AVOID   0x1

Definition at line 49 of file metaslab.h.

#define METASLAB_HINTBP_FAVOR   0x0

Definition at line 48 of file metaslab.h.


Function Documentation

int metaslab_alloc ( spa_t spa,
metaslab_class_t mc,
uint64_t  psize,
blkptr_t bp,
int  ncopies,
uint64_t  txg,
blkptr_t hintbp,
int  flags 
)

Definition at line 1575 of file metaslab.c.

int metaslab_claim ( spa_t spa,
const blkptr_t bp,
uint64_t  txg 
)

Definition at line 1636 of file metaslab.c.

metaslab_class_t* metaslab_class_create ( spa_t spa,
space_map_ops_t ops 
)

Definition at line 107 of file metaslab.c.

void metaslab_class_destroy ( metaslab_class_t mc)

Definition at line 121 of file metaslab.c.

uint64_t metaslab_class_get_alloc ( metaslab_class_t mc)

Definition at line 169 of file metaslab.c.

uint64_t metaslab_class_get_deferred ( metaslab_class_t mc)

Definition at line 175 of file metaslab.c.

uint64_t metaslab_class_get_dspace ( metaslab_class_t mc)

Definition at line 187 of file metaslab.c.

uint64_t metaslab_class_get_space ( metaslab_class_t mc)

Definition at line 181 of file metaslab.c.

void metaslab_class_space_update ( metaslab_class_t mc,
int64_t  alloc_delta,
int64_t  defer_delta,
int64_t  space_delta,
int64_t  dspace_delta 
)

Definition at line 159 of file metaslab.c.

int metaslab_class_validate ( metaslab_class_t mc)

Definition at line 133 of file metaslab.c.

void metaslab_fini ( metaslab_t msp)

Definition at line 759 of file metaslab.c.

void metaslab_free ( spa_t spa,
const blkptr_t bp,
uint64_t  txg,
boolean_t  now 
)

Definition at line 1619 of file metaslab.c.

void metaslab_group_activate ( metaslab_group_t mg)

Definition at line 255 of file metaslab.c.

metaslab_group_t* metaslab_group_create ( metaslab_class_t mc,
vdev_t vd 
)

Definition at line 222 of file metaslab.c.

void metaslab_group_destroy ( metaslab_group_t mg)

Definition at line 238 of file metaslab.c.

void metaslab_group_passivate ( metaslab_group_t mg)

Definition at line 286 of file metaslab.c.

metaslab_t* metaslab_init ( metaslab_group_t mg,
space_map_obj_t smo,
uint64_t  start,
uint64_t  size,
uint64_t  txg 
)

Definition at line 711 of file metaslab.c.

void metaslab_sync ( metaslab_t msp,
uint64_t  txg 
)

Write a metaslab to disk in the context of the specified transaction group.

Definition at line 935 of file metaslab.c.

void metaslab_sync_done ( metaslab_t msp,
uint64_t  txg 
)

Called after a transaction group has completely synced to mark all of the metaslab's free space as usable.

Definition at line 1034 of file metaslab.c.

void metaslab_sync_reassess ( metaslab_group_t mg)

Definition at line 1121 of file metaslab.c.


Variable Documentation

Definition at line 703 of file metaslab.c.

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines