Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-4]: src/sys/sys Pull up revision 1.8 (requested by sommerfeld):



details:   https://anonhg.NetBSD.org/src/rev/b37412a8cb21
branches:  netbsd-1-4
changeset: 470684:b37412a8cb21
user:      he <he%NetBSD.org@localhost>
date:      Tue Jun 27 15:22:49 2000 +0000

description:
Pull up revision 1.8 (requested by sommerfeld):
  Fix several problems with byte-range locks, including the one
  reported in PR#3860.

diffstat:

 sys/sys/lockf.h |  10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diffs (31 lines):

diff -r 83915add6ae0 -r b37412a8cb21 sys/sys/lockf.h
--- a/sys/sys/lockf.h   Tue Jun 27 15:22:32 2000 +0000
+++ b/sys/sys/lockf.h   Tue Jun 27 15:22:49 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lockf.h,v 1.7 1998/03/01 02:24:13 fvdl Exp $   */
+/*     $NetBSD: lockf.h,v 1.7.8.1 2000/06/27 15:22:49 he Exp $ */
 
 /*
  * Copyright (c) 1991, 1993
@@ -46,6 +46,12 @@
  * associated with a byte range lock.  The lockf structures are linked into
  * the inode structure. Locks are sorted by the starting byte of the lock for
  * efficiency.
+ *
+ * lf_next is used for two purposes, depending on whether the lock is
+ * being held, or is in conflict with an existing lock.  If this lock
+ * is held, it indicates the next lock on the same vnode.
+ * For pending locks, if lock->lf_next is non-NULL, then lock->lf_block
+ * must be queued on the lf_blkhd TAILQ of lock->lf_next.
  */
 
 TAILQ_HEAD(locklist, lockf);
@@ -57,7 +63,7 @@
        off_t   lf_end;          /* The byte # of the end of the lock (-1=EOF)*/
        caddr_t lf_id;           /* The id of the resource holding the lock */
        struct  lockf **lf_head; /* Back pointer to the head of lockf list */
-       struct  lockf *lf_next;  /* A pointer to the next lock on this inode */
+       struct  lockf *lf_next;  /* Next lock on this vnode, or blocking lock */
        struct  locklist lf_blkhd; /* List of requests blocked on this lock */
        TAILQ_ENTRY(lockf) lf_block;/* A request waiting for a lock */
 };



Home | Main Index | Thread Index | Old Index