Lines Matching defs:vds
81 #define VD_BLOCK_DEVICE_PROP "vds-block-device"
82 #define VD_BLOCK_DEVICE_OPTS "vds-block-device-opts"
167 * The list can be extended by adding a "driver-type-list" entry in vds.conf
178 * For example, the following line in vds.conf:
184 * When a list is defined in vds.conf, it is checked before the built-in list
186 * using vds.conf.
252 * template is copied for each vds instance and filled in with
399 * Soft state structure for a vds instance
401 typedef struct vds {
408 vd_driver_type_t *driver_types; /* extra driver types (from vds.conf) */
445 vds_t *vds; /* server for this vdisk */
604 * the vds driver and using a domain configuration created before the
681 static void vds_driver_types_free(vds_t *vds);
4318 * Process a version message from a client. vds expects to receive version
4320 * itself; therefore, vds can ACK or NACK client version messages, but does
4766 * which vds exchanges descriptors within VIO message payloads, rather than
5381 vds_t *vds;
5398 if ((vds = ddi_get_soft_state(vds_state, instance)) == NULL) {
5405 mod_hash_walk(vds->vd_table, vds_check_for_vd, &vd_present);
5412 if (vds->initialized & VDS_MDEG) {
5413 (void) mdeg_unregister(vds->mdeg);
5414 kmem_free(vds->ispecp->specp, sizeof (vds_prop_template));
5415 kmem_free(vds->ispecp, sizeof (mdeg_node_spec_t));
5416 vds->ispecp = NULL;
5417 vds->mdeg = NULL;
5420 vds_driver_types_free(vds);
5422 if (vds->initialized & VDS_LDI)
5423 (void) ldi_ident_release(vds->ldi_ident);
5424 mod_hash_destroy_hash(vds->vd_table);
5483 * any USCSI calls vds makes need to take this into account.
5578 * results in vds not serving this disk, as the client could
5597 vd->vds->ldi_ident);
5602 &vd->ldi_handle[slice], vd->vds->ldi_ident);
5898 !(DEVI_IS_ATTACHING(vd->vds->dip)))) {
5920 vd->vds->ldi_ident);
6061 if (ddi_devid_init(vd->vds->dip, DEVID_FAB, NULL, 0,
6105 &vd->ldi_handle[0], vd->vds->ldi_ident);
6114 kcred, &vd->ldi_handle[0], vd->vds->ldi_ident);
6507 vds_t *vds = vd->vds;
6523 * We start by looking if the driver is in the list from vds.conf
6524 * so that we can override the built-in list using vds.conf.
6529 /* check vds.conf list */
6530 for (i = 0; i < vds->num_drivers; i++) {
6531 if (vds->driver_types[i].type == VD_DRIVER_UNKNOWN) {
6535 if (strcmp(drv_name, vds->driver_types[i].name) == 0) {
6536 drv_type = vds->driver_types[i].type;
6676 !(DEVI_IS_ATTACHING(vd->vds->dip))) {
6704 if ((vd->ioq = ddi_taskq_create(vd->vds->dip, tq_name,
6715 vds_do_init_vd(vds_t *vds, uint64_t id, char *device_path, uint64_t options,
6725 ASSERT(vds != NULL);
6736 vd->vds = vds;
6775 if (ddi_get_soft_iblock_cookie(vds->dip, DDI_SOFTINT_MED,
6788 if ((vd->startq = ddi_taskq_create(vds->dip, tq_name, 1,
6795 if ((vd->completionq = ddi_taskq_create(vds->dip, tq_name, 1,
6810 ldc_attr.instance = ddi_get_instance(vds->dip);
6846 if (mod_hash_insert(vds->vd_table, (mod_hash_key_t)id, vd) != 0) {
7000 vds_init_vd(vds_t *vds, uint64_t id, char *device_path, uint64_t options,
7007 if ((status = vds_do_init_vd(vds, id, device_path, options,
7068 * Parse the options of a vds node. Options are defined as an array
7069 * of strings in the vds-block-device-opts property of the vds node
7074 * The vds-block-device-opts property is optional. If a vds has no such
7079 * vd_node - vds node in the machine description for which
7124 vds_driver_types_free(vds_t *vds)
7126 if (vds->driver_types != NULL) {
7127 kmem_free(vds->driver_types, sizeof (vd_driver_type_t) *
7128 vds->num_drivers);
7129 vds->driver_types = NULL;
7130 vds->num_drivers = 0;
7135 * Update the driver type list with information from vds.conf.
7138 vds_driver_types_update(vds_t *vds)
7143 if (ddi_prop_lookup_string_array(DDI_DEV_T_ANY, vds->dip,
7150 * is in the driver-type-list from vds.conf. However only valid
7156 vds->num_drivers = num;
7157 vds->driver_types = kmem_zalloc(sizeof (vd_driver_type_t) * num,
7165 PRN("vds.conf: driver-type-list, entry %d (%s): "
7174 PRN("vds.conf: driver-type-list, entry %d (%s): "
7181 PRN("vds.conf: driver-type-list, entry %d (%s): "
7189 vds->driver_types[i].type = VD_DRIVER_DISK;
7193 vds->driver_types[i].type = VD_DRIVER_VOLUME;
7196 PRN("vds.conf: driver-type-list, entry %d (%s): "
7202 (void) strncpy(vds->driver_types[i].name, list[i], len);
7214 vds_driver_types_free(vds);
7219 vds_add_vd(vds_t *vds, md_t *md, mde_cookie_t vd_node)
7242 if (vds_init_vd(vds, id, device_path, options, ldc_id) != 0) {
7244 if (mod_hash_destroy(vds->vd_table, (mod_hash_key_t)id) != 0)
7251 vds_remove_vd(vds_t *vds, md_t *md, mde_cookie_t vd_node)
7262 if (mod_hash_destroy(vds->vd_table, (mod_hash_key_t)id) != 0)
7267 vds_change_vd(vds_t *vds, md_t *prev_md, mde_cookie_t prev_vd_node,
7337 if (mod_hash_destroy(vds->vd_table, (mod_hash_key_t)prev_id) != 0)
7341 if (vds_init_vd(vds, curr_id, curr_dev, curr_options,
7352 vds_t *vds = arg;
7357 ASSERT(vds != NULL);
7360 vds_remove_vd(vds, md->removed.mdp, md->removed.mdep[i]);
7362 vds_change_vd(vds, md->match_prev.mdp, md->match_prev.mdep[i],
7365 vds_add_vd(vds, md->added.mdp, md->added.mdep[i]);
7377 vds_t *vds;
7382 * The "cfg-handle" property of a vds node in an MD contains the MD's
7394 PRN("vds \"%s\" property does not exist", VD_REG_PROP);
7407 if ((vds = ddi_get_soft_state(vds_state, instance)) == NULL) {
7413 vds->dip = dip;
7414 vds->vd_table = mod_hash_create_ptrhash("vds_vd_table", VDS_NCHAINS,
7417 ASSERT(vds->vd_table != NULL);
7419 if ((status = ldi_ident_from_dip(dip, &vds->ldi_ident)) != 0) {
7423 vds->initialized |= VDS_LDI;
7437 if (mdeg_register(ispecp, &vd_match, vds_process_md, vds,
7438 &vds->mdeg) != MDEG_SUCCESS) {
7445 vds->ispecp = ispecp;
7446 vds->initialized |= VDS_MDEG;
7456 vds_driver_types_update(vds);