Lines Matching refs:linkp

104 	linkinfo_ent *linkp, char *str);
112 int *linksizep, linkinfo_ent *linkp, void **cookiep,
116 fhlist_ent *fhrecp, linkinfo_ent *linkp, int *errorp);
404 debug_print_linkinfo(FILE *fp, linkinfo_ent *linkp) in debug_print_linkinfo() argument
406 if (linkp == NULL) in debug_print_linkinfo()
409 debug_opaque_print(fp, (void *)&linkp->dfh, sizeof (linkp->dfh)); in debug_print_linkinfo()
410 (void) fprintf(fp, "\nname: '%s'", LN_NAME(linkp)); in debug_print_linkinfo()
412 linkp->mtime, linkp->atime, linkp->flags, linkp->reclen); in debug_print_linkinfo()
414 linkp->fhkey_offset, linkp->name_offset, linkp->next_offset, in debug_print_linkinfo()
415 linkp->prev_offset); in debug_print_linkinfo()
416 debug_print_key(fp, "fhkey", "", LN_FHKEY(linkp), LN_FHKEY_LEN(linkp)); in debug_print_linkinfo()
417 debug_print_key(fp, "next", "", LN_NEXT(linkp), LN_NEXT_LEN(linkp)); in debug_print_linkinfo()
418 debug_print_key(fp, "prev", "", LN_PREV(linkp), LN_PREV_LEN(linkp)); in debug_print_linkinfo()
636 linkinfo_ent *linkp, char *str) in db_update_linkinfo() argument
640 if (difftime(cur_time, linkp->atime) >= mapping_update_interval) { in db_update_linkinfo()
641 linkp->atime = cur_time; in db_update_linkinfo()
643 linkp, linkp->reclen, str)); in db_update_linkinfo()
759 linkinfo_ent *linkp, void **cookiep, int *errorp, char *msg) in get_next_link() argument
763 linkinfo_ent *new_linkp = linkp; in get_next_link()
770 new_linkp = fetch_record(dbp, linkkey, linksize, (void *)linkp, in get_next_link()
784 if ((new_linkp != NULL) && (linkp == NULL)) in get_next_link()
843 fhlist_ent *fhrecp, linkinfo_ent *linkp, int *errorp) in add_mc_path() argument
870 linkp->prev_offset = linkp->next_offset; /* aligned */ in add_mc_path()
871 linksize = fill_link_key(LN_PREV(linkp), &lastlinkp->dfh, in add_mc_path()
873 linkp->reclen = linkp->prev_offset + linksize; /* aligned */ in add_mc_path()
878 linkp, linkp->reclen, "add_mc_path"); in add_mc_path()
910 linkinfo_ent *linkp; in create_link_struct() local
912 if ((linkp = malloc(sizeof (linkinfo_ent))) == NULL) { in create_link_struct()
920 linkp->flags |= PUBLIC_PATH; in create_link_struct()
922 linkp->flags &= ~PUBLIC_PATH; in create_link_struct()
923 (void) memcpy(&linkp->dfh, dfh, sizeof (*dfh)); in create_link_struct()
924 linkp->mtime = time(0); in create_link_struct()
925 linkp->atime = linkp->mtime; in create_link_struct()
929 linkp->fhkey_offset = ROUNDUP32(offsetof(linkinfo_ent, varbuf)); in create_link_struct()
930 len = fill_link_key(LN_FHKEY(linkp), &fhrecp->fh, name); in create_link_struct()
931 linkp->name_offset = linkp->fhkey_offset + fhrecp->fh.fh_len; in create_link_struct()
932 linkp->next_offset = linkp->fhkey_offset + len; /* aligned */ in create_link_struct()
948 add_mc_path(dbp, dfh, name, fhrecp, linkp, in create_link_struct()
951 free(linkp); in create_link_struct()
954 return (linkp); in create_link_struct()
958 len = fill_link_key(LN_NEXT(linkp), &fhrecp->dfh, in create_link_struct()
966 linkp->prev_offset = linkp->next_offset + len; /* aligned */ in create_link_struct()
967 linkp->reclen = linkp->prev_offset; in create_link_struct()
971 *errorp = store_record(dbp, linkkey, linksize, linkp, linkp->reclen, in create_link_struct()
974 free(linkp); in create_link_struct()
977 return (linkp); in create_link_struct()
1405 linkinfo_ent *linkp; in db_lookup_link() local
1427 linkp = fetch_record(dbp, linkkey, linksize, NULL, errorp, in db_lookup_link()
1429 if (linkp != NULL) { in db_lookup_link()
1431 fhkeysize = LN_FHKEY_LEN(linkp); in db_lookup_link()
1432 fhkey = LN_FHKEY(linkp); in db_lookup_link()
1441 *errorp = db_update_linkinfo(dbp, linkkey, linksize, linkp, in db_lookup_link()
1443 free(linkp); in db_lookup_link()
1751 linkinfo_ent *linkp, link_st; in links_timedout() local
1760 linkp = get_next_link(pdb, linkkey, &linksize, &link_st, in links_timedout()
1762 if ((linkp != NULL) && in links_timedout()
1763 (difftime(ts, linkp->atime) <= prune_timeout)) { in links_timedout()
1773 if (difftime(pfe->atime, linkp->atime) < 0) { in links_timedout()
1775 pfe->atime = linkp->atime; in links_timedout()