Lines Matching refs:lf

339 	struct lockf_entry *lf;
341 lf = malloc(sizeof(struct lockf_entry), M_LOCKF, M_WAITOK|M_ZERO);
345 printf("Allocated lock %p\n", lf);
351 lf->lf_owner = lo;
354 return (lf);
708 struct lockf_entry *lf;
713 LIST_FOREACH(lf, &state->ls_active, lf_link) {
714 if (lock == lf)
716 KASSERT(!lf_blocks(lock, lf),
718 if (lock->lf_owner == lf->lf_owner)
719 KASSERT(!lf_overlaps(lock, lf),
1099 struct lockf_entry *lf, *lfprev;
1107 LIST_FOREACH(lf, &state->ls_active, lf_link) {
1108 if (lf->lf_start > lock->lf_start) {
1109 LIST_INSERT_BEFORE(lf, lock, lf_link);
1112 lfprev = lf;
1219 struct lockf_entry *overlap, *lf;
1282 lf = LIST_NEXT(overlap, lf_link);
1287 overlap = lf;
1706 struct lockf_entry *lf;
1721 lf = *overlap;
1722 if (lf->lf_start > end)
1724 if (((type & SELF) && lf->lf_owner != lock->lf_owner) ||
1725 ((type & OTHERS) && lf->lf_owner == lock->lf_owner)) {
1726 *overlap = LIST_NEXT(lf, lf_link);
1731 lf_print("\tchecking", lf);
1744 if (start > lf->lf_end) {
1750 *overlap = LIST_NEXT(lf, lf_link);
1753 if (lf->lf_start == start && lf->lf_end == end) {
1762 if (lf->lf_start <= start && lf->lf_end >= end) {
1771 if (start <= lf->lf_start && end >= lf->lf_end) {
1780 if (lf->lf_start < start && lf->lf_end >= start) {
1789 if (lf->lf_start > start && lf->lf_end > end) {
1875 struct lockf_entry *lf;
1892 LIST_FOREACH(lf, &ls->ls_active, lf_link) {
1893 if (lf->lf_owner->lo_sysid != sysid)
1898 ldesc->vp = lf->lf_vnode;
1900 ldesc->fl.l_start = lf->lf_start;
1901 if (lf->lf_end == OFF_MAX)
1905 lf->lf_end - lf->lf_start + 1;
1908 ldesc->fl.l_pid = lf->lf_owner->lo_pid;
1937 struct lockf_entry *lf;
1961 LIST_FOREACH(lf, &ls->ls_active, lf_link) {
1964 ldesc->vp = lf->lf_vnode;
1966 ldesc->fl.l_start = lf->lf_start;
1967 if (lf->lf_end == OFF_MAX)
1971 lf->lf_end - lf->lf_start + 1;
1974 ldesc->fl.l_pid = lf->lf_owner->lo_pid;
1975 ldesc->fl.l_sysid = lf->lf_owner->lo_sysid;
2525 struct lockf_entry *lf, *blk;
2534 LIST_FOREACH(lf, &lock->lf_vnode->v_lockf->ls_active, lf_link) {
2535 printf("\tlock %p for ",(void *)lf);
2538 lf->lf_type == F_RDLCK ? "shared" :
2539 lf->lf_type == F_WRLCK ? "exclusive" :
2540 lf->lf_type == F_UNLCK ? "unlock" :
2541 "unknown", (intmax_t)lf->lf_start, (intmax_t)lf->lf_end);
2542 LIST_FOREACH(e, &lf->lf_outedges, le_outlink) {