cvs commit: src/sys/boot/pc98/boot2 inode.h src/sys/i386/boot/dosboot inode.h src/sys/kern kern_lockf.c kern_mib.c kern_prot.c kern_resource.c subr_param.c src/sys/sys fcntl.h lockf.h proc.h resource.h resourcevar.h sysctl.h src/sys/vfs/isofs/cd9660 ...
Joerg Sonnenberger
joerg at crater.dragonflybsd.org
Mon May 3 09:07:17 PDT 2004
joerg 2004/05/03 09:06:27 PDT
DragonFly src repository
Modified files:
sys/boot/pc98/boot2 inode.h
sys/i386/boot/dosboot inode.h
sys/kern kern_lockf.c kern_mib.c kern_prot.c
kern_resource.c subr_param.c
sys/sys fcntl.h lockf.h proc.h resource.h
resourcevar.h sysctl.h
sys/vfs/isofs/cd9660 cd9660_node.h
sys/vfs/nfs nfsnode.h
sys/vfs/smbfs smbfs_node.h
sys/vfs/ufs inode.h
Log:
POSIX lock resource limit part 3/4
This splits "struct lockf" into the general book-keeping of ranges and
blocked request and the "struct lockf_range" which constists of the data
for a specific range. Adjust the interface of lf_advlock to remove one
level of pointer indirection and embedded "struct lockf" directly in the
inodes. Don't mess with wait channels any more.
Change the algorithm for determing locks to a more direct approach, which
both simplifies the lock acquisition and proper book-keeping of the number
of ranges currently used. The later is necessary to prevent local resource
exhaustion.
The code is not fully malloc block-safe, but as good or bad as
the old code.
Add the kernel part of the posixlocks rlimit. This is the maximum number of
POSIX lock ranges any user can acquire. These numbers are tracked for each
user and process and checked at lock/unlock time. If a process changes uid,
its locks are transfered to the new uid which can effectivly boost that
number above the limit.
This is based on the patch set from Devon H. O'Dell <dodell at xxxxxxxxxxxxxxx>
for the general infrastructure with some adjustment to better integrate with
the new lockf code.
Revision Changes Path
1.2 +1 -1 src/sys/boot/pc98/boot2/inode.h
1.5 +1 -1 src/sys/i386/boot/dosboot/inode.h
1.7 +561 -607 src/sys/kern/kern_lockf.c
1.8 +4 -0 src/sys/kern/kern_mib.c
1.16 +2 -0 src/sys/kern/kern_prot.c
1.20 +8 -0 src/sys/kern/kern_resource.c
1.5 +7 -1 src/sys/kern/subr_param.c
1.6 +1 -0 src/sys/sys/fcntl.h
1.4 +18 -21 src/sys/sys/lockf.h
1.49 +1 -0 src/sys/sys/proc.h
1.6 +3 -1 src/sys/sys/resource.h
1.7 +1 -0 src/sys/sys/resourcevar.h
1.10 +2 -0 src/sys/sys/sysctl.h
1.4 +3 -1 src/sys/vfs/isofs/cd9660/cd9660_node.h
1.9 +3 -1 src/sys/vfs/nfs/nfsnode.h
1.3 +4 -2 src/sys/vfs/smbfs/smbfs_node.h
1.6 +4 -1 src/sys/vfs/ufs/inode.h
http://www.dragonflybsd.org/cvsweb/src/sys/boot/pc98/boot2/inode.h.diff?r1=1.1&r2=1.2&f=h
http://www.dragonflybsd.org/cvsweb/src/sys/i386/boot/dosboot/inode.h.diff?r1=1.4&r2=1.5&f=h
http://www.dragonflybsd.org/cvsweb/src/sys/kern/kern_lockf.c.diff?r1=1.6&r2=1.7&f=h
http://www.dragonflybsd.org/cvsweb/src/sys/kern/kern_mib.c.diff?r1=1.7&r2=1.8&f=h
http://www.dragonflybsd.org/cvsweb/src/sys/kern/kern_prot.c.diff?r1=1.15&r2=1.16&f=h
http://www.dragonflybsd.org/cvsweb/src/sys/kern/kern_resource.c.diff?r1=1.19&r2=1.20&f=h
http://www.dragonflybsd.org/cvsweb/src/sys/kern/subr_param.c.diff?r1=1.4&r2=1.5&f=h
http://www.dragonflybsd.org/cvsweb/src/sys/sys/fcntl.h.diff?r1=1.5&r2=1.6&f=h
http://www.dragonflybsd.org/cvsweb/src/sys/sys/lockf.h.diff?r1=1.3&r2=1.4&f=h
http://www.dragonflybsd.org/cvsweb/src/sys/sys/proc.h.diff?r1=1.48&r2=1.49&f=h
http://www.dragonflybsd.org/cvsweb/src/sys/sys/resource.h.diff?r1=1.5&r2=1.6&f=h
http://www.dragonflybsd.org/cvsweb/src/sys/sys/resourcevar.h.diff?r1=1.6&r2=1.7&f=h
http://www.dragonflybsd.org/cvsweb/src/sys/sys/sysctl.h.diff?r1=1.9&r2=1.10&f=h
http://www.dragonflybsd.org/cvsweb/src/sys/vfs/isofs/cd9660/cd9660_node.h.diff?r1=1.3&r2=1.4&f=h
http://www.dragonflybsd.org/cvsweb/src/sys/vfs/nfs/nfsnode.h.diff?r1=1.8&r2=1.9&f=h
http://www.dragonflybsd.org/cvsweb/src/sys/vfs/smbfs/smbfs_node.h.diff?r1=1.2&r2=1.3&f=h
http://www.dragonflybsd.org/cvsweb/src/sys/vfs/ufs/inode.h.diff?r1=1.5&r2=1.6&f=h
More information about the Commits
mailing list