Lines Matching +defs:block +defs:start

75 	off_t	lf_start;	 /* The byte # of the start of the lock */
143 printf(" %s, start %jd, end %jd",
149 printf(" block %p\n", TAILQ_FIRST(&lock->lf_blkhd));
166 printf(", %s, start %jd, end %jd",
177 printf(", %s, start %jd, end %jd",
237 off_t start, end;
246 start = lock->lf_start;
270 if ((lf->lf_end != -1 && start > lf->lf_end) ||
283 if ((lf->lf_start == start) && (lf->lf_end == end)) {
291 if ((lf->lf_start <= start) &&
301 if (start <= lf->lf_start &&
311 if ((lf->lf_start < start) &&
312 ((lf->lf_end >= start) || (lf->lf_end == -1))) {
320 if ((lf->lf_start > start) &&
508 struct lockf *block;
519 * Scan lock list for this file looking for locks that would block us.
521 while ((block = lf_getblock(lock)) != NULL) {
540 (block->lf_flags & F_POSIX)) {
546 p = (struct proc *)block->lf_id;
600 lock->lf_next = block;
601 TAILQ_INSERT_TAIL(&block->lf_blkhd, lock, lf_block);
604 lf_print("lf_setlock: blocking on", block);
605 lf_printlist("lf_setlock", block);
636 block = *head;
639 ovcase = lf_findoverlap(block, lock, SELF, &prev, &overlap);
641 block = overlap->lf_next;
766 struct lockf *block;
773 if ((block = lf_getblock(lock)) != NULL) {
774 fl->l_type = block->lf_type;
776 fl->l_start = block->lf_start;
777 if (block->lf_end == -1)
780 fl->l_len = block->lf_end - block->lf_start + 1;
781 if (block->lf_flags & F_POSIX)
782 fl->l_pid = ((struct proc *)block->lf_id)->p_pid;
801 off_t start, end;
807 * Convert the flock structure into a start and end.
816 start = fl->l_start;
822 start = size + fl->l_start;
833 if (start >= 0 &&
834 fl->l_len - 1 > __type_max(off_t) - start)
836 end = start + (fl->l_len - 1);
839 if (start < 0)
841 end = start - 1;
842 start += fl->l_len;
845 if (start < 0)
884 if (start == 0 || end == -1) {
917 lock->lf_start = start;