Lines Matching refs:np

126 static int meta_sp_setgeom(mdname_t *np, mdname_t *compnp, mp_unit_t *mp,
136 static void meta_sp_list_insert(mdsetname_t *sp, mdname_t *np,
162 static void meta_sp_alloc_by_ext(mdsetname_t *sp, mdname_t *np,
165 static int meta_sp_alloc_by_len(mdsetname_t *sp, mdname_t *np,
168 static int meta_sp_alloc_by_list(mdsetname_t *sp, mdname_t *np,
195 static mp_unit_t *meta_sp_createunit(mdname_t *np, mdname_t *compnp,
198 static mp_unit_t *meta_sp_updateunit(mdname_t *np, mp_unit_t *old_un,
207 static int meta_sp_reset_common(mdsetname_t *sp, mdname_t *np, md_sp_t *msp,
216 static int meta_sp_validate_wm(mdsetname_t *sp, mdname_t *np,
220 static int meta_sp_validate_wm_and_unit(mdsetname_t *sp, mdname_t *np,
222 static int meta_sp_validate_exts(mdname_t *np, sp_ext_node_t *wmext,
226 static int meta_sp_recover_from_unit(mdsetname_t *sp, mdname_t *np,
413 * INPUT: np - the underlying device to setup geometry for
422 mdname_t *np,
433 if (meta_setup_geom((md_unit_t *)mp, np, geomp, geomp->write_reinstruct,
752 * np - the name of the device to check
764 mdname_t *np,
785 count = meta_sp_get_by_component(sp, np, &spnlp, 1, ep);
790 rval = mduseerror(ep, MDE_ALREADY, np->dev,
791 spnlp->namep->cname, np->cname);
862 * np - the name of the device the node belongs to
884 mdname_t *np,
912 newext->ext_namep = np;
1182 * np - the name of the device the node belongs to
1208 mdname_t *np,
1240 meta_sp_list_insert(sp, np, head, alloc_offset, alloc_length,
1252 * np - the name of the device the node belongs to
1307 mdname_t *np,
1407 meta_sp_alloc_by_ext(sp, np, head,
1488 meta_sp_alloc_by_ext(sp, np, head,
1576 meta_sp_alloc_by_ext(sp, np, head, free_ext,
1634 meta_sp_alloc_by_ext(sp, np, head,
1668 meta_sp_alloc_by_ext(sp, np, head,
1705 * np - the name of the device the node belongs to
1721 mdname_t *np,
1742 meta_sp_alloc_by_ext(sp, np, head, free_ext,
1845 mdname_t *np = NULL;
1922 np = metaname(&spsetp, wm.wm_mdname, META_DEVICE, ep);
1923 if (np == NULL) {
1938 meta_sp_list_insert(spsetp, np, extlist, cur_off,
1949 np = NULL;
2258 * np - the name of the device to print
2270 mdname_t *np,
2288 if (np == NULL) {
2317 if ((msp = meta_get_sp_common(sp, np,
2374 * np - device upon which the sp is being built
2383 mdname_t *np,
2389 if ((start_block = metagetstart(sp, np, ep)) != MD_DISKADDR_ERROR)
3478 * INPUT: np - the name of the device to create a unit structure for
3492 mdname_t *np,
3512 MD_SID(mp) = meta_getminor(np->dev);
3517 (void) meta_sp_setgeom(np, compnp, mp, ep);
3543 * INPUT: np - name structure for the metadevice being updated
3559 mdname_t *np,
3586 if (meta_adjust_geom((md_unit_t *)new_un, np,
3604 * np - the name of the device to get
3613 mdname_t *np,
3617 return (meta_get_sp_common(sp, np, 0, ep));
3623 * np - the name of the device to get
3627 * NULL if np is not a soft partition
3633 mdname_t *np,
3638 mddrivename_t *dnp = np->drivenamep;
3654 if ((miscname = metagetmiscname(np, ep)) == NULL)
3658 (void) mdmderror(ep, MDE_NOT_SP, 0, np->cname);
3662 if ((mp = (mp_unit_t *)meta_get_mdunit(sp, np, ep)) == NULL)
3671 msp->common.namep = np;
3747 mdname_t *np = NULL; /* name of soft partition */
3764 if ((np = metaname(spp, devname, META_DEVICE, ep)) == NULL)
3768 if (metagetmiscname(np, ep) != NULL) {
3770 meta_getminor(np->dev), devname);
3828 msp->common.namep = np;
3894 meta_sp_list_insert(*spp, np,
4010 * np - the name to check
4012 * RETURNS: int - 0 means sp,np is a soft partition
4013 * 1 means sp,np is not a soft partition
4020 mdname_t *np,
4024 if (meta_get_sp_common(sp, np, 0, ep) == NULL)
4251 mdname_t *np = msp->common.namep;
4373 numexts = meta_sp_alloc_by_list(sp, np, &extlist, oblist);
4375 (void) mdmderror(ep, MDE_SP_OVERLAP, 0, np->cname);
4380 numexts = meta_sp_alloc_by_len(sp, np, &extlist,
4384 (void) mdmderror(ep, MDE_SP_NOSPACE, 0, np->cname);
4466 np->cname) != 0) {
4525 * np - the name of the device to reset
4538 mdname_t *np,
4551 return (mdmderror(ep, MDE_IN_USE, meta_getminor(np->dev),
4552 np->cname));
4555 if ((is_open = meta_isopen(sp, np, ep, options)) < 0)
4558 return (mdmderror(ep, MDE_IS_OPEN, meta_getminor(np->dev),
4559 np->cname));
4562 if ((miscname = metagetmiscname(np, ep)) == NULL)
4567 reset_params.mnum = meta_getminor(np->dev);
4594 &reset_params.mde, np->cname) != 0) {
4603 (void) meta_update_devtree(meta_getminor(np->dev));
4610 np->cname);
4624 meta_invalidate_name(np);
4631 * np - the name of the device to reset
4636 * soft partition. If np is NULL, then soft partitions are
4648 mdname_t *np,
4662 if (np == NULL) {
4678 np = nlp->namep;
4679 if ((msp = meta_get_sp(sp, np, ep)) == NULL) {
4697 np->cname, options, 0, ep) != 0) {
4702 if (meta_sp_reset(sp, np, options, ep) != 0) {
4714 if (metachkmeta(np, ep) != 0)
4718 if ((msp = meta_get_sp(sp, np, ep)) == NULL)
4738 meta_getminor(np->dev))
4752 if (meta_sp_reset_common(sp, np, msp, reset_params, options, ep) != 0)
4778 mdname_t *compnp, *np;
4806 np = nlp->namep;
4808 if (metachkmeta(np, ep) != 0) {
4814 if ((msp = meta_get_sp(sp, np, ep)) == NULL) {
4829 if (meta_sp_reset_common(sp, np, msp, reset_params,
4848 * np - the name of the device to attach to
4862 mdname_t *np,
4883 assert(sp->setno == MD_MIN2SET(meta_getminor(np->dev)));
4886 if (metachkmeta(np, ep) != 0)
4890 return (mdmderror(ep, MDE_SP_BAD_LENGTH, 0, np->cname));
4893 if ((mp = (mp_unit_t *)meta_get_mdunit(sp, np, ep)) == NULL)
4899 return (mdmderror(ep, MDE_INVAL_UNIT, 0, np->cname));
4934 return (mdmderror(ep, MDE_NOT_SP, 0, np->cname));
4975 numexts = meta_sp_alloc_by_len(sp, np, &extlist, &grow_len,
4982 return (mdmderror(ep, MDE_SP_NOSPACE, 0, np->cname));
4986 if ((new_un = meta_sp_updateunit(np, mp, extlist,
4998 np->cname);
5025 np->cname) != 0) {
5032 if ((msp = meta_get_sp(sp, np, ep)) == NULL)
5042 meta_invalidate_name(np);
5047 np->cname);
5604 mdname_t *np,
5620 count = meta_sp_get_by_component(sp, np, &spnlp, 0, ep);
5625 metagetsize(np, ep) - MD_SP_WMSIZE, MD_SP_WMSIZE,
5635 meta_sp_list_freefill(&unitlist, metagetsize(np, ep));
5637 if (meta_sp_extlist_from_wm(sp, np, &wmlist,
5658 "allocations match extent headers.\n"), np->cname);
5685 if (meta_sp_validate_exts(np, wmext, unitext, ep) < 0)
5706 "the metadb\n\n"), np->cname);
5713 "headers\n\n"), np->cname);
5721 "header configuration\n"), np->cname);
5725 "header configuration\n"), np->cname);
5926 mdname_t *np;
6155 np = metamnumname(&sp, MD_SID(un_array[i]), 0, ep);
6193 np->cname) != 0) {
6201 np->cname);
6250 if ((msp = meta_get_sp(sp, np, ep)) == NULL) {
6254 np->cname);
6261 "on disk.\n"), np->cname);
6320 mdname_t *np = p->namep;
6324 send_params.delkeyname_dev = np->dev;
6326 send_params.delkeyname_key = np->key;
6581 mdname_t *np;
6582 np = metamnumname(&sp, meta_getminor(devnp->dev), 0,
6584 if (np) {
6586 "Unable to get tstate for %s"), np->cname);
6712 mdname_t *np,
6731 if ((msp = meta_get_sp_common(sp, np, 0, ep)) == NULL)
6734 if ((miscname = metagetmiscname(np, ep)) == NULL)
6741 np->cname, msp->compnamep->cname, msp->compnamep->key,
6752 mgd.mnum = meta_getminor(np->dev);
6757 if (metaioctl(MD_IOCGET_DEVS, &mgd, &mgd.mde, np->cname) != 0) {