Lines Matching refs:fhrecp

89 static void debug_print_fhlist(FILE *fp, fhlist_ent *fhrecp);
90 static void debug_print_linkinfo(FILE *fp, linkinfo_ent *fhrecp);
102 fhlist_ent *fhrecp, char *str);
106 char *name, fhandle_t *fh, uint_t flags, fhlist_ent *fhrecp,
109 char *name, fhandle_t *fh, uint_t flags, fhlist_ent *fhrecp,
116 fhlist_ent *fhrecp, linkinfo_ent *linkp, int *errorp);
118 char *name, fhlist_ent *fhrecp, int *errorp);
120 fhandle_t *fh, fhlist_ent *fhrecp);
128 linkinfo_ent *dellinkp, linkinfo_ent *nextlinkp, fhlist_ent *fhrecp);
422 debug_print_fhlist(FILE *fp, fhlist_ent *fhrecp) in debug_print_fhlist() argument
424 if (fhrecp == NULL) in debug_print_fhlist()
427 debug_opaque_print(fp, (void *)&fhrecp->fh, sizeof (fhrecp->fh)); in debug_print_fhlist()
428 (void) fprintf(fp, "name '%s', dfh: ", fhrecp->name); in debug_print_fhlist()
429 debug_opaque_print(fp, (void *)&fhrecp->dfh, sizeof (fhrecp->dfh)); in debug_print_fhlist()
431 fhrecp->mtime, fhrecp->atime, fhrecp->flags, fhrecp->reclen); in debug_print_fhlist()
618 fhlist_ent *fhrecp, char *str) in db_update_fhrec() argument
622 if (difftime(cur_time, fhrecp->atime) >= mapping_update_interval) { in db_update_fhrec()
623 fhrecp->atime = cur_time; in db_update_fhrec()
625 fhrecp, fhrecp->reclen, str)); in db_update_fhrec()
657 fhandle_t *fh, uint_t flags, fhlist_ent *fhrecp, int *errorp) in create_primary_struct() argument
660 fhlist_ent *new_fhrecp = fhrecp; in create_primary_struct()
664 if (fhrecp == NULL) { /* allocated the memory */ in create_primary_struct()
693 if (fhrecp == NULL) /* caller did not supply pointer */ in create_primary_struct()
711 uint_t flags, fhlist_ent *fhrecp, int *errorp) in db_add_primary() argument
720 new_fhrecp = fetch_record(dbp, fhkey, fh->fh_len, (void *)fhrecp, in db_add_primary()
734 fhrecp, errorp); in db_add_primary()
843 fhlist_ent *fhrecp, linkinfo_ent *linkp, int *errorp) in add_mc_path() argument
850 linksize = fill_link_key(linkkey, &fhrecp->dfh, fhrecp->name); in add_mc_path()
906 fhlist_ent *fhrecp, int *errorp) in create_link_struct() argument
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()
940 if (memcmp(&fhrecp->dfh, dfh, sizeof (*dfh)) || in create_link_struct()
941 strcmp(fhrecp->name, name)) { in create_link_struct()
945 if (memcmp(&fhrecp->fh, &public_fh, in create_link_struct()
948 add_mc_path(dbp, dfh, name, fhrecp, linkp, in create_link_struct()
958 len = fill_link_key(LN_NEXT(linkp), &fhrecp->dfh, in create_link_struct()
959 fhrecp->name); in create_link_struct()
991 fhandle_t *fh, fhlist_ent *fhrecp) in db_add_secondary() argument
997 fhlist_ent *new_fhrecp = fhrecp; in db_add_secondary()
1004 if (fhrecp == NULL) { in db_add_secondary()
1018 if (fhrecp == NULL) { in db_add_secondary()
1051 } else if (fhrecp == NULL) { in db_add_secondary()
1237 linkinfo_ent *nextlinkp, fhlist_ent *fhrecp) in db_update_primary_new_head() argument
1247 if (memcmp(&fhrecp->dfh, dfh, sizeof (*dfh)) || in db_update_primary_new_head()
1248 strcmp(fhrecp->name, name)) { in db_update_primary_new_head()
1255 (void) fprintf(stderr, "], not [%s,", fhrecp->name); in db_update_primary_new_head()
1256 debug_opaque_print(stderr, (void *)&fhrecp->dfh, in db_update_primary_new_head()
1257 sizeof (fhrecp->dfh)); in db_update_primary_new_head()
1263 bcopy(&fhrecp->fh.fh_data, fhkey, fhrecp->fh.fh_len); in db_update_primary_new_head()
1268 fhkey, fhrecp->fh.fh_len, in db_update_primary_new_head()
1276 fhrecp->reclen = ROUNDUP32(offsetof(fhlist_ent, name) + in db_update_primary_new_head()
1279 (void) memcpy(&fhrecp->dfh, &nextlinkp->dfh, in db_update_primary_new_head()
1281 (void) strcpy(fhrecp->name, next_name); in db_update_primary_new_head()
1284 fhrecp->mtime = time(0); in db_update_primary_new_head()
1285 fhrecp->atime = fhrecp->mtime; in db_update_primary_new_head()
1287 fhkey, fhrecp->fh.fh_len, fhrecp, in db_update_primary_new_head()
1288 fhrecp->reclen, "db_update_primary_new_head: fh"); in db_update_primary_new_head()
1308 fhlist_ent fhrec, *fhrecp; in db_add() local
1325 fhrecp = db_add_primary(dbp, dfh, name, fh, flags, in db_add()
1327 if (fhrecp == NULL) { in db_add()
1339 while ((fhrecp != NULL) && strcmp(name, fhrecp->name)) { in db_add()
1342 fhrecp->name); in db_add()
1343 fhrecp = db_add_primary(dbp, dfh, name, fh, in db_add()
1346 if (fhrecp == NULL) { in db_add()
1350 error = db_add_secondary(dbp, dfh, name, fh, fhrecp); in db_add()
1351 if (fhrecp != &fhrec) { in db_add()
1352 free(fhrecp); in db_add()
1363 db_lookup(char *fhpath, fhandle_t *fh, fhlist_ent *fhrecp, int *errorp) in db_lookup() argument
1384 fhrecp = fetch_record(dbp, fhkey, fh->fh_len, fhrecp, in db_lookup()
1387 if (fhrecp != NULL) { in db_lookup()
1388 *errorp = db_update_fhrec(dbp, fhkey, fh->fh_len, fhrecp, in db_lookup()
1391 return (fhrecp); in db_lookup()
1400 db_lookup_link(char *fhpath, fhandle_t *dfh, char *name, fhlist_ent *fhrecp, in db_lookup_link() argument
1433 fhrecp = fetch_record(dbp, fhkey, fhkeysize, in db_lookup_link()
1434 (void *)fhrecp, errorp, "db_lookup_link fh"); in db_lookup_link()
1436 if (fhrecp != NULL) { in db_lookup_link()
1437 *errorp = db_update_fhrec(dbp, fhkey, fhkeysize, fhrecp, in db_lookup_link()
1445 fhrecp = NULL; in db_lookup_link()
1447 return (fhrecp); in db_lookup_link()
1463 fhlist_ent *fhrecp, fhrec; in delete_link_by_key() local
1513 fhrecp = fetch_record(dbp, fhkey, fhkeysize, in delete_link_by_key()
1515 if (fhrecp == NULL) { in delete_link_by_key()
1526 nextlinkp, fhrecp); in delete_link_by_key()
1529 *errorp = db_update_fhrec(dbp, fhkey, fhkeysize, fhrecp, in delete_link_by_key()
1639 fhlist_ent fhrec, *fhrecp; in db_rename_link() local
1653 fhrecp = db_lookup_link(fhpath, from_dfh, from_name, &fhrec, in db_rename_link()
1655 if (fhrecp == NULL) { in db_rename_link()
1662 error = db_add(fhpath, to_dfh, to_name, &fhrecp->fh, in db_rename_link()
1663 fhrecp->flags); in db_rename_link()