chs
060e70db41
min() -> MIN(), max() -> MAX().
...
fixes more problems with file offsets > 4GB.
2001-02-27 04:37:44 +00:00
jdolecek
522f569810
make some more constant arrays 'const'
2001-02-21 21:39:52 +00:00
chs
f6370c7a84
fix a couple more bugs:
...
- in nfs_getpages(), unbusy any pages that we don't free in the error path.
- in nfs_putpages(), only call biowait() if we actually started any i/os.
2001-02-18 15:52:32 +00:00
fvdl
4c9b670931
Fix some possible locking errors in nfs_namei (XXX this function should die)
2001-02-14 15:36:45 +00:00
fvdl
a008ea27c9
Instead of storing the filehandle in the mount structure, store the
...
vnode pointer. This avoids a locking problem with nfs_nget, and
can be done because we always have a reference on the root vnode
of the filesystem.
2001-02-12 20:02:30 +00:00
enami
6b949f72fb
Unlock the rename target vnode after sillyrename'ing it.
2001-02-11 01:09:04 +00:00
tsutsui
ec8b1c000e
Fix nested extern declaration of prtactive.
2001-02-07 12:40:43 +00:00
fvdl
c18aae5b9f
In nfs_inactive there's no need anymore for an extra refcount around
...
nfs_vinvalbuf, since it has a real lock on the vnode now, so getnewvnode
will not hijack it.
2001-02-06 16:25:48 +00:00
fvdl
9f39c3a967
Get locking in rmdir right. Don't unlock a vnode when passing its
...
associated nfsnode to nfs_lookitup, it is not needed, and fixes
nfs_remove.
2001-02-06 15:26:25 +00:00
fvdl
d4e6a2c4e1
Do actual vnode locking for NFS.
2001-02-06 11:40:02 +00:00
chs
5706160195
fix several bugs:
...
- in the cases where we skip over the i/o loop, increment npages by ridx
so that when the cleanup code starts processing the pgs array at index 0
it'll actually process all of the pages.
- process the PG_RELEASED flag when unbusying pages.
- add some missing MP locking.
- use MIN() and MAX() instead of min() and max() since the latter are
functions which take arguments of type "int" but we call them with
values of type "off_t", so the values could be truncated.
2001-02-05 12:27:18 +00:00
thorpej
e4dc9e322e
Make sure bp->b_proc is initialized. Should fix a deref-garbage-pointer
...
problem reported by msaitoh@netbsd.org . NOTE: These are marked XXXUBC
since the code that allocates the bufs is new with UBC, but it may be
the case that bp->b_proc needs to be intialized to curproc (it's used
in a call to nfs_sigintr()).
2001-01-30 03:47:11 +00:00
jdolecek
d9466585b7
make filesystem vnodeop, specop, fifoop and vnodeopv_* arrays const
2001-01-22 12:17:35 +00:00
enami
07c60191e7
Use tsleep instead of dalay; since we're mounting root, we can sleep
...
and no reason to use delay.
2001-01-19 14:26:01 +00:00
jdolecek
34c8ae80da
constify
2001-01-18 20:28:15 +00:00
enami
744c012068
Use uvm_aio_biodone instead of uvm_aio_aiodone for top-level buf
...
so that uvmexp.paging is updated if this i/o was initiated by
the pagedaemon.
2001-01-07 05:54:41 +00:00
jdolecek
7ec49a1f35
update commented out code to recent changes of signal structures
2000-12-27 22:01:43 +00:00
bjh21
47d4a4d009
Extra diagnostic assertion: subtle pmap bugs can ultimately lead to trying
...
to use NULL credentials for NFS ops, so spot them before we dereference them.
2000-12-27 16:35:37 +00:00
chs
4e7404469d
fix several bugs:
...
- fix math when skipping writing pages that just need a commit.
- clear the needcommit stuff and PG_RDONLY flags on pages returned for
overwrite requests as well as for normal write faults.
- bail out of nfs_write() if we get an error.
- remove a bogus attempt to clean up after failed uiomove()s.
- bring over a workaround for a lock-ordering problem from the genfs code.
- add some missing MP locking.
2000-12-27 05:15:43 +00:00
jdolecek
c2cfcae955
<sys/trace.h> is not needed here
2000-12-13 18:15:56 +00:00
chs
395f8c2177
initialize read creds in nfs_open() too.
2000-12-12 17:13:17 +00:00
fvdl
405b695086
Make sobind() take a struct proc *. It already took curproc and
...
passed it down to the appropriate usrreq function, and this
allows usage for contexts that need to be explicitly different
from curproc (like in the NFS code when binding to a reserved port).
2000-12-10 23:16:28 +00:00
chs
3a5e4f901b
in *_sync(), don't skip vnodes which have (potentially dirty) pages.
2000-12-10 19:36:31 +00:00
chs
f5878a3362
only zero the part of the page after EOF if we're actually
...
initializing the page.
2000-12-09 22:38:23 +00:00
drochner
8f6e088214
add a kernel configuration option to set the string passed in bp_file
...
in diskless BOOTP/DHCP configuration - good for booting different
userland versions depending on the kernel version
2000-12-05 17:59:43 +00:00
fvdl
a0aebb0c36
Initialize 'error' to 0, so that nfs_putpages doesn't return garbage
...
when pages already have been committed and nothing needs to be done.
2000-12-04 12:12:20 +00:00
chs
d324e2eb55
in nfs_open(), initialize the write creds if we're opening for writing.
...
otherwise we would never set them if we only modify the file via mmap().
2000-11-30 07:24:12 +00:00
chs
aeda8d3b77
Initial integration of the Unified Buffer Cache project.
2000-11-27 08:39:39 +00:00
chs
8362134916
put more ISO bits under ifdef ISO.
2000-11-24 23:30:02 +00:00
ad
642267bcc7
Update for hashinit() change.
2000-11-08 14:28:12 +00:00
chs
51c256aa5a
in nfs_flush(), only play games with B_NOCACHE for VREG vnodes.
...
if we do this for VBLK vnodes which are in use by softdep mounts,
brelse() will mark the buffer B_INVAL as well, which makes the
softdep code very unhappy.
2000-11-08 05:20:32 +00:00
fvdl
dcf7889500
Do not accept vnode type changes to an active node. This may wreak
...
havoc if the server erroneously uses the same filehandle for
different files. This changes back revision 1.28; the PR that
that revision fixed doesn't apply anymore, it has been verified
not to be a problem with this change.
2000-10-24 12:02:04 +00:00
matt
04f534474c
Change a DIAGNOSTIC panic slightly to print the locked vnodes and to just
...
print a diagnostic but not panic.
2000-10-24 07:08:48 +00:00
chs
be0d1c56f1
fix nfs iod management so we don't lose i/os when iods die.
2000-10-23 07:18:27 +00:00
chs
65ab1f3650
include opt_inet.h, needed by previous check-in.
2000-10-03 17:18:15 +00:00
itojun
b834fb62c3
check in_ifaddr only if INET is compiled
2000-10-02 04:28:13 +00:00
itojun
23bf957144
perform reverse ARP only if INET is compiled into the kernel
2000-10-02 04:27:57 +00:00
fvdl
06b8ac615d
Avoid unused variables for V2_ONLY case.
2000-09-27 18:36:03 +00:00
enami
29d3e43df9
Don't bother to clear commit information for the vnode of type VNON.
...
It is not necessary since it is a vnode being initialized and it shouldn't
be done since filesystem private data may not be assigned yet.
2000-09-24 06:59:21 +00:00
bjh21
1f4240a461
Extend NFS_V2_ONLY to remove NQNFS lease support as well. Saves another 10k.
2000-09-19 23:26:25 +00:00
fvdl
874d41c959
"ENOBUF" on socket writes isn't really fatal; we may just be too fast
...
for the driver. Don't log the error, just try again. Could try to
be smart and do a backoff, but it's probably not worth the trouble.
2000-09-19 22:21:21 +00:00
fvdl
8d38a9fc8e
Adapt some defaults/max values to be more realistic.
2000-09-19 22:19:12 +00:00
fvdl
de98f0812b
Add fields to deal with commit ranges.
2000-09-19 22:18:40 +00:00
fvdl
861339828d
Update for VOP_FSYNC parameter change. Simplify nfs_flush.
2000-09-19 22:18:03 +00:00
fvdl
ddf47f8f0d
Update for VOP_FSYNC parameter change.
2000-09-19 22:15:41 +00:00
fvdl
45dc18d175
Add prototypes for commitrange functions.
2000-09-19 22:14:59 +00:00
fvdl
09f52ac6fc
Don't do write gathering for v3; it makes no sense. Unless the client
...
is broken and does sync writes all the time, but that's the client's
fault.
2000-09-19 22:14:42 +00:00
fvdl
9ed021b771
Add functions to deal with keeping track of commit ranges.
2000-09-19 22:13:55 +00:00
fvdl
45460eabe0
Initialize the lock needed to serialize commits for one NFS node.
2000-09-19 22:13:01 +00:00
fvdl
899fb781e0
Move handling of B_NEEDCOMMIT buffers to nfs_doio, so that bawrite() calls
...
for them are actually done asynchronously. Idea taken from FreeBSD.
Do away with nfs_writebp completely, it's not needed anymore.
Keep an eye on the range of a file that needs to be committed, and
do it in heaps.
2000-09-19 22:11:47 +00:00