Lines Matching defs:nh

97 create_key(struct nm_next_hdr *nh)
100 struct nm_rec_hdr *rh = (struct nm_rec_hdr *)nh->nmn_record;
110 unused_key(struct nm_next_hdr *nh, int shared, mdkey_t key)
127 if ((shared & NM_SHARED) && (lookup_shared_entry(nh, key, (char *)0,
136 (lookup_entry(nh, 0, -1, key, NODEV64, 0L) != NULL))
143 destroy_key(struct nm_next_hdr *nh, int shared, mdkey_t key)
145 struct nm_rec_hdr *rh = (struct nm_rec_hdr *)nh->nmn_record;
158 while (unused_key(nh, shared, key))
250 struct nm_next_hdr *nh, /* parent record header */
254 struct nm_rec_hdr *rh = (struct nm_rec_hdr *)nh->nmn_record;
300 nh->nmn_nextp = new_nh;
315 struct nm_next_hdr *nh, /* record hdr to be expanded */
318 struct nm_rec_hdr *rh = (struct nm_rec_hdr *)nh->nmn_record;
361 nh->nmn_record = new_rec;
390 struct nm_next_hdr *nh;
407 nh = ((shared & NM_SHARED) ?
422 nh = ((shared & NM_SHARED) ?
433 if (nh->nmn_nextp != NULL)
434 return (nh);
445 if (create_record(nmid, nh, shared, 0L) < 0)
448 return (nh);
454 struct nm_next_hdr *nh, /* parent name header */
485 while ((this_nh = nh->nmn_nextp) != NULL) {
487 rh = (struct nm_rec_hdr *)nh->nmn_record;
516 if (expand_record(nh, recid, this_nh, shared) == 0)
521 nh = this_nh;
525 if (create_record(recid, nh, shared, 0L) < 0)
534 struct nm_next_hdr *nh,
540 if (((struct nm_rec_hdr *)nh->nmn_record)->r_used_size <=
542 if (nh->nmn_nextp == NULL)
556 struct nm_next_hdr *nh, /* record header for entry being removed */
566 nh->nmn_record)->r_used_size - offset -
591 ((struct nm_rec_hdr *)nh->nmn_record)->r_used_size -= (uint_t)ent_size;
605 struct nm_next_hdr *nh, /* record header for entry being removed */
616 nh->nmn_record)->r_used_size - offset -
650 ((struct nm_rec_hdr *)nh->nmn_record)->r_used_size -=
663 struct nm_next_hdr *nh;
679 * If devid_nm is not NULL, nh will point to the did name space
682 if ((nh = get_first_record(setno, 0, devid_nm | NM_SHARED))
686 if ((nh = get_first_record(setno, 1, devid_nm | NM_SHARED))
698 did_shn = (struct did_shr_name *)lookup_shared_entry(nh,
703 did_shn = (struct did_shr_name *)lookup_shared_entry(nh,
715 if ((did_shn = (struct did_shr_name *)alloc_entry(nh,
719 did_shn->did_key = create_key(nh);
729 if ((shn = (struct nm_shared_name *)lookup_shared_entry(nh,
739 if ((shn = (struct nm_shared_name *)alloc_entry(nh,
742 shn->sn_key = create_key(nh);
763 struct nm_next_hdr *nh;
766 if ((nh = get_first_record(setno, 0, devid_nm | NM_SHARED)) == NULL)
770 lookup_shared_entry(nh, shrkey, (char *)0, &recid, devid_nm) :
771 lookup_shared_entry(nh, shrkey, (char *)0, &recid, 0L));
784 struct nm_next_hdr *nh;
788 if ((nh = get_first_record(setno, 1, devid_nm | NM_SHARED)) == NULL)
791 shn = (char *)lookup_shared_entry(nh, 0, shrname, &recid, devid_nm);
805 struct nm_next_hdr *nh;
808 if ((nh = get_first_record(setno, 0, NM_SHARED)) == NULL)
811 shn = (struct nm_shared_name *)lookup_shared_entry(nh, shrkey,
821 struct nm_next_hdr *nh, /* head record header */
826 struct nm_rec_hdr *rh = (struct nm_rec_hdr *)nh->nmn_record;
827 struct nm_next_hdr *this_nh = nh->nmn_nextp;
895 struct nm_next_hdr *nh, /* head record header */
900 struct nm_rec_hdr *rh = (struct nm_rec_hdr *)nh->nmn_record;
901 struct nm_next_hdr *this_nh = nh->nmn_nextp;
967 struct nm_next_hdr *nh, /* first record header to start lookup */
973 struct nm_rec_hdr *rh = (struct nm_rec_hdr *)nh->nmn_record;
974 struct nm_next_hdr *this_nh = nh->nmn_nextp;
1102 struct nm_next_hdr *nh, /* head record header */
1110 struct nm_next_hdr *this_nh = nh->nmn_nextp;
1208 struct nm_next_hdr *nh;
1211 if ((nh = get_first_record(setno, 0, NM_SHARED)) == NULL)
1213 if ((shn = (struct nm_shared_name *)lookup_shared_entry(nh,
1228 struct nm_next_hdr *nh, /* head record header */
1239 struct nm_next_hdr *this_nh = nh->nmn_nextp;
1379 struct nm_next_hdr *nh, /* First record header to start lookup */
1387 struct nm_rec_hdr *rh = (struct nm_rec_hdr *)nh->nmn_record;
1388 struct nm_next_hdr *this_nh = nh->nmn_nextp;
1517 struct nm_next_hdr *nh, /* head record header */
1524 struct nm_next_hdr *this_nh = nh->nmn_nextp;
1659 build_rec_hdr_list(struct nm_next_hdr *nh, mddb_recid_t recid, int shared)
1664 struct nm_rec_hdr *rh = (struct nm_rec_hdr *)nh->nmn_record;
1689 nh->nmn_nextp = this_nh;
1719 nh->nmn_nextp = NULL;
1729 nh = this_nh;
1734 zero_data_ptrs(struct nm_next_hdr *nh, set_t setno)
1737 struct nm_rec_hdr *rh = (struct nm_rec_hdr *)nh->nmn_record;
1764 struct nm_next_hdr *nh, *did_nh = NULL;
1922 if ((nh = get_first_record(setno, 1, NM_NOTSHARED)) == NULL) {
1958 lookup_res = lookup_deventry(nh, setno, side, key, drvnm, mnum, dname,
2006 (void) update_entry(nh, n->n_side, n->n_key, 0L);
2041 n = (struct nm_name *)alloc_entry(nh, md_set[setno].s_nmid,
2049 n->n_key = ((key == MD_KEYWILD) ? create_key(nh) : key);
2066 (void) remove_entry(nh, n->n_side, n->n_key, 0L);
2081 (void) remove_entry(nh, n->n_side, n->n_key,
2153 (void) remove_entry(nh, n->n_side, n->n_key, 0L);
2203 (void) remove_entry(nh, n->n_side, n->n_key,
2237 struct nm_next_hdr *did_shr_nh, *did_nh = NULL, *nh = NULL;
2280 nh = get_first_record(setno, 0, NM_NOTSHARED);
2281 if (nh == NULL) {
2320 nh, setno, side, key, NODEV64, 0L);
2368 struct nm_next_hdr *nh = NULL;
2410 nh = get_first_record(setno, 0, NM_NOTSHARED);
2411 if (nh == NULL) {
2449 nh, setno, side, key, NODEV64, 0L);
2503 struct nm_next_hdr *nh;
2528 if ((nh = get_first_record(setno, 0, NM_NOTSHARED)) == NULL) {
2533 if ((n = (struct nm_name *)lookup_entry(nh, setno, side, key,
2562 struct nm_next_hdr *nh;
2582 if ((nh = get_first_record(setno, 0, NM_NOTSHARED)) == NULL) {
2587 if ((n = (struct nm_name *)lookup_hspentry(nh, setno, side,
2642 struct nm_next_hdr *nh;
2658 if ((nh = get_first_record(setno, 0, NM_DEVID| NM_NOTSHARED)) == NULL) {
2666 if (lookup_entry(nh, setno, side, key, NODEV64, NM_DEVID) == NULL) {
2692 struct nm_next_hdr *nh;
2710 if ((nh = get_first_record(setno, 0, NM_NOTSHARED)) == NULL) {
2722 ((struct nm_rec_hdr *)nh->nmn_record)->r_next_key; keynum++) {
2723 if ((n = (struct nm_name *)lookup_entry(nh, setno, side,
2760 struct nm_next_hdr *nh;
2778 if ((nh = get_first_record(setno, 0, NM_NOTSHARED)) == NULL) {
2783 if ((n = (struct nm_name *)lookup_entry(nh, setno, side, key,
2821 struct nm_next_hdr *nh, *did_shr_nh, *did_nh = NULL;
2881 if (((nh = get_first_record(setno, 0, NM_NOTSHARED)) == NULL) ||
2882 ((n = (struct nm_name *)lookup_entry(nh, setno, side, key,
3053 (void) update_entry(nh, side, key, 0L);
3158 struct nm_next_hdr *nh;
3177 if ((nh = get_first_record(setno, 0, NM_NOTSHARED)) == NULL) {
3182 for (key++; key < ((struct nm_rec_hdr *)nh->nmn_record)->r_next_key;
3184 if ((n = (struct nm_name *)lookup_entry(nh, setno, side, key,
3322 struct nm_next_hdr *nh;
3339 if ((nh = get_first_record(setno, 0, NM_NOTSHARED)) == NULL ||
3345 if ((n = (struct nm_name *)lookup_entry(nh, setno, side, key, NODEV64,
3367 (void) remove_entry(nh, n->n_side, n->n_key, 0L | NM_KEY_RECYCLE);
3410 n = (struct nm_name *)alloc_entry(nh, md_set[setno].s_nmid,
3452 struct nm_next_hdr *nh;
3473 if ((nh = get_first_record(setno, 0, NM_DEVID | NM_NOTSHARED))
3479 if ((n = (struct did_min_name *)lookup_entry(nh, setno, side, key,
3512 struct nm_next_hdr *nh;
3534 if ((nh = get_first_record(setno, 0, NM_DEVID | NM_NOTSHARED))
3540 if ((n = (struct did_min_name *)lookup_entry(nh, setno, side, key,
3549 if ((nh = get_first_record(setno, 0, NM_DEVID | NM_SHARED)) == NULL) {
3554 if ((n = (struct did_shr_name *)lookup_shared_entry(nh,
3586 struct nm_next_hdr *nh, *did_nh;
3608 if (((nh = get_first_record(setno, 0, NM_NOTSHARED)) == NULL) ||
3617 if ((n = (struct nm_name *)lookup_entry(nh, setno, side, key, NODEV64,
3639 err = update_entry(nh, side, key, 0L);
3657 if (remove_entry(nh, side, key, 0L)) {
3758 struct nm_next_hdr *nh;
3775 if ((nh = get_first_record(setno, 0, NM_SHARED)) == NULL) {
3780 if (remove_shared_entry(nh, shrkey, (char *)0, 0L)) {
3915 struct nm_next_hdr *nh, *nnh;
3951 for (nh = hhdr->hh_names.nmn_nextp; nh; nh = nnh) {
3952 nnh = nh->nmn_nextp;
3953 kmem_free(nh, sizeof (*nh));
3956 for (nh = hhdr->hh_shared.nmn_nextp; nh; nh = nnh) {
3957 nnh = nh->nmn_nextp;
3958 kmem_free(nh, sizeof (*nh));
3980 struct nm_next_hdr *nh;
3995 if ((nh = get_first_record(setno, 0, NM_NOTSHARED)) == NULL) {
4006 if ((n = (struct nm_name *)lookup_entry(nh, setno, side, key,
4174 struct nm_next_hdr *nh, *did_nh, *this_nh, *did_shr_nh;
4185 if (((nh = get_first_record(setno, 0, NM_NOTSHARED)) == NULL) ||
4220 (lookup_entry(nh, setno, MD_SIDEWILD, did_n->min_key,
4273 struct nm_next_hdr *nh, *did_nh;
4291 if (((nh = get_first_record(setno, 0, NM_NOTSHARED)) == NULL) ||
4292 ((n = (struct nm_name *)lookup_entry(nh, setno, MD_SIDEWILD,
4355 (void) update_entry(nh, MD_SIDEWILD,