Align vdev_ops_t from illumos for better compatibility.
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Igor Kozhukhov <igor@dilos.org>
Closes #8925
}
vdev_ops_t vdev_disk_ops = {
- vdev_disk_open,
- vdev_disk_close,
- vdev_default_asize,
- vdev_disk_io_start,
- vdev_disk_io_done,
- NULL,
- NULL,
- vdev_disk_hold,
- vdev_disk_rele,
- NULL,
- vdev_default_xlate,
- VDEV_TYPE_DISK, /* name of this vdev type */
- B_TRUE /* leaf vdev */
+ .vdev_op_open = vdev_disk_open,
+ .vdev_op_close = vdev_disk_close,
+ .vdev_op_asize = vdev_default_asize,
+ .vdev_op_io_start = vdev_disk_io_start,
+ .vdev_op_io_done = vdev_disk_io_done,
+ .vdev_op_state_change = NULL,
+ .vdev_op_need_resilver = NULL,
+ .vdev_op_hold = vdev_disk_hold,
+ .vdev_op_rele = vdev_disk_rele,
+ .vdev_op_remap = NULL,
+ .vdev_op_xlate = vdev_default_xlate,
+ .vdev_op_type = VDEV_TYPE_DISK, /* name of this vdev type */
+ .vdev_op_leaf = B_TRUE /* leaf vdev */
};
module_param_call(zfs_vdev_scheduler, param_set_vdev_scheduler,
}
vdev_ops_t vdev_file_ops = {
- vdev_file_open,
- vdev_file_close,
- vdev_default_asize,
- vdev_file_io_start,
- vdev_file_io_done,
- NULL,
- NULL,
- vdev_file_hold,
- vdev_file_rele,
- NULL,
- vdev_default_xlate,
- VDEV_TYPE_FILE, /* name of this vdev type */
- B_TRUE /* leaf vdev */
+ .vdev_op_open = vdev_file_open,
+ .vdev_op_close = vdev_file_close,
+ .vdev_op_asize = vdev_default_asize,
+ .vdev_op_io_start = vdev_file_io_start,
+ .vdev_op_io_done = vdev_file_io_done,
+ .vdev_op_state_change = NULL,
+ .vdev_op_need_resilver = NULL,
+ .vdev_op_hold = vdev_file_hold,
+ .vdev_op_rele = vdev_file_rele,
+ .vdev_op_remap = NULL,
+ .vdev_op_xlate = vdev_default_xlate,
+ .vdev_op_type = VDEV_TYPE_FILE, /* name of this vdev type */
+ .vdev_op_leaf = B_TRUE /* leaf vdev */
};
void
#ifndef _KERNEL
vdev_ops_t vdev_disk_ops = {
- vdev_file_open,
- vdev_file_close,
- vdev_default_asize,
- vdev_file_io_start,
- vdev_file_io_done,
- NULL,
- NULL,
- vdev_file_hold,
- vdev_file_rele,
- NULL,
- vdev_default_xlate,
- VDEV_TYPE_DISK, /* name of this vdev type */
- B_TRUE /* leaf vdev */
+ .vdev_op_open = vdev_file_open,
+ .vdev_op_close = vdev_file_close,
+ .vdev_op_asize = vdev_default_asize,
+ .vdev_op_io_start = vdev_file_io_start,
+ .vdev_op_io_done = vdev_file_io_done,
+ .vdev_op_state_change = NULL,
+ .vdev_op_need_resilver = NULL,
+ .vdev_op_hold = vdev_file_hold,
+ .vdev_op_rele = vdev_file_rele,
+ .vdev_op_remap = NULL,
+ .vdev_op_xlate = vdev_default_xlate,
+ .vdev_op_type = VDEV_TYPE_DISK, /* name of this vdev type */
+ .vdev_op_leaf = B_TRUE /* leaf vdev */
};
#endif
}
vdev_ops_t vdev_indirect_ops = {
- vdev_indirect_open,
- vdev_indirect_close,
- vdev_default_asize,
- vdev_indirect_io_start,
- vdev_indirect_io_done,
- NULL,
- NULL,
- NULL,
- NULL,
- vdev_indirect_remap,
- NULL,
- VDEV_TYPE_INDIRECT, /* name of this vdev type */
- B_FALSE /* leaf vdev */
+ .vdev_op_open = vdev_indirect_open,
+ .vdev_op_close = vdev_indirect_close,
+ .vdev_op_asize = vdev_default_asize,
+ .vdev_op_io_start = vdev_indirect_io_start,
+ .vdev_op_io_done = vdev_indirect_io_done,
+ .vdev_op_state_change = NULL,
+ .vdev_op_need_resilver = NULL,
+ .vdev_op_hold = NULL,
+ .vdev_op_rele = NULL,
+ .vdev_op_remap = vdev_indirect_remap,
+ .vdev_op_xlate = NULL,
+ .vdev_op_type = VDEV_TYPE_INDIRECT, /* name of this vdev type */
+ .vdev_op_leaf = B_FALSE /* leaf vdev */
};
#if defined(_KERNEL)
}
vdev_ops_t vdev_mirror_ops = {
- vdev_mirror_open,
- vdev_mirror_close,
- vdev_default_asize,
- vdev_mirror_io_start,
- vdev_mirror_io_done,
- vdev_mirror_state_change,
- NULL,
- NULL,
- NULL,
- NULL,
- vdev_default_xlate,
- VDEV_TYPE_MIRROR, /* name of this vdev type */
- B_FALSE /* not a leaf vdev */
+ .vdev_op_open = vdev_mirror_open,
+ .vdev_op_close = vdev_mirror_close,
+ .vdev_op_asize = vdev_default_asize,
+ .vdev_op_io_start = vdev_mirror_io_start,
+ .vdev_op_io_done = vdev_mirror_io_done,
+ .vdev_op_state_change = vdev_mirror_state_change,
+ .vdev_op_need_resilver = NULL,
+ .vdev_op_hold = NULL,
+ .vdev_op_rele = NULL,
+ .vdev_op_remap = NULL,
+ .vdev_op_xlate = vdev_default_xlate,
+ .vdev_op_type = VDEV_TYPE_MIRROR, /* name of this vdev type */
+ .vdev_op_leaf = B_FALSE /* not a leaf vdev */
};
vdev_ops_t vdev_replacing_ops = {
- vdev_mirror_open,
- vdev_mirror_close,
- vdev_default_asize,
- vdev_mirror_io_start,
- vdev_mirror_io_done,
- vdev_mirror_state_change,
- NULL,
- NULL,
- NULL,
- NULL,
- vdev_default_xlate,
- VDEV_TYPE_REPLACING, /* name of this vdev type */
- B_FALSE /* not a leaf vdev */
+ .vdev_op_open = vdev_mirror_open,
+ .vdev_op_close = vdev_mirror_close,
+ .vdev_op_asize = vdev_default_asize,
+ .vdev_op_io_start = vdev_mirror_io_start,
+ .vdev_op_io_done = vdev_mirror_io_done,
+ .vdev_op_state_change = vdev_mirror_state_change,
+ .vdev_op_need_resilver = NULL,
+ .vdev_op_hold = NULL,
+ .vdev_op_rele = NULL,
+ .vdev_op_remap = NULL,
+ .vdev_op_xlate = vdev_default_xlate,
+ .vdev_op_type = VDEV_TYPE_REPLACING, /* name of this vdev type */
+ .vdev_op_leaf = B_FALSE /* not a leaf vdev */
};
vdev_ops_t vdev_spare_ops = {
- vdev_mirror_open,
- vdev_mirror_close,
- vdev_default_asize,
- vdev_mirror_io_start,
- vdev_mirror_io_done,
- vdev_mirror_state_change,
- NULL,
- NULL,
- NULL,
- NULL,
- vdev_default_xlate,
- VDEV_TYPE_SPARE, /* name of this vdev type */
- B_FALSE /* not a leaf vdev */
+ .vdev_op_open = vdev_mirror_open,
+ .vdev_op_close = vdev_mirror_close,
+ .vdev_op_asize = vdev_default_asize,
+ .vdev_op_io_start = vdev_mirror_io_start,
+ .vdev_op_io_done = vdev_mirror_io_done,
+ .vdev_op_state_change = vdev_mirror_state_change,
+ .vdev_op_need_resilver = NULL,
+ .vdev_op_hold = NULL,
+ .vdev_op_rele = NULL,
+ .vdev_op_remap = NULL,
+ .vdev_op_xlate = vdev_default_xlate,
+ .vdev_op_type = VDEV_TYPE_SPARE, /* name of this vdev type */
+ .vdev_op_leaf = B_FALSE /* not a leaf vdev */
};
#if defined(_KERNEL)
}
vdev_ops_t vdev_missing_ops = {
- vdev_missing_open,
- vdev_missing_close,
- vdev_default_asize,
- vdev_missing_io_start,
- vdev_missing_io_done,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- VDEV_TYPE_MISSING, /* name of this vdev type */
- B_TRUE /* leaf vdev */
+ .vdev_op_open = vdev_missing_open,
+ .vdev_op_close = vdev_missing_close,
+ .vdev_op_asize = vdev_default_asize,
+ .vdev_op_io_start = vdev_missing_io_start,
+ .vdev_op_io_done = vdev_missing_io_done,
+ .vdev_op_state_change = NULL,
+ .vdev_op_need_resilver = NULL,
+ .vdev_op_hold = NULL,
+ .vdev_op_rele = NULL,
+ .vdev_op_remap = NULL,
+ .vdev_op_xlate = NULL,
+ .vdev_op_type = VDEV_TYPE_MISSING, /* name of this vdev type */
+ .vdev_op_leaf = B_TRUE /* leaf vdev */
};
vdev_ops_t vdev_hole_ops = {
- vdev_missing_open,
- vdev_missing_close,
- vdev_default_asize,
- vdev_missing_io_start,
- vdev_missing_io_done,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- VDEV_TYPE_HOLE, /* name of this vdev type */
- B_TRUE /* leaf vdev */
+ .vdev_op_open = vdev_missing_open,
+ .vdev_op_close = vdev_missing_close,
+ .vdev_op_asize = vdev_default_asize,
+ .vdev_op_io_start = vdev_missing_io_start,
+ .vdev_op_io_done = vdev_missing_io_done,
+ .vdev_op_state_change = NULL,
+ .vdev_op_need_resilver = NULL,
+ .vdev_op_hold = NULL,
+ .vdev_op_rele = NULL,
+ .vdev_op_remap = NULL,
+ .vdev_op_xlate = NULL,
+ .vdev_op_type = VDEV_TYPE_HOLE, /* name of this vdev type */
+ .vdev_op_leaf = B_TRUE /* leaf vdev */
};
}
vdev_ops_t vdev_raidz_ops = {
- vdev_raidz_open,
- vdev_raidz_close,
- vdev_raidz_asize,
- vdev_raidz_io_start,
- vdev_raidz_io_done,
- vdev_raidz_state_change,
- vdev_raidz_need_resilver,
- NULL,
- NULL,
- NULL,
- vdev_raidz_xlate,
- VDEV_TYPE_RAIDZ, /* name of this vdev type */
- B_FALSE /* not a leaf vdev */
+ .vdev_op_open = vdev_raidz_open,
+ .vdev_op_close = vdev_raidz_close,
+ .vdev_op_asize = vdev_raidz_asize,
+ .vdev_op_io_start = vdev_raidz_io_start,
+ .vdev_op_io_done = vdev_raidz_io_done,
+ .vdev_op_state_change = vdev_raidz_state_change,
+ .vdev_op_need_resilver = vdev_raidz_need_resilver,
+ .vdev_op_hold = NULL,
+ .vdev_op_rele = NULL,
+ .vdev_op_remap = NULL,
+ .vdev_op_xlate = vdev_raidz_xlate,
+ .vdev_op_type = VDEV_TYPE_RAIDZ, /* name of this vdev type */
+ .vdev_op_leaf = B_FALSE /* not a leaf vdev */
};
}
vdev_ops_t vdev_root_ops = {
- vdev_root_open,
- vdev_root_close,
- vdev_default_asize,
- NULL, /* io_start - not applicable to the root */
- NULL, /* io_done - not applicable to the root */
- vdev_root_state_change,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- VDEV_TYPE_ROOT, /* name of this vdev type */
- B_FALSE /* not a leaf vdev */
+ .vdev_op_open = vdev_root_open,
+ .vdev_op_close = vdev_root_close,
+ .vdev_op_asize = vdev_default_asize,
+ .vdev_op_io_start = NULL, /* not applicable to the root */
+ .vdev_op_io_done = NULL, /* not applicable to the root */
+ .vdev_op_state_change = vdev_root_state_change,
+ .vdev_op_need_resilver = NULL,
+ .vdev_op_hold = NULL,
+ .vdev_op_rele = NULL,
+ .vdev_op_remap = NULL,
+ .vdev_op_xlate = NULL,
+ .vdev_op_type = VDEV_TYPE_ROOT, /* name of this vdev type */
+ .vdev_op_leaf = B_FALSE /* not a leaf vdev */
};