Data Structures |
struct | zvol_extent |
struct | zvol_state |
| The in-core state of each volume. More...
|
struct | maparg |
| extent mapping arg More...
|
Defines |
#define | ZVOL_DUMPSIZE "dumpsize" |
#define | ZVOL_RDONLY 0x1 |
#define | ZVOL_DUMPIFIED 0x2 |
#define | ZVOL_EXCL 0x4 |
#define | ZVOL_WCE 0x8 |
Typedefs |
typedef struct zvol_extent | zvol_extent_t |
typedef struct zvol_state | zvol_state_t |
| The in-core state of each volume.
|
Functions |
| DECLARE_GEOM_CLASS (zfs_zvol_class, zfs_zvol) |
int | zfs_set_prop_nvlist (const char *, zprop_source_t, nvlist_t *, nvlist_t **) |
| This function is best effort.
|
static int | zvol_remove_zv (zvol_state_t *zv) |
| Remove minor node for the specified volume.
|
static int | zvol_get_data (void *arg, lr_write_t *lr, char *buf, zio_t *zio) |
| Get data to generate a TX_WRITE intent log record.
|
static int | zvol_dumpify (zvol_state_t *zv) |
static int | zvol_dump_fini (zvol_state_t *zv) |
static int | zvol_dump_init (zvol_state_t *zv, boolean_t resize) |
static zvol_state_t * | zvol_geom_create (const char *name) |
static void | zvol_geom_run (zvol_state_t *zv) |
static void | zvol_geom_destroy (zvol_state_t *zv) |
static int | zvol_geom_access (struct g_provider *pp, int acr, int acw, int ace) |
static void | zvol_geom_start (struct bio *bp) |
static void | zvol_geom_worker (void *arg) |
static void | zvol_size_changed (zvol_state_t *zv) |
int | zvol_check_volsize (uint64_t volsize, uint64_t blocksize) |
int | zvol_check_volblocksize (uint64_t volblocksize) |
int | zvol_get_stats (objset_t *os, nvlist_t *nv) |
static zvol_state_t * | zvol_minor_lookup (const char *name) |
static int | zvol_map_block (spa_t *spa, zilog_t *zilog, const blkptr_t *bp, arc_buf_t *pbuf, const zbookmark_t *zb, const dnode_phys_t *dnp, void *arg) |
static void | zvol_free_extents (zvol_state_t *zv) |
static int | zvol_get_lbas (zvol_state_t *zv) |
void | zvol_create_cb (objset_t *os, void *arg, cred_t *cr, dmu_tx_t *tx) |
static int | zvol_replay_write (zvol_state_t *zv, lr_write_t *lr, boolean_t byteswap) |
| Replay a TX_WRITE ZIL transaction that didn't get committed after a system failure.
|
static int | zvol_replay_err (zvol_state_t *zv, lr_t *lr, boolean_t byteswap) |
int | zvol_create_minor (const char *name) |
| Create a minor node (plus a whole lot more) for the specified volume.
|
int | zvol_remove_minor (const char *name) |
int | zvol_first_open (zvol_state_t *zv) |
void | zvol_last_close (zvol_state_t *zv) |
int | zvol_update_volsize (objset_t *os, uint64_t volsize) |
void | zvol_remove_minors (const char *name) |
int | zvol_set_volsize (const char *name, major_t maj, uint64_t volsize) |
static int | zvol_open (struct g_provider *pp, int flag, int count) |
static int | zvol_close (struct g_provider *pp, int flag, int count) |
static void | zvol_get_done (zgd_t *zgd, int error) |
static void | zvol_log_write (zvol_state_t *zv, dmu_tx_t *tx, offset_t off, ssize_t resid, boolean_t sync) |
| handles synchronous writes using TX_WRITE ZIL transactions.
|
int | zvol_strategy (struct bio *bp) |
int | zvol_busy (void) |
void | zvol_init (void) |
void | zvol_fini (void) |
boolean_t | dataset_name_hidden (const char *name) |
static int | zvol_create_snapshots (objset_t *os, const char *name) |
int | zvol_create_minors (const char *name) |
static void | zvol_rename_minor (struct g_geom *gp, const char *newname) |
void | zvol_rename_minors (const char *oldname, const char *newname) |
Variables |
struct g_class | zfs_zvol_class |
void * | zfsdev_state |
| The zfsdev_state structure is protected by spa_namespace_lock from being modified while it's being used, e.g.
|
static char * | zvol_tag = "zvol_tag" |
static uint32_t | zvol_minors |
int | zvol_maxphys = DMU_MAX_ACCESS/2 |
| zvol maximum transfer size in one DMU tx.
|
zil_replay_func_t * | zvol_replay_vector [TX_MAX_TYPE] |
| Callback vectors for replaying records.
|
ssize_t | zvol_immediate_write_sz = 32768 |
ZFS volume emulation driver.
Makes a DMU object look like a volume of arbitrary size, up to 2^64 bytes. Volumes are accessed through the symbolic links named:
/dev/zvol/dsk/<pool_name>/<dataset_name> /dev/zvol/rdsk/<pool_name>/<dataset_name>
These links are created by the /dev filesystem (sdev_zvolops.c). Volumes are persistent through reboot. No user command needs to be run before opening and using a device.
FreeBSD notes. On FreeBSD ZVOLs are simply GEOM providers like any other storage device in the system.
Definition in file zvol.c.
int zfs_set_prop_nvlist |
( |
const char * |
dsname, |
|
|
zprop_source_t |
source, |
|
|
nvlist_t * |
nvl, |
|
|
nvlist_t ** |
errlist |
|
) |
| |
This function is best effort.
If it fails to set any of the given properties, it continues to set as many as it can and returns the first error encountered. If the caller provides a non-NULL errlist, it also gives the complete list of names of all the properties it failed to set along with the corresponding error numbers. The caller is responsible for freeing the returned errlist.
If every property is set successfully, zero is returned and the list pointed at by errlist is NULL.
Definition at line 2281 of file zfs_ioctl.c.