vds
ud_parse_fill_vds(ud_handle_t h, struct vds *v,
struct vol_desc_ptr *vds;
static int32_t ud_parse_fill_vds(ud_handle_t, struct vds *, uint32_t, uint32_t);
vds = (struct vol_desc_ptr *)taddr;
if (SWAP_32(vds->vdp_nvdse.ext_len) != 0) {
vds_loc = SWAP_32(vds->vdp_nvdse.ext_loc);
vds_len = SWAP_32(vds->vdp_nvdse.ext_len);
struct vds mvds;
struct vds rvds;
struct vds *v;
print_vds(fstyp_udfs_t *h, struct vds *v, FILE *fout, FILE *ferr)
static int print_vds(fstyp_udfs_t *h, struct vds *,
print_info(struct vds *v, char *name, ud_handle_t udh)
label_vds(struct vds *v, uint32_t set_flags, ud_handle_t udh)
static void print_info(struct vds *, char *, ud_handle_t);
static void label_vds(struct vds *, uint32_t, ud_handle_t);
zpool_translate_vdev_guids(zpool_handle_t *zhp, nvlist_t *vds,
for (nvpair_t *elem = nvlist_next_nvpair(vds, NULL); elem != NULL;
elem = nvlist_next_nvpair(vds, elem)) {
nvlist_t *vds)
err = zpool_translate_vdev_guids(zhp, vds, vdev_guids,
zpool_trim(zpool_handle_t *zhp, pool_trim_func_t cmd_type, nvlist_t *vds,
err = zpool_translate_vdev_guids(zhp, vds, vdev_guids,
vds_t *vds; /* server for this vdisk */
vds_t *vds;
if ((vds = ddi_get_soft_state(vds_state, instance)) == NULL) {
mod_hash_walk(vds->vd_table, vds_check_for_vd, &vd_present);
if (vds->initialized & VDS_MDEG) {
(void) mdeg_unregister(vds->mdeg);
kmem_free(vds->ispecp->specp, sizeof (vds_prop_template));
kmem_free(vds->ispecp, sizeof (mdeg_node_spec_t));
vds->ispecp = NULL;
vds->mdeg = 0;
vds_driver_types_free(vds);
if (vds->initialized & VDS_LDI)
(void) ldi_ident_release(vds->ldi_ident);
mod_hash_destroy_hash(vds->vd_table);
vd->vds->ldi_ident);
&vd->ldi_handle[slice], vd->vds->ldi_ident);
!(DEVI_IS_ATTACHING(vd->vds->dip)))) {
vd->vds->ldi_ident);
if (ddi_devid_init(vd->vds->dip, DEVID_FAB, 0, 0,
&vd->ldi_handle[0], vd->vds->ldi_ident);
kcred, &vd->ldi_handle[0], vd->vds->ldi_ident);
vds_t *vds = vd->vds;
for (i = 0; i < vds->num_drivers; i++) {
if (vds->driver_types[i].type == VD_DRIVER_UNKNOWN) {
if (strcmp(drv_name, vds->driver_types[i].name) == 0) {
drv_type = vds->driver_types[i].type;
!(DEVI_IS_ATTACHING(vd->vds->dip))) {
if ((vd->ioq = ddi_taskq_create(vd->vds->dip, tq_name,
vds_do_init_vd(vds_t *vds, uint64_t id, char *device_path, uint64_t options,
ASSERT(vds != NULL);
vd->vds = vds;
if (ddi_get_soft_iblock_cookie(vds->dip, DDI_SOFTINT_MED,
if ((vd->startq = ddi_taskq_create(vds->dip, tq_name, 1,
if ((vd->completionq = ddi_taskq_create(vds->dip, tq_name, 1,
ldc_attr.instance = ddi_get_instance(vds->dip);
static void vds_driver_types_free(vds_t *vds);
if (mod_hash_insert(vds->vd_table, (mod_hash_key_t)id, vd) != 0) {
vds_init_vd(vds_t *vds, uint64_t id, char *device_path, uint64_t options,
if ((status = vds_do_init_vd(vds, id, device_path, options,
vds_driver_types_free(vds_t *vds)
if (vds->driver_types != NULL) {
kmem_free(vds->driver_types, sizeof (vd_driver_type_t) *
vds->num_drivers);
vds->driver_types = NULL;
vds->num_drivers = 0;
vds_driver_types_update(vds_t *vds)
if (ddi_prop_lookup_string_array(DDI_DEV_T_ANY, vds->dip,
vds->num_drivers = num;
vds->driver_types = kmem_zalloc(sizeof (vd_driver_type_t) * num,
vds->driver_types[i].type = VD_DRIVER_DISK;
vds->driver_types[i].type = VD_DRIVER_VOLUME;
(void) strncpy(vds->driver_types[i].name, list[i], len);
vds_driver_types_free(vds);
vds_add_vd(vds_t *vds, md_t *md, mde_cookie_t vd_node)
if (vds_init_vd(vds, id, device_path, options, ldc_id) != 0) {
if (mod_hash_destroy(vds->vd_table, (mod_hash_key_t)id) != 0)
vds_remove_vd(vds_t *vds, md_t *md, mde_cookie_t vd_node)
if (mod_hash_destroy(vds->vd_table, (mod_hash_key_t)id) != 0)
vds_change_vd(vds_t *vds, md_t *prev_md, mde_cookie_t prev_vd_node,
if (mod_hash_destroy(vds->vd_table, (mod_hash_key_t)prev_id) != 0)
if (vds_init_vd(vds, curr_id, curr_dev, curr_options,
vds_t *vds = arg;
ASSERT(vds != NULL);
vds_remove_vd(vds, md->removed.mdp, md->removed.mdep[i]);
vds_change_vd(vds, md->match_prev.mdp, md->match_prev.mdep[i],
vds_add_vd(vds, md->added.mdp, md->added.mdep[i]);
vds_t *vds;
if ((vds = ddi_get_soft_state(vds_state, instance)) == NULL) {
vds->dip = dip;
vds->vd_table = mod_hash_create_ptrhash("vds_vd_table", VDS_NCHAINS,
ASSERT(vds->vd_table != NULL);
if ((status = ldi_ident_from_dip(dip, &vds->ldi_ident)) != 0) {
vds->initialized |= VDS_LDI;
if (mdeg_register(ispecp, &vd_match, vds_process_md, vds,
&vds->mdeg) != MDEG_SUCCESS) {
vds->ispecp = ispecp;
vds->initialized |= VDS_MDEG;
vds_driver_types_update(vds);