FreeBSD ZFS
The Zettabyte File System
Functions | Variables

vdev_root.c File Reference

Virtual device vector for the pool's root vdev. 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_root.c:

Go to the source code of this file.

Functions

static int too_many_errors (vdev_t *vd, int numerrors)
 We should be able to tolerate one failure with absolutely no damage to our metadata.
static int vdev_root_open (vdev_t *vd, uint64_t *asize, uint64_t *max_asize, uint64_t *ashift)
static void vdev_root_close (vdev_t *vd)
static void vdev_root_state_change (vdev_t *vd, int faulted, int degraded)

Variables

vdev_ops_t vdev_root_ops

Detailed Description

Virtual device vector for the pool's root vdev.

Definition in file vdev_root.c.


Function Documentation

static int too_many_errors ( vdev_t vd,
int  numerrors 
) [static]

We should be able to tolerate one failure with absolutely no damage to our metadata.

Two failures will take out space maps, a bunch of indirect block trees, meta dnodes, dnodes, etc. Probably not a happy place to live. When we get smarter, we can liberalize this policy. e.g. If we haven't lost two consecutive top-level vdevs, then we are probably fine. Adding bean counters during alloc/free can make this future guesswork more accurate.

Definition at line 51 of file vdev_root.c.

static void vdev_root_close ( vdev_t vd) [static]

Definition at line 93 of file vdev_root.c.

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

Definition at line 58 of file vdev_root.c.

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

Definition at line 100 of file vdev_root.c.


Variable Documentation

Initial value:
 {
        vdev_root_open,
        vdev_root_close,
        vdev_default_asize,
        NULL,                   
        NULL,                   
        vdev_root_state_change,
        NULL,
        NULL,
        VDEV_TYPE_ROOT,         
        B_FALSE                 
}

Definition at line 112 of file vdev_root.c.

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines