|
Lines 163-169
Link Here
|
| 163 |
lock->lf_start = start; |
163 |
lock->lf_start = start; |
| 164 |
lock->lf_end = end; |
164 |
lock->lf_end = end; |
| 165 |
lock->lf_id = ap->a_id; |
165 |
lock->lf_id = ap->a_id; |
| 166 |
/* lock->lf_inode = ip; */ /* XXX JH */ |
166 |
/* |
|
|
167 |
* XXX The problem is that VTOI is ufs specific, so it will |
| 168 |
* break LOCKF_DEBUG for all other FS's other than UFS because |
| 169 |
* it casts the vnode->data ptr to struct inode *. |
| 170 |
*/ |
| 171 |
/* lock->lf_inode = VTOI(ap->a_vp); */ |
| 172 |
lock->lf_inode = (struct inode *)0; |
| 167 |
lock->lf_type = fl->l_type; |
173 |
lock->lf_type = fl->l_type; |
| 168 |
lock->lf_head = head; |
174 |
lock->lf_head = head; |
| 169 |
lock->lf_next = (struct lockf *)0; |
175 |
lock->lf_next = (struct lockf *)0; |
|
Lines 768-782
Link Here
|
| 768 |
printf("proc %ld", (long)((struct proc *)lock->lf_id)->p_pid); |
774 |
printf("proc %ld", (long)((struct proc *)lock->lf_id)->p_pid); |
| 769 |
else |
775 |
else |
| 770 |
printf("id %p", (void *)lock->lf_id); |
776 |
printf("id %p", (void *)lock->lf_id); |
| 771 |
/* XXX no %qd in kernel. Truncate. */ |
777 |
if (lock->lf_inode != (struct inode *)0) |
| 772 |
printf(" in ino %lu on dev <%d, %d>, %s, start %ld, end %ld", |
778 |
/* XXX no %qd in kernel. Truncate. */ |
| 773 |
(u_long)lock->lf_inode->i_number, |
779 |
printf(" in ino %lu on dev <%d, %d>, %s, start %ld, end %ld", |
| 774 |
major(lock->lf_inode->i_dev), |
780 |
(u_long)lock->lf_inode->i_number, |
| 775 |
minor(lock->lf_inode->i_dev), |
781 |
major(lock->lf_inode->i_dev), |
| 776 |
lock->lf_type == F_RDLCK ? "shared" : |
782 |
minor(lock->lf_inode->i_dev), |
| 777 |
lock->lf_type == F_WRLCK ? "exclusive" : |
783 |
lock->lf_type == F_RDLCK ? "shared" : |
| 778 |
lock->lf_type == F_UNLCK ? "unlock" : |
784 |
lock->lf_type == F_WRLCK ? "exclusive" : |
| 779 |
"unknown", (long)lock->lf_start, (long)lock->lf_end); |
785 |
lock->lf_type == F_UNLCK ? "unlock" : |
|
|
786 |
"unknown", (long)lock->lf_start, (long)lock->lf_end); |
| 787 |
else |
| 788 |
printf(" %s, start %ld, end %ld", |
| 789 |
lock->lf_type == F_RDLCK ? "shared" : |
| 790 |
lock->lf_type == F_WRLCK ? "exclusive" : |
| 791 |
lock->lf_type == F_UNLCK ? "unlock" : |
| 792 |
"unknown", (long)lock->lf_start, (long)lock->lf_end); |
| 780 |
if (!TAILQ_EMPTY(&lock->lf_blkhd)) |
793 |
if (!TAILQ_EMPTY(&lock->lf_blkhd)) |
| 781 |
printf(" block %p\n", (void *)TAILQ_FIRST(&lock->lf_blkhd)); |
794 |
printf(" block %p\n", (void *)TAILQ_FIRST(&lock->lf_blkhd)); |
| 782 |
else |
795 |
else |
|
Lines 789-794
Link Here
|
| 789 |
struct lockf *lock; |
802 |
struct lockf *lock; |
| 790 |
{ |
803 |
{ |
| 791 |
register struct lockf *lf, *blk; |
804 |
register struct lockf *lf, *blk; |
|
|
805 |
|
| 806 |
if (lock->lf_inode == (struct inode *)0) |
| 807 |
return; |
| 792 |
|
808 |
|
| 793 |
printf("%s: Lock list for ino %lu on dev <%d, %d>:\n", |
809 |
printf("%s: Lock list for ino %lu on dev <%d, %d>:\n", |
| 794 |
tag, (u_long)lock->lf_inode->i_number, |
810 |
tag, (u_long)lock->lf_inode->i_number, |