Lines Matching defs:compnp

126 static int meta_sp_setgeom(mdname_t *np, mdname_t *compnp, mp_unit_t *mp,
128 static int meta_sp_get_by_component(mdsetname_t *sp, mdname_t *compnp,
131 mdname_t *compnp, md_error_t *ep);
174 static int meta_sp_extlist_from_wm(mdsetname_t *sp, mdname_t *compnp,
188 static int meta_sp_read_wm(mdsetname_t *sp, mdname_t *compnp,
190 static diskaddr_t meta_sp_get_start(mdsetname_t *sp, mdname_t *compnp,
195 static mp_unit_t *meta_sp_createunit(mdname_t *np, mdname_t *compnp,
218 static int meta_sp_validate_unit(mdsetname_t *sp, mdname_t *compnp,
224 static int meta_sp_recover_from_wm(mdsetname_t *sp, mdname_t *compnp,
414 * compnp - the underlying device to setup geometry for
423 mdname_t *compnp,
431 if ((geomp = metagetgeom(compnp, ep)) == NULL)
503 * compnp - the name of the device containing the soft
517 mdname_t *compnp,
569 err = meta_check_samedrive(compnp, msp->compnamep, ep);
586 assert(!metaismeta(compnp));
589 compnp, 0, -1, msp->compnamep, 0, -1, ep) == 0)
617 * compnp - the name of the underlying component
628 mdname_t *compnp,
635 assert(compnp != NULL);
641 if (!metaismeta(compnp))
649 mname = metagetmiscname(compnp, ep);
664 * then at the exit of this loop, compnp will have been
672 mp = meta_get_mirror(sp, compnp, ep);
682 compnp = smp->submirnamep;
683 assert(compnp != NULL);
685 mname = metagetmiscname(compnp, ep);
703 stp = meta_get_stripe(sp, compnp, ep);
718 rp = meta_get_raid(sp, compnp, ep);
1824 * compnp - the name of the device to scan watermarks on
1838 mdname_t *compnp,
1858 if ((cur_off = meta_sp_get_start(sp, compnp, ep)) == MD_DISKADDR_ERROR)
1862 if (meta_sp_read_wm(sp, compnp, &wm, cur_off, ep) != 0) {
2588 * compnp - mdname_t for component
2601 mdname_t *compnp,
2620 read_params.rdev = compnp->dev;
2626 &read_params.mde, compnp->cname) != 0) {
3479 * compnp - the name of the device the soft partition is on
3493 mdname_t *compnp,
3517 (void) meta_sp_setgeom(np, compnp, mp, ep);
3520 if (metaismeta(compnp))
3526 mp->un_dev = compnp->dev;
3527 mp->un_key = compnp->key;
3530 mp->un_start_blk = (sp_ext_offset_t)compnp->start_blk;
4060 mdname_t *compnp = msp->compnamep;
4067 if (meta_check_inset(sp, compnp, ep) != 0)
4084 if (metaismeta(compnp))
4085 return (mddeverror(ep, MDE_IS_META, compnp->dev,
4086 compnp->cname));
4088 assert(compnp->drivenamep != NULL);
4099 if ((vtocp = metagetvtoc(compnp, FALSE, &slice, ep)) == NULL)
4102 return (mderror(ep, MDE_NOT_DRIVENAME, compnp->cname));
4104 dnp = compnp->drivenamep;
4189 if (meta_check_inuse(sp, compnp, MDCHK_INUSE, ep) != 0) {
4193 if (!metaismeta(compnp)) { /* handle non-metadevices */
4202 if (meta_check_inmeta(sp, compnp, options, 0, -1, ep) != 0 &&
4203 meta_check_insp(sp, compnp, 0, -1, ep) == 0) {
4208 if ((mdp = meta_get_unit(sp, compnp, ep)) == NULL)
4214 meta_getminor(compnp->dev), compnp->cname));
4252 mdname_t *compnp = msp->compnamep;
4278 compnp->drivenamep,
4295 if ((sp_start = meta_sp_get_start(sp, compnp, ep)) ==
4303 if (add_key_name(sp, compnp, &keynlp, ep) != 0) {
4317 count = meta_sp_get_by_component(sp, compnp, &spnlp, 1, ep);
4329 if ((comp_size = metagetsize(compnp, ep)) == MD_DISKADDR_ERROR) {
4333 (void) mdmderror(ep, MDE_SP_NOSPACE, 0, compnp->cname);
4364 meta_sp_list_freefill(&extlist, metagetsize(compnp, ep));
4382 meta_sp_get_default_alignment(sp, compnp, ep));
4424 if (metaismeta(compnp)) {
4427 miscname = metagetmiscname(compnp, ep);
4778 mdname_t *compnp, *np;
4785 if ((compnp = metaname(&sp, name, UNKNOWN, ep)) == NULL)
4789 count = meta_sp_get_by_component(sp, compnp, &spnlp, 1, ep);
4791 return (mdmderror(ep, MDE_SP_NOSP, 0, compnp->cname));
4820 if (metaismeta(compnp)) {
4872 mdname_t *compnp = NULL;
4917 if ((compnp = metakeyname(&sp, mp->un_key, 0, ep)) == NULL) {
4923 compnp->key = mp->un_key;
4926 count = meta_sp_get_by_component(sp, compnp, &spnlp, 0, ep);
4948 if ((start_block = meta_sp_get_start(sp, compnp, ep)) ==
4957 metagetsize(compnp, ep) - MD_SP_WMSIZE, MD_SP_WMSIZE,
4972 meta_sp_list_freefill(&extlist, metagetsize(compnp, ep));
4978 meta_sp_get_default_alignment(sp, compnp, ep));
5063 * compnp - name pointer for device we are recovering on
5075 mdname_t *compnp,
5085 (void) meta_cook_syntax(ep, MDE_SYNTAX, compnp->cname,
5109 if (meta_sp_validate_wm(sp, compnp, options, ep) < 0)
5111 if (meta_sp_validate_unit(sp, compnp, options, ep) < 0)
5113 if (meta_sp_validate_wm_and_unit(sp, compnp, options, ep) < 0)
5120 if (meta_sp_validate_unit(sp, compnp, options, ep) == 0)
5123 if (meta_sp_validate_wm(sp, compnp, options, ep) < 0)
5125 if (meta_sp_recover_from_wm(sp, compnp, options, ep) < 0)
5129 if (meta_sp_validate_unit(sp, compnp, options, ep) < 0)
5131 if (meta_sp_recover_from_unit(sp, compnp, options, ep) < 0)
5135 (void) meta_cook_syntax(ep, MDE_SYNTAX, compnp->cname,
5362 * compnp - name pointer for device we are recovering from
5375 mdname_t *compnp,
5388 compnp->cname);
5393 rval = meta_sp_extlist_from_wm(sp, compnp, &extlist,
5401 compnp->cname);
5405 compnp->cname);
5416 compnp->cname);
5437 compnp->cname);
5441 "%s: No soft partitions.\n"), compnp->cname);
5442 return (mdmderror(ep, MDE_RECOVER_FAILED, 0, compnp->cname));
5451 return (mdmderror(ep, MDE_RECOVER_FAILED, 0, compnp->cname));
5459 * compnp - name of component we are recovering from
5470 mdname_t *compnp,
5485 compnp->cname);
5487 if ((size = metagetsize(compnp, ep)) == MD_DISKADDR_ERROR)
5491 count = meta_sp_get_by_component(sp, compnp, &spnlp, 0, ep);
5495 "%s: No soft partitions.\n"), compnp->cname);
5496 return (mdmderror(ep, MDE_RECOVER_FAILED, 0, compnp->cname));
5563 0, compnp->cname));
5574 0, compnp->cname));
5583 compnp->cname);
5591 * compnp - name of device we are recovering from
5734 * INPUT: compnp - name pointer for device we are recovering from
5744 mdname_t *compnp,
5753 compnp->cname);
5754 return (mdmderror(ep, MDE_RECOVER_FAILED, 0, compnp->cname));
5760 compnp->cname);
5761 return (mdmderror(ep, MDE_RECOVER_FAILED, 0, compnp->cname));
5767 "differ.\n"), compnp->cname);
5768 return (mdmderror(ep, MDE_RECOVER_FAILED, 0, compnp->cname));
5774 compnp->cname);
5775 return (mdmderror(ep, MDE_RECOVER_FAILED, 0, compnp->cname));
5786 "differ.\n"), compnp->cname);
5787 return (mdmderror(ep, MDE_RECOVER_FAILED, 0, compnp->cname));
5795 "differ.\n"), compnp->cname);
5797 0, compnp->cname));
5809 "differ.\n"), compnp->cname);
5810 return (mdmderror(ep, MDE_RECOVER_FAILED, 0, compnp->cname));
5818 "differ.\n"), compnp->cname);
5820 0, compnp->cname));
5892 * compnp - name pointer for component we are recovering from
5908 mdname_t *compnp,
5943 if (meta_check_inmeta(sp, compnp, options, 0, -1, ep) != 0)
5957 if (meta_sp_extlist_from_wm(sp, compnp, &extlist,
5959 return (mdmderror(ep, MDE_RECOVER_FAILED, 0, compnp->cname));
6041 strlen(compnp->cname) + 1;
6045 compnp->cname);
6053 compnp->key =
6066 (void) metanamelist_append(&keynlp, compnp);
6068 if (add_key_name(sp, compnp, &keynlp,
6078 (new_name) ? new_np : sp_list->ext_namep, compnp,
6218 if (metaismeta(compnp)) {
6221 miscname = metagetmiscname(compnp, ep);
6234 mm = (mm_unit_t *)meta_get_unit(sp, compnp, ep);
6241 meta_getminor(compnp->dev),
6290 compnp->cname);
6344 return (mdmderror(ep, MDE_RECOVER_FAILED, 0, compnp->cname));
6350 compnp->cname);
6357 * compnp - name of component we are recovering from
6372 mdname_t *compnp,
6392 count = meta_sp_get_by_component(sp, compnp, &spnlp, 0, ep);
6415 if ((start_block = meta_sp_get_start(sp, compnp, ep)) ==
6423 metagetsize(compnp, ep) - MD_SP_WMSIZE, MD_SP_WMSIZE,
6435 compnp->cname);
6441 meta_sp_list_freefill(&extlist, metagetsize(compnp, ep));
6464 compnp->cname);
6498 compnp->cname);
6516 compnp->cname);