Lines Matching refs:origin

737 	/* Purge any cached origin entries for a directory or file hard link. */
1047 * Cache the origin of a directory or file hard link
1055 linkorigin_t *origin = NULL;
1060 * Look for an existing origin first. If not found, create/steal one.
1062 TAILQ_FOREACH(origin, &cp->c_originlist, lo_link) {
1064 if (origin->lo_thread == thread) {
1065 TAILQ_REMOVE(&cp->c_originlist, origin, lo_link);
1069 if (origin == NULL) {
1072 origin = TAILQ_LAST(&cp->c_originlist, hfs_originhead);
1073 TAILQ_REMOVE(&cp->c_originlist, origin, lo_link);
1075 MALLOC(origin, linkorigin_t *, sizeof(linkorigin_t), M_TEMP, M_WAITOK);
1077 origin->lo_thread = thread;
1079 origin->lo_cnid = cp->c_cnid;
1080 origin->lo_parentcnid = parentcnid;
1081 TAILQ_INSERT_HEAD(&cp->c_originlist, origin, lo_link);
1093 linkorigin_t *origin, *prev;
1095 TAILQ_FOREACH_SAFE(origin, &cp->c_originlist, lo_link, prev) {
1096 FREE(origin, M_TEMP);
1102 * Release a specific origin for a directory or file hard link
1110 linkorigin_t *origin, *prev;
1113 TAILQ_FOREACH_SAFE(origin, &cp->c_originlist, lo_link, prev) {
1114 if ((origin->lo_thread == thread) ||
1115 (origin->lo_parentcnid == parentcnid)) {
1116 TAILQ_REMOVE(&cp->c_originlist, origin, lo_link);
1117 FREE(origin, M_TEMP);
1124 * Test if a directory or file hard link has a cached origin
1133 linkorigin_t *origin;
1136 TAILQ_FOREACH(origin, &cp->c_originlist, lo_link) {
1137 if (origin->lo_thread == thread) {
1155 linkorigin_t *origin;
1158 TAILQ_FOREACH(origin, &cp->c_originlist, lo_link) {
1159 if (origin->lo_thread == thread) {
1160 return (origin->lo_parentcnid);
1177 linkorigin_t *origin;
1180 TAILQ_FOREACH(origin, &cp->c_originlist, lo_link) {
1181 if (origin->lo_thread == thread) {
1182 return (origin->lo_cnid);