FreeBSD ZFS
The Zettabyte File System
Data Structures | Typedefs | Functions | Variables

vdev_mirror.c File Reference

Virtual device vector for mirroring. More...

#include <sys/zfs_context.h>
#include <sys/spa.h>
#include <sys/vdev_impl.h>
#include <sys/zio.h>
#include <sys/fs/zfs.h>
Include dependency graph for vdev_mirror.c:

Go to the source code of this file.

Data Structures

struct  mirror_child
struct  mirror_map

Typedefs

typedef struct mirror_child mirror_child_t
typedef struct mirror_map mirror_map_t

Functions

static void vdev_mirror_map_free (zio_t *zio)
static mirror_map_tvdev_mirror_map_alloc (zio_t *zio)
static int vdev_mirror_open (vdev_t *vd, uint64_t *asize, uint64_t *max_asize, uint64_t *ashift)
static void vdev_mirror_close (vdev_t *vd)
static void vdev_mirror_child_done (zio_t *zio)
static void vdev_mirror_scrub_done (zio_t *zio)
static int vdev_mirror_child_select (zio_t *zio)
 Try to find a child whose DTL doesn't contain the block we want to read.
static int vdev_mirror_io_start (zio_t *zio)
static int vdev_mirror_worst_error (mirror_map_t *mm)
static void vdev_mirror_io_done (zio_t *zio)
static void vdev_mirror_state_change (vdev_t *vd, int faulted, int degraded)

Variables

int vdev_mirror_shift = 21
static const zio_vsd_ops_t vdev_mirror_vsd_ops
vdev_ops_t vdev_mirror_ops
vdev_ops_t vdev_replacing_ops
vdev_ops_t vdev_spare_ops

Detailed Description

Virtual device vector for mirroring.

Definition in file vdev_mirror.c.


Typedef Documentation

typedef struct mirror_child mirror_child_t
typedef struct mirror_map mirror_map_t

Function Documentation

static void vdev_mirror_child_done ( zio_t zio) [static]

Definition at line 178 of file vdev_mirror.c.

static int vdev_mirror_child_select ( zio_t zio) [static]

Try to find a child whose DTL doesn't contain the block we want to read.

If we can't, try the read on any vdev we haven't already tried.

Definition at line 217 of file vdev_mirror.c.

static void vdev_mirror_close ( vdev_t vd) [static]

Definition at line 171 of file vdev_mirror.c.

static void vdev_mirror_io_done ( zio_t zio) [static]

Definition at line 334 of file vdev_mirror.c.

static int vdev_mirror_io_start ( zio_t zio) [static]

Definition at line 265 of file vdev_mirror.c.

static mirror_map_t* vdev_mirror_map_alloc ( zio_t zio) [static]

Definition at line 74 of file vdev_mirror.c.

static void vdev_mirror_map_free ( zio_t zio) [static]

Definition at line 61 of file vdev_mirror.c.

static int vdev_mirror_open ( vdev_t vd,
uint64_t *  asize,
uint64_t *  max_asize,
uint64_t *  ashift 
) [static]

Definition at line 135 of file vdev_mirror.c.

static void vdev_mirror_scrub_done ( zio_t zio) [static]

Definition at line 188 of file vdev_mirror.c.

static void vdev_mirror_state_change ( vdev_t vd,
int  faulted,
int  degraded 
) [static]

Definition at line 447 of file vdev_mirror.c.

static int vdev_mirror_worst_error ( mirror_map_t mm) [static]

Definition at line 320 of file vdev_mirror.c.


Variable Documentation

Initial value:

Definition at line 458 of file vdev_mirror.c.

Definition at line 58 of file vdev_mirror.c.

Initial value:

Definition at line 68 of file vdev_mirror.c.

Initial value:

Definition at line 471 of file vdev_mirror.c.

Initial value:

Definition at line 484 of file vdev_mirror.c.

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines