Lines Matching defs: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)
424 if (fhrecp == NULL)
427 debug_opaque_print(fp, (void *)&fhrecp->fh, sizeof (fhrecp->fh));
428 (void) fprintf(fp, "name '%s', dfh: ", fhrecp->name);
429 debug_opaque_print(fp, (void *)&fhrecp->dfh, sizeof (fhrecp->dfh));
431 fhrecp->mtime, fhrecp->atime, fhrecp->flags, fhrecp->reclen);
618 fhlist_ent *fhrecp, char *str)
622 if (difftime(cur_time, fhrecp->atime) >= mapping_update_interval) {
623 fhrecp->atime = cur_time;
625 fhrecp, fhrecp->reclen, str));
651 * If success, return the added database entry. fhrecp may be used to
657 fhandle_t *fh, uint_t flags, fhlist_ent *fhrecp, int *errorp)
660 fhlist_ent *new_fhrecp = fhrecp;
664 if (fhrecp == NULL) { /* allocated the memory */
693 if (fhrecp == NULL) /* caller did not supply pointer */
705 * If success, return the added database entry. fhrecp may be used to
711 uint_t flags, fhlist_ent *fhrecp, int *errorp)
720 new_fhrecp = fetch_record(dbp, fhkey, fh->fh_len, (void *)fhrecp,
734 fhrecp, errorp);
843 fhlist_ent *fhrecp, linkinfo_ent *linkp, int *errorp)
850 linksize = fill_link_key(linkkey, &fhrecp->dfh, fhrecp->name);
906 fhlist_ent *fhrecp, int *errorp)
930 len = fill_link_key(LN_FHKEY(linkp), &fhrecp->fh, name);
931 linkp->name_offset = linkp->fhkey_offset + fhrecp->fh.fh_len;
940 if (memcmp(&fhrecp->dfh, dfh, sizeof (*dfh)) ||
941 strcmp(fhrecp->name, name)) {
945 if (memcmp(&fhrecp->fh, &public_fh,
948 add_mc_path(dbp, dfh, name, fhrecp, linkp,
958 len = fill_link_key(LN_NEXT(linkp), &fhrecp->dfh,
959 fhrecp->name);
985 * If fhrecp is non-null, then fhrecp is the primary record.
991 fhandle_t *fh, fhlist_ent *fhrecp)
997 fhlist_ent *new_fhrecp = fhrecp;
1004 if (fhrecp == NULL) {
1018 if (fhrecp == NULL) {
1051 } else if (fhrecp == NULL) {
1237 linkinfo_ent *nextlinkp, fhlist_ent *fhrecp)
1247 if (memcmp(&fhrecp->dfh, dfh, sizeof (*dfh)) ||
1248 strcmp(fhrecp->name, name)) {
1255 (void) fprintf(stderr, "], not [%s,", fhrecp->name);
1256 debug_opaque_print(stderr, (void *)&fhrecp->dfh,
1257 sizeof (fhrecp->dfh));
1263 bcopy(&fhrecp->fh.fh_data, fhkey, fhrecp->fh.fh_len);
1268 fhkey, fhrecp->fh.fh_len,
1276 fhrecp->reclen = ROUNDUP32(offsetof(fhlist_ent, name) +
1279 (void) memcpy(&fhrecp->dfh, &nextlinkp->dfh,
1281 (void) strcpy(fhrecp->name, next_name);
1284 fhrecp->mtime = time(0);
1285 fhrecp->atime = fhrecp->mtime;
1287 fhkey, fhrecp->fh.fh_len, fhrecp,
1288 fhrecp->reclen, "db_update_primary_new_head: fh");
1308 fhlist_ent fhrec, *fhrecp;
1325 fhrecp = db_add_primary(dbp, dfh, name, fh, flags,
1327 if (fhrecp == NULL) {
1339 while ((fhrecp != NULL) && strcmp(name, fhrecp->name)) {
1342 fhrecp->name);
1343 fhrecp = db_add_primary(dbp, dfh, name, fh,
1346 if (fhrecp == NULL) {
1350 error = db_add_secondary(dbp, dfh, name, fh, fhrecp);
1351 if (fhrecp != &fhrec) {
1352 free(fhrecp);
1363 db_lookup(char *fhpath, fhandle_t *fh, fhlist_ent *fhrecp, int *errorp)
1384 fhrecp = fetch_record(dbp, fhkey, fh->fh_len, fhrecp,
1387 if (fhrecp != NULL) {
1388 *errorp = db_update_fhrec(dbp, fhkey, fh->fh_len, fhrecp,
1391 return (fhrecp);
1400 db_lookup_link(char *fhpath, fhandle_t *dfh, char *name, fhlist_ent *fhrecp,
1433 fhrecp = fetch_record(dbp, fhkey, fhkeysize,
1434 (void *)fhrecp, errorp, "db_lookup_link fh");
1436 if (fhrecp != NULL) {
1437 *errorp = db_update_fhrec(dbp, fhkey, fhkeysize, fhrecp,
1445 fhrecp = NULL;
1447 return (fhrecp);
1463 fhlist_ent *fhrecp, fhrec;
1513 fhrecp = fetch_record(dbp, fhkey, fhkeysize,
1515 if (fhrecp == NULL) {
1526 nextlinkp, fhrecp);
1529 *errorp = db_update_fhrec(dbp, fhkey, fhkeysize, fhrecp,
1639 fhlist_ent fhrec, *fhrecp;
1653 fhrecp = db_lookup_link(fhpath, from_dfh, from_name, &fhrec,
1655 if (fhrecp == NULL) {
1662 error = db_add(fhpath, to_dfh, to_name, &fhrecp->fh,
1663 fhrecp->flags);