|
FreeBSD ZFS
The Zettabyte File System
|
Virtual device descriptors. More...
#include <sys/avl.h>#include <sys/dmu.h>#include <sys/metaslab.h>#include <sys/nvpair.h>#include <sys/space_map.h>#include <sys/vdev.h>#include <sys/dkio.h>#include <sys/uberblock_impl.h>#include <sys/metaslab.h>#include <sys/uberblock_impl.h>

Go to the source code of this file.
Data Structures | |
| struct | vdev_ops |
| struct | vdev_cache_entry |
| struct | vdev_cache |
| struct | vdev_queue |
| A virtual device property. More... | |
| struct | vdev |
| Virtual device descriptor. More... | |
| struct | vdev_phys |
| struct | vdev_label |
Defines | |
| #define | VDEV_RAIDZ_MAXPARITY 3 |
| #define | VDEV_PAD_SIZE (8 << 10) |
| #define | VDEV_SKIP_SIZE VDEV_PAD_SIZE * 2 |
| 2 padding areas (vl_pad1 and vl_pad2) to skip | |
| #define | VDEV_PHYS_SIZE (112 << 10) |
| #define | VDEV_UBERBLOCK_RING (128 << 10) |
| #define | VDEV_UBERBLOCK_SHIFT(vd) MAX((vd)->vdev_top->vdev_ashift, UBERBLOCK_SHIFT) |
| #define | VDEV_UBERBLOCK_COUNT(vd) (VDEV_UBERBLOCK_RING >> VDEV_UBERBLOCK_SHIFT(vd)) |
| #define | VDEV_UBERBLOCK_OFFSET(vd, n) offsetof(vdev_label_t, vl_uberblock[(n) << VDEV_UBERBLOCK_SHIFT(vd)]) |
| #define | VDEV_UBERBLOCK_SIZE(vd) (1ULL << VDEV_UBERBLOCK_SHIFT(vd)) |
| #define | VDD_METASLAB 0x01 |
| vdev_dirty() flags | |
| #define | VDD_DTL 0x02 |
| #define | VDEV_BOOT_OFFSET (2 * sizeof (vdev_label_t)) |
| Offset of embedded boot loader region on each label. | |
| #define | VDEV_BOOT_SIZE (7ULL << 19) |
| Size of embedded boot loader region on each label. | |
| #define | VDEV_LABEL_START_SIZE (2 * sizeof (vdev_label_t) + VDEV_BOOT_SIZE) |
| #define | VDEV_LABEL_END_SIZE (2 * sizeof (vdev_label_t)) |
| #define | VDEV_LABELS 4 |
| #define | VDEV_BEST_LABEL VDEV_LABELS |
| #define | VDEV_ALLOC_LOAD 0 |
| #define | VDEV_ALLOC_ADD 1 |
| #define | VDEV_ALLOC_SPARE 2 |
| #define | VDEV_ALLOC_L2CACHE 3 |
| #define | VDEV_ALLOC_ROOTPOOL 4 |
| #define | VDEV_ALLOC_SPLIT 5 |
| #define | VDEV_ALLOC_ATTACH 6 |
Typedefs | |
| typedef struct vdev_queue | vdev_queue_t |
| typedef struct vdev_cache | vdev_cache_t |
| typedef struct vdev_cache_entry | vdev_cache_entry_t |
| typedef struct vdev_ops | vdev_ops_t |
| typedef struct vdev_phys | vdev_phys_t |
| typedef struct vdev_label | vdev_label_t |
VDev Operation types | |
typedefs used only for vdev_ops table | |
| typedef int | vdev_open_func_t (vdev_t *vd, uint64_t *size, uint64_t *max_size, uint64_t *ashift) |
| typedef void | vdev_close_func_t (vdev_t *vd) |
| typedef uint64_t | vdev_asize_func_t (vdev_t *vd, uint64_t psize) |
| typedef int | vdev_io_start_func_t (zio_t *zio) |
| typedef void | vdev_io_done_func_t (zio_t *zio) |
| typedef void | vdev_state_change_func_t (vdev_t *vd, int, int) |
| typedef void | vdev_hold_func_t (vdev_t *vd) |
| typedef void | vdev_rele_func_t (vdev_t *vd) |
Functions | |
| vdev_t * | vdev_alloc_common (spa_t *spa, uint_t id, uint64_t guid, vdev_ops_t *ops) |
| Allocate and minimally initialize a vdev_t. | |
| int | vdev_alloc (spa_t *spa, vdev_t **vdp, nvlist_t *config, vdev_t *parent, uint_t id, int alloctype) |
| Allocate a new vdev. | |
| void | vdev_free (vdev_t *vd) |
| void | vdev_add_child (vdev_t *pvd, vdev_t *cvd) |
| void | vdev_remove_child (vdev_t *pvd, vdev_t *cvd) |
| void | vdev_compact_children (vdev_t *pvd) |
| Remove any holes in the child array. | |
| vdev_t * | vdev_add_parent (vdev_t *cvd, vdev_ops_t *ops) |
| Add a mirror/replacing vdev above an existing vdev. | |
| void | vdev_remove_parent (vdev_t *cvd) |
| Remove a 1-way mirror/replacing vdev from the tree. | |
| void | vdev_load_log_state (vdev_t *nvd, vdev_t *ovd) |
| Load the state from the original vdev tree (ovd) which we've retrieved from the MOS config object. | |
| boolean_t | vdev_log_state_valid (vdev_t *vd) |
| Determine if a log device has valid content. | |
| void | vdev_load (vdev_t *vd) |
| void | vdev_sync (vdev_t *vd, uint64_t txg) |
| void | vdev_sync_done (vdev_t *vd, uint64_t txg) |
| void | vdev_dirty (vdev_t *vd, int flags, void *arg, uint64_t txg) |
| uint64_t | vdev_default_asize (vdev_t *vd, uint64_t psize) |
| Default asize function. | |
| uint64_t | vdev_get_min_asize (vdev_t *vd) |
| Get the minimum allocatable size. | |
| void | vdev_set_min_asize (vdev_t *vd) |
Variables | |
| vdev_ops_t | vdev_root_ops |
| vdev_ops_t | vdev_mirror_ops |
| vdev_ops_t | vdev_replacing_ops |
| vdev_ops_t | vdev_raidz_ops |
| vdev_ops_t | vdev_geom_ops |
| Vector table for the vdev_geom module. | |
| vdev_ops_t | vdev_file_ops |
| vdev_ops_t | vdev_missing_ops |
| vdev_ops_t | vdev_hole_ops |
| vdev_ops_t | vdev_spare_ops |
| int | zfs_vdev_cache_size |
Virtual device descriptors.
All storage pool operations go through the virtual device framework, which provides data replication and I/O scheduling.
Definition in file vdev_impl.h.
| #define VDD_DTL 0x02 |
Definition at line 267 of file vdev_impl.h.
| #define VDD_METASLAB 0x01 |
vdev_dirty() flags
Definition at line 266 of file vdev_impl.h.
| #define VDEV_ALLOC_ADD 1 |
Definition at line 286 of file vdev_impl.h.
| #define VDEV_ALLOC_ATTACH 6 |
Definition at line 291 of file vdev_impl.h.
| #define VDEV_ALLOC_L2CACHE 3 |
Definition at line 288 of file vdev_impl.h.
| #define VDEV_ALLOC_LOAD 0 |
Definition at line 285 of file vdev_impl.h.
| #define VDEV_ALLOC_ROOTPOOL 4 |
Definition at line 289 of file vdev_impl.h.
| #define VDEV_ALLOC_SPARE 2 |
Definition at line 287 of file vdev_impl.h.
| #define VDEV_ALLOC_SPLIT 5 |
Definition at line 290 of file vdev_impl.h.
| #define VDEV_BEST_LABEL VDEV_LABELS |
Definition at line 283 of file vdev_impl.h.
| #define VDEV_BOOT_OFFSET (2 * sizeof (vdev_label_t)) |
Offset of embedded boot loader region on each label.
Definition at line 270 of file vdev_impl.h.
| #define VDEV_BOOT_SIZE (7ULL << 19) |
Size of embedded boot loader region on each label.
The total size of the first two labels plus the boot area is 4MB.
Definition at line 275 of file vdev_impl.h.
| #define VDEV_LABEL_END_SIZE (2 * sizeof (vdev_label_t)) |
Definition at line 281 of file vdev_impl.h.
| #define VDEV_LABEL_START_SIZE (2 * sizeof (vdev_label_t) + VDEV_BOOT_SIZE) |
Definition at line 280 of file vdev_impl.h.
| #define VDEV_LABELS 4 |
Definition at line 282 of file vdev_impl.h.
| #define VDEV_PAD_SIZE (8 << 10) |
Definition at line 236 of file vdev_impl.h.
| #define VDEV_PHYS_SIZE (112 << 10) |
Definition at line 239 of file vdev_impl.h.
| #define VDEV_RAIDZ_MAXPARITY 3 |
Definition at line 234 of file vdev_impl.h.
| #define VDEV_SKIP_SIZE VDEV_PAD_SIZE * 2 |
2 padding areas (vl_pad1 and vl_pad2) to skip
Definition at line 238 of file vdev_impl.h.
| #define VDEV_UBERBLOCK_COUNT | ( | vd | ) | (VDEV_UBERBLOCK_RING >> VDEV_UBERBLOCK_SHIFT(vd)) |
Definition at line 244 of file vdev_impl.h.
| #define VDEV_UBERBLOCK_OFFSET | ( | vd, | |
| n | |||
| ) | offsetof(vdev_label_t, vl_uberblock[(n) << VDEV_UBERBLOCK_SHIFT(vd)]) |
Definition at line 246 of file vdev_impl.h.
| #define VDEV_UBERBLOCK_RING (128 << 10) |
Definition at line 240 of file vdev_impl.h.
| #define VDEV_UBERBLOCK_SHIFT | ( | vd | ) | MAX((vd)->vdev_top->vdev_ashift, UBERBLOCK_SHIFT) |
Definition at line 242 of file vdev_impl.h.
| #define VDEV_UBERBLOCK_SIZE | ( | vd | ) | (1ULL << VDEV_UBERBLOCK_SHIFT(vd)) |
Definition at line 248 of file vdev_impl.h.
| typedef uint64_t vdev_asize_func_t(vdev_t *vd, uint64_t psize) |
Definition at line 65 of file vdev_impl.h.
| typedef struct vdev_cache_entry vdev_cache_entry_t |
Definition at line 55 of file vdev_impl.h.
| typedef struct vdev_cache vdev_cache_t |
Definition at line 54 of file vdev_impl.h.
| typedef void vdev_close_func_t(vdev_t *vd) |
Definition at line 64 of file vdev_impl.h.
| typedef void vdev_hold_func_t(vdev_t *vd) |
Definition at line 69 of file vdev_impl.h.
| typedef void vdev_io_done_func_t(zio_t *zio) |
Definition at line 67 of file vdev_impl.h.
| typedef int vdev_io_start_func_t(zio_t *zio) |
Definition at line 66 of file vdev_impl.h.
| typedef struct vdev_label vdev_label_t |
| typedef int vdev_open_func_t(vdev_t *vd, uint64_t *size, uint64_t *max_size, uint64_t *ashift) |
Definition at line 62 of file vdev_impl.h.
| typedef struct vdev_ops vdev_ops_t |
| typedef struct vdev_phys vdev_phys_t |
| typedef struct vdev_queue vdev_queue_t |
Definition at line 53 of file vdev_impl.h.
| typedef void vdev_rele_func_t(vdev_t *vd) |
Definition at line 70 of file vdev_impl.h.
| typedef void vdev_state_change_func_t(vdev_t *vd, int, int) |
Definition at line 68 of file vdev_impl.h.
| vdev_t* vdev_add_parent | ( | vdev_t * | cvd, |
| vdev_ops_t * | ops | ||
| ) |
| vdev_t* vdev_alloc_common | ( | spa_t * | spa, |
| uint_t | id, | ||
| uint64_t | guid, | ||
| vdev_ops_t * | ops | ||
| ) |
| void vdev_compact_children | ( | vdev_t * | pvd | ) |
| uint64_t vdev_default_asize | ( | vdev_t * | vd, |
| uint64_t | psize | ||
| ) |
| void vdev_dirty | ( | vdev_t * | vd, |
| int | flags, | ||
| void * | arg, | ||
| uint64_t | txg | ||
| ) |
| uint64_t vdev_get_min_asize | ( | vdev_t * | vd | ) |
| boolean_t vdev_log_state_valid | ( | vdev_t * | vd | ) |
| void vdev_remove_parent | ( | vdev_t * | cvd | ) |
Definition at line 200 of file vdev_file.c.
Vector table for the vdev_geom module.
This is the only entry point for vdev_geom
Definition at line 923 of file vdev_geom.c.
Definition at line 98 of file vdev_missing.c.
Definition at line 458 of file vdev_mirror.c.
Definition at line 85 of file vdev_missing.c.
Definition at line 2224 of file vdev_raidz.c.
Definition at line 471 of file vdev_mirror.c.
Definition at line 112 of file vdev_root.c.
Definition at line 484 of file vdev_mirror.c.
1.7.3