Lines Matching refs:lf

436 	struct lockf **lf = lock->lf_head;  in lf_coalesce_adjacent()  local
438 while (*lf != NOLOCKF) { in lf_coalesce_adjacent()
440 if ((*lf == lock) || in lf_coalesce_adjacent()
441 ((*lf)->lf_id != lock->lf_id) || in lf_coalesce_adjacent()
442 ((*lf)->lf_type != lock->lf_type)) { in lf_coalesce_adjacent()
443 lf = &(*lf)->lf_next; in lf_coalesce_adjacent()
451 if (LF_END(*lf) < OFF_MAX && in lf_coalesce_adjacent()
452 (LF_END(*lf) + 1) == lock->lf_start) { in lf_coalesce_adjacent()
453 struct lockf *adjacent = *lf; in lf_coalesce_adjacent()
456 lock->lf_start = (*lf)->lf_start; in lf_coalesce_adjacent()
457 *lf = lock; in lf_coalesce_adjacent()
458 lf = &(*lf)->lf_next; in lf_coalesce_adjacent()
467 (LF_END(lock) + 1) == (*lf)->lf_start) { in lf_coalesce_adjacent()
468 struct lockf *adjacent = *lf; in lf_coalesce_adjacent()
471 lock->lf_end = (*lf)->lf_end; in lf_coalesce_adjacent()
472 lock->lf_next = (*lf)->lf_next; in lf_coalesce_adjacent()
473 lf = &lock->lf_next; in lf_coalesce_adjacent()
482 lf = &(*lf)->lf_next; in lf_coalesce_adjacent()
982 struct lockf *lf = *head; in lf_clearlock() local
986 if (lf == NOLOCKF) { in lf_clearlock()
998 while ((ovcase = lf_findoverlap(lf, unlock, SELF, &prev, &overlap)) != OVERLAP_NONE) { in lf_clearlock()
1037 lf = overlap->lf_next; in lf_clearlock()
1045 lf = overlap->lf_next; in lf_clearlock()
1141 struct lockf **prev, *overlap, *lf = *(lock->lf_head); in lf_getblock() local
1144 lf_findoverlap(lf, lock, OTHERS, &prev, &overlap) != OVERLAP_NONE; in lf_getblock()
1145 lf = overlap->lf_next) { in lf_getblock()
1215 lf_findoverlap(struct lockf *lf, struct lockf *lock, int type, in lf_findoverlap() argument
1220 *overlap = lf; in lf_findoverlap()
1221 if (lf == NOLOCKF) { in lf_findoverlap()
1231 while (lf != NOLOCKF) { in lf_findoverlap()
1232 if (((type & SELF) && lf->lf_id != lock->lf_id) || in lf_findoverlap()
1233 ((type & OTHERS) && lf->lf_id == lock->lf_id)) { in lf_findoverlap()
1247 *prev = &lf->lf_next; in lf_findoverlap()
1248 *overlap = lf = lf->lf_next; in lf_findoverlap()
1258 lf_print("\tchecking", lf); in lf_findoverlap()
1264 const off_t lfstart = lf->lf_start; in lf_findoverlap()
1265 const off_t lfend = LF_END(lf); in lf_findoverlap()
1278 *prev = &lf->lf_next; in lf_findoverlap()
1279 *overlap = lf = lf->lf_next; in lf_findoverlap()
1448 #define GET_LF_OWNER_PID(lf) (proc_pid((lf)->lf_owner)) argument
1511 struct lockf *lf, *blk; in lf_printlist() local
1519 for (lf = lock->lf_vnode->v_lockf; lf; lf = lf->lf_next) { in lf_printlist()
1520 printf("\tlock %p for ", (void *)lf); in lf_printlist()
1521 if (lf->lf_flags & F_POSIX) { in lf_printlist()
1523 lf->lf_id, GET_LF_OWNER_PID(lf)); in lf_printlist()
1524 } else if (lf->lf_flags & F_OFD_LOCK) { in lf_printlist()
1526 lf->lf_id, GET_LF_OWNER_PID(lf)); in lf_printlist()
1528 printf("id %p", (void *)lf->lf_id); in lf_printlist()
1531 lf->lf_type == F_RDLCK ? "shared" : in lf_printlist()
1532 lf->lf_type == F_WRLCK ? "exclusive" : in lf_printlist()
1533 lf->lf_type == F_UNLCK ? "unlock" : in lf_printlist()
1534 "unknown", (uint64_t)lf->lf_start, (uint64_t)lf->lf_end); in lf_printlist()
1535 TAILQ_FOREACH(blk, &lf->lf_blkhd, lf_block) { in lf_printlist()