Lines Matching defs:fh

106 	char *name, fhandle_t *fh, uint_t flags, fhlist_ent *fhrecp,
109 char *name, fhandle_t *fh, uint_t flags, fhlist_ent *fhrecp,
120 fhandle_t *fh, fhlist_ent *fhrecp);
195 * Create a link key given directory fh and name
427 debug_opaque_print(fp, (void *)&fhrecp->fh, sizeof (fhrecp->fh));
657 fhandle_t *fh, uint_t flags, fhlist_ent *fhrecp, int *errorp)
674 (void) memcpy(&new_fhrecp->fh, fh, sizeof (*fh));
689 *errorp = store_record(dbp, &fh->fh_data, fh->fh_len, new_fhrecp,
710 db_add_primary(struct db_list *dbp, fhandle_t *dfh, char *name, fhandle_t *fh,
719 bcopy(&fh->fh_data, fhkey, fh->fh_len);
720 new_fhrecp = fetch_record(dbp, fhkey, fh->fh_len, (void *)fhrecp,
725 *errorp = db_update_fhrec(dbp, fhkey, fh->fh_len, new_fhrecp,
733 new_fhrecp = create_primary_struct(dbp, dfh, name, fh, flags,
930 len = fill_link_key(LN_FHKEY(linkp), &fhrecp->fh, name);
931 linkp->name_offset = linkp->fhkey_offset + fhrecp->fh.fh_len;
944 /* parent is public fh - either multi-comp or root */
945 if (memcmp(&fhrecp->fh, &public_fh,
991 fhandle_t *fh, fhlist_ent *fhrecp)
1003 bcopy(&fh->fh_data, fhkey, fh->fh_len);
1006 new_fhrecp = fetch_record(dbp, fhkey, fh->fh_len, NULL,
1013 error = db_update_fhrec(dbp, fhkey, fh->fh_len, new_fhrecp,
1043 new_fhrecp = create_primary_struct(dbp, dfh, name, fh, fhflags,
1263 bcopy(&fhrecp->fh.fh_data, fhkey, fhrecp->fh.fh_len);
1268 fhkey, fhrecp->fh.fh_len,
1269 "db_update_primary_new_head: fh delete");
1287 fhkey, fhrecp->fh.fh_len, fhrecp,
1288 fhrecp->reclen, "db_update_primary_new_head: fh");
1297 * db_add - add record to the database. If dfh, fh and name are all here,
1298 * add both primary and secondary records. If fh is not available, don't
1301 * for fh is already in.
1305 db_add(char *fhpath, fhandle_t *dfh, char *name, fhandle_t *fh, uint_t flags)
1311 if (fh == NULL) {
1315 if (fh == &public_fh) {
1318 dbp = db_get_db(fhpath, &fh->fh_fsid, &error, O_CREAT);
1320 for (; dbp != NULL; dbp = ((fh != &public_fh) ? NULL : dbp->next)) {
1325 fhrecp = db_add_primary(dbp, dfh, name, fh, flags,
1338 if (fh == &public_fh) {
1340 /* Replace the public fh rather than add link */
1343 fhrecp = db_add_primary(dbp, dfh, name, fh,
1350 error = db_add_secondary(dbp, dfh, name, fh, fhrecp);
1359 * db_lookup - search the database for the file identified by fh.
1363 db_lookup(char *fhpath, fhandle_t *fh, fhlist_ent *fhrecp, int *errorp)
1368 if ((fhpath == NULL) || (fh == NULL) || (errorp == NULL)) {
1374 if (fh == &public_fh) {
1377 dbp = db_get_db(fhpath, &fh->fh_fsid, errorp, O_CREAT);
1383 bcopy(&fh->fh_data, fhkey, fh->fh_len);
1384 fhrecp = fetch_record(dbp, fhkey, fh->fh_len, fhrecp,
1388 *errorp = db_update_fhrec(dbp, fhkey, fh->fh_len, fhrecp,
1430 /* Now use link to search for fh entry */
1434 (void *)fhrecp, errorp, "db_lookup_link fh");
1601 * db_delete - Deletes the fhrec corresponding to the fh. Use only
1606 db_delete(char *fhpath, fhandle_t *fh)
1611 if ((fhpath == NULL) || (fh == NULL)) {
1614 if (fh == &public_fh) {
1617 dbp = db_get_db(fhpath, &fh->fh_fsid, &error, O_CREAT);
1619 for (; dbp != NULL; dbp = ((fh == &public_fh) ? dbp->next : NULL)) {
1621 (void) delete_record(dbp, &fh->fh_data, fh->fh_len,
1622 "db_delete: fh delete");
1662 error = db_add(fhpath, to_dfh, to_name, &fhrecp->fh,
1765 pfe = fetch_record(pdb, (void *)&pfe->fh.fh_data,
1766 pfe->fh.fh_len, NULL, &error,
1777 (void *)&pfe->fh.fh_data,
1778 pfe->fh.fh_len, pfe,
1910 (void *)&pfe->fh,
1911 sizeof (pfe->fh));
1918 &pfe->fh.fh_data, pfe->fh.fh_len,
1919 "prune_dbs: fh delete");