Lines Matching refs:fhrecp

87 static void debug_print_fhlist(FILE *fp, fhlist_ent *fhrecp);
88 static void debug_print_linkinfo(FILE *fp, linkinfo_ent *fhrecp);
100 fhlist_ent *fhrecp, char *str);
104 char *name, fhandle_t *fh, uint_t flags, fhlist_ent *fhrecp,
107 char *name, fhandle_t *fh, uint_t flags, fhlist_ent *fhrecp,
114 fhlist_ent *fhrecp, linkinfo_ent *linkp, int *errorp);
116 char *name, fhlist_ent *fhrecp, int *errorp);
118 fhandle_t *fh, fhlist_ent *fhrecp);
126 linkinfo_ent *dellinkp, linkinfo_ent *nextlinkp, fhlist_ent *fhrecp);
420 debug_print_fhlist(FILE *fp, fhlist_ent *fhrecp) in debug_print_fhlist() argument
422 if (fhrecp == NULL) in debug_print_fhlist()
425 debug_opaque_print(fp, (void *)&fhrecp->fh, sizeof (fhrecp->fh)); in debug_print_fhlist()
426 (void) fprintf(fp, "name '%s', dfh: ", fhrecp->name); in debug_print_fhlist()
427 debug_opaque_print(fp, (void *)&fhrecp->dfh, sizeof (fhrecp->dfh)); in debug_print_fhlist()
429 fhrecp->mtime, fhrecp->atime, fhrecp->flags, fhrecp->reclen); in debug_print_fhlist()
616 fhlist_ent *fhrecp, char *str) in db_update_fhrec() argument
620 if (difftime(cur_time, fhrecp->atime) >= mapping_update_interval) { in db_update_fhrec()
621 fhrecp->atime = cur_time; in db_update_fhrec()
623 fhrecp, fhrecp->reclen, str)); in db_update_fhrec()
655 fhandle_t *fh, uint_t flags, fhlist_ent *fhrecp, int *errorp) in create_primary_struct() argument
658 fhlist_ent *new_fhrecp = fhrecp; in create_primary_struct()
662 if (fhrecp == NULL) { /* allocated the memory */ in create_primary_struct()
691 if (fhrecp == NULL) /* caller did not supply pointer */ in create_primary_struct()
709 uint_t flags, fhlist_ent *fhrecp, int *errorp) in db_add_primary() argument
718 new_fhrecp = fetch_record(dbp, fhkey, fh->fh_len, (void *)fhrecp, in db_add_primary()
732 fhrecp, errorp); in db_add_primary()
841 fhlist_ent *fhrecp, linkinfo_ent *linkp, int *errorp) in add_mc_path() argument
848 linksize = fill_link_key(linkkey, &fhrecp->dfh, fhrecp->name); in add_mc_path()
904 fhlist_ent *fhrecp, int *errorp) in create_link_struct() argument
928 len = fill_link_key(LN_FHKEY(linkp), &fhrecp->fh, name); in create_link_struct()
929 linkp->name_offset = linkp->fhkey_offset + fhrecp->fh.fh_len; in create_link_struct()
938 if (memcmp(&fhrecp->dfh, dfh, sizeof (*dfh)) || in create_link_struct()
939 strcmp(fhrecp->name, name)) { in create_link_struct()
943 if (memcmp(&fhrecp->fh, &public_fh, in create_link_struct()
946 add_mc_path(dbp, dfh, name, fhrecp, linkp, in create_link_struct()
956 len = fill_link_key(LN_NEXT(linkp), &fhrecp->dfh, in create_link_struct()
957 fhrecp->name); in create_link_struct()
989 fhandle_t *fh, fhlist_ent *fhrecp) in db_add_secondary() argument
995 fhlist_ent *new_fhrecp = fhrecp; in db_add_secondary()
1002 if (fhrecp == NULL) { in db_add_secondary()
1016 if (fhrecp == NULL) { in db_add_secondary()
1049 } else if (fhrecp == NULL) { in db_add_secondary()
1235 linkinfo_ent *nextlinkp, fhlist_ent *fhrecp) in db_update_primary_new_head() argument
1245 if (memcmp(&fhrecp->dfh, dfh, sizeof (*dfh)) || in db_update_primary_new_head()
1246 strcmp(fhrecp->name, name)) { in db_update_primary_new_head()
1253 (void) fprintf(stderr, "], not [%s,", fhrecp->name); in db_update_primary_new_head()
1254 debug_opaque_print(stderr, (void *)&fhrecp->dfh, in db_update_primary_new_head()
1255 sizeof (fhrecp->dfh)); in db_update_primary_new_head()
1261 bcopy(&fhrecp->fh.fh_data, fhkey, fhrecp->fh.fh_len); in db_update_primary_new_head()
1266 fhkey, fhrecp->fh.fh_len, in db_update_primary_new_head()
1274 fhrecp->reclen = ROUNDUP32(offsetof(fhlist_ent, name) + in db_update_primary_new_head()
1277 (void) memcpy(&fhrecp->dfh, &nextlinkp->dfh, in db_update_primary_new_head()
1279 (void) strcpy(fhrecp->name, next_name); in db_update_primary_new_head()
1282 fhrecp->mtime = time(0); in db_update_primary_new_head()
1283 fhrecp->atime = fhrecp->mtime; in db_update_primary_new_head()
1285 fhkey, fhrecp->fh.fh_len, fhrecp, in db_update_primary_new_head()
1286 fhrecp->reclen, "db_update_primary_new_head: fh"); in db_update_primary_new_head()
1306 fhlist_ent fhrec, *fhrecp; in db_add() local
1323 fhrecp = db_add_primary(dbp, dfh, name, fh, flags, in db_add()
1325 if (fhrecp == NULL) { in db_add()
1337 while ((fhrecp != NULL) && strcmp(name, fhrecp->name)) { in db_add()
1340 fhrecp->name); in db_add()
1341 fhrecp = db_add_primary(dbp, dfh, name, fh, in db_add()
1344 if (fhrecp == NULL) { in db_add()
1348 error = db_add_secondary(dbp, dfh, name, fh, fhrecp); in db_add()
1349 if (fhrecp != &fhrec) { in db_add()
1350 free(fhrecp); in db_add()
1361 db_lookup(char *fhpath, fhandle_t *fh, fhlist_ent *fhrecp, int *errorp) in db_lookup() argument
1382 fhrecp = fetch_record(dbp, fhkey, fh->fh_len, fhrecp, in db_lookup()
1385 if (fhrecp != NULL) { in db_lookup()
1386 *errorp = db_update_fhrec(dbp, fhkey, fh->fh_len, fhrecp, in db_lookup()
1389 return (fhrecp); in db_lookup()
1398 db_lookup_link(char *fhpath, fhandle_t *dfh, char *name, fhlist_ent *fhrecp, in db_lookup_link() argument
1431 fhrecp = fetch_record(dbp, fhkey, fhkeysize, in db_lookup_link()
1432 (void *)fhrecp, errorp, "db_lookup_link fh"); in db_lookup_link()
1434 if (fhrecp != NULL) { in db_lookup_link()
1435 *errorp = db_update_fhrec(dbp, fhkey, fhkeysize, fhrecp, in db_lookup_link()
1443 fhrecp = NULL; in db_lookup_link()
1445 return (fhrecp); in db_lookup_link()
1461 fhlist_ent *fhrecp, fhrec; in delete_link_by_key() local
1511 fhrecp = fetch_record(dbp, fhkey, fhkeysize, in delete_link_by_key()
1513 if (fhrecp == NULL) { in delete_link_by_key()
1524 nextlinkp, fhrecp); in delete_link_by_key()
1527 *errorp = db_update_fhrec(dbp, fhkey, fhkeysize, fhrecp, in delete_link_by_key()
1637 fhlist_ent fhrec, *fhrecp; in db_rename_link() local
1651 fhrecp = db_lookup_link(fhpath, from_dfh, from_name, &fhrec, in db_rename_link()
1653 if (fhrecp == NULL) { in db_rename_link()
1660 error = db_add(fhpath, to_dfh, to_name, &fhrecp->fh, in db_rename_link()
1661 fhrecp->flags); in db_rename_link()