Changeset View
Changeset View
Standalone View
Standalone View
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h
Show First 20 Lines • Show All 65 Lines • ▼ Show 20 Lines | |||||
*/ | */ | ||||
typedef int vdev_open_func_t(vdev_t *vd, uint64_t *size, uint64_t *max_size, | typedef int vdev_open_func_t(vdev_t *vd, uint64_t *size, uint64_t *max_size, | ||||
uint64_t *logical_ashift, uint64_t *physical_ashift); | uint64_t *logical_ashift, uint64_t *physical_ashift); | ||||
typedef void vdev_close_func_t(vdev_t *vd); | typedef void vdev_close_func_t(vdev_t *vd); | ||||
typedef uint64_t vdev_asize_func_t(vdev_t *vd, uint64_t psize); | typedef uint64_t vdev_asize_func_t(vdev_t *vd, uint64_t psize); | ||||
typedef void vdev_io_start_func_t(zio_t *zio); | typedef void vdev_io_start_func_t(zio_t *zio); | ||||
typedef void vdev_io_done_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_state_change_func_t(vdev_t *vd, int, int); | ||||
typedef boolean_t vdev_need_resilver_func_t(vdev_t *vd, uint64_t, size_t); | |||||
typedef void vdev_hold_func_t(vdev_t *vd); | typedef void vdev_hold_func_t(vdev_t *vd); | ||||
typedef void vdev_rele_func_t(vdev_t *vd); | typedef void vdev_rele_func_t(vdev_t *vd); | ||||
typedef void vdev_remap_cb_t(uint64_t inner_offset, vdev_t *vd, | typedef void vdev_remap_cb_t(uint64_t inner_offset, vdev_t *vd, | ||||
uint64_t offset, uint64_t size, void *arg); | uint64_t offset, uint64_t size, void *arg); | ||||
typedef void vdev_remap_func_t(vdev_t *vd, uint64_t offset, uint64_t size, | typedef void vdev_remap_func_t(vdev_t *vd, uint64_t offset, uint64_t size, | ||||
vdev_remap_cb_t callback, void *arg); | vdev_remap_cb_t callback, void *arg); | ||||
typedef struct vdev_ops { | typedef struct vdev_ops { | ||||
vdev_open_func_t *vdev_op_open; | vdev_open_func_t *vdev_op_open; | ||||
vdev_close_func_t *vdev_op_close; | vdev_close_func_t *vdev_op_close; | ||||
vdev_asize_func_t *vdev_op_asize; | vdev_asize_func_t *vdev_op_asize; | ||||
vdev_io_start_func_t *vdev_op_io_start; | vdev_io_start_func_t *vdev_op_io_start; | ||||
vdev_io_done_func_t *vdev_op_io_done; | vdev_io_done_func_t *vdev_op_io_done; | ||||
vdev_state_change_func_t *vdev_op_state_change; | vdev_state_change_func_t *vdev_op_state_change; | ||||
vdev_need_resilver_func_t *vdev_op_need_resilver; | |||||
vdev_hold_func_t *vdev_op_hold; | vdev_hold_func_t *vdev_op_hold; | ||||
vdev_rele_func_t *vdev_op_rele; | vdev_rele_func_t *vdev_op_rele; | ||||
vdev_remap_func_t *vdev_op_remap; | vdev_remap_func_t *vdev_op_remap; | ||||
char vdev_op_type[16]; | char vdev_op_type[16]; | ||||
boolean_t vdev_op_leaf; | boolean_t vdev_op_leaf; | ||||
} vdev_ops_t; | } vdev_ops_t; | ||||
/* | /* | ||||
▲ Show 20 Lines • Show All 191 Lines • ▼ Show 20 Lines | struct vdev { | ||||
* The queue depth parameters determine how many async writes are | * The queue depth parameters determine how many async writes are | ||||
* still pending (i.e. allocated by net yet issued to disk) per | * still pending (i.e. allocated by net yet issued to disk) per | ||||
* top-level (vdev_async_write_queue_depth) and the maximum allowed | * top-level (vdev_async_write_queue_depth) and the maximum allowed | ||||
* (vdev_max_async_write_queue_depth). These values only apply to | * (vdev_max_async_write_queue_depth). These values only apply to | ||||
* top-level vdevs. | * top-level vdevs. | ||||
*/ | */ | ||||
uint64_t vdev_async_write_queue_depth; | uint64_t vdev_async_write_queue_depth; | ||||
uint64_t vdev_max_async_write_queue_depth; | uint64_t vdev_max_async_write_queue_depth; | ||||
/* | |||||
* Protects the vdev_scan_io_queue field itself as well as the | |||||
* structure's contents (when present). | |||||
*/ | |||||
kmutex_t vdev_scan_io_queue_lock; | |||||
struct dsl_scan_io_queue *vdev_scan_io_queue; | |||||
/* | /* | ||||
* Leaf vdev state. | * Leaf vdev state. | ||||
*/ | */ | ||||
range_tree_t *vdev_dtl[DTL_TYPES]; /* dirty time logs */ | range_tree_t *vdev_dtl[DTL_TYPES]; /* dirty time logs */ | ||||
space_map_t *vdev_dtl_sm; /* dirty time log space map */ | space_map_t *vdev_dtl_sm; /* dirty time log space map */ | ||||
txg_node_t vdev_dtl_node; /* per-txg dirty DTL linkage */ | txg_node_t vdev_dtl_node; /* per-txg dirty DTL linkage */ | ||||
uint64_t vdev_dtl_object; /* DTL object */ | uint64_t vdev_dtl_object; /* DTL object */ | ||||
▲ Show 20 Lines • Show All 201 Lines • Show Last 20 Lines |