date: 1996/09/06 03:00:31; author: donn; state: Exp; lines: +1 -2
Because NFS doesn't implement vnode locking, nfs_inactive() doesn't really
have the vnode locked and hence it can't reliably access the vnode after
it performs a blocking operation. We remove one blocking call and push
the no-op VOP_UNLOCK higher so that we don't access the vnode after we
delete the sillyrename file. This should prevent crashes we've seen in
which the vnode turned into a UFS vnode and caused a panic in ufs_unlock()
when we tried to 'unlock' it.
date: 1996/09/25 19:15:21; author: cp; state: Exp; lines: +4 -0
Kirk's change to not corrupt files after a delete.
date: 1996/11/08 19:53:45; author: donn; state: Exp; lines: +16 -4
Krik's change to solve the paradox that vclean() calls nfs_inactive()
with VXLOCK set on the vnode, and nfs_inactive() was calling vget()
to get a reference on the vnode, which in turn hung on VXLOCK.
Nfs_inactive() now checks v_usecount to make sure that the vnode
is not coming from vclean() before it does a vget().
network interface to use.
- If any part of the NFS root mount process fails, don't panic.
Simply return the appropriate error and let the caller recover.
'const char *', and 'void *', respectively. The second arg is taken directly
from user arguments, and is const there, so must be const in the prototypes
and functions. The third arg is also taken directly from user arguments.
It doesn't have to be changed, but since it's cleaner to keep the type
the same as the user arg's type, and I'm already making the 'const char *'
change...
the client and server/shared data initialization into separate functions,
and calling the server/shared initialization directly from main().
Problem noted in PR #1308 (Kenneth Stailey) and PR #1780 (Chris Demetriou).
Fix suggested in PR #1780 by Chris Demetriou, and munged a bit by me,
and OK'd by Frank van der Linden <fvdl@netbsd.org>.
Improve the queuing algorithms used by NFS' asynchronous i/o. The
existing mechanism uses a global queue for some buffers and the
vp->b_dirtyblkhd queue for others. This turns sequential writes into
randomly ordered writes to the server, affecting both read and write
performance. The existing mechanism also copes badly with hung
servers, tending to block accesses to other servers when all the iods
are waiting for a hung server.
The new mechanism uses a queue for each mount point. All asynchronous
i/o goes through this queue which preserves the ordering of requests.
A simple mechanism ensures that the iods are shared out fairly between
active mount points.
Reviewed/integrated/approved by Frank van der Linden <fvdl@netbsd.org>
struct member cn_nameptr 'const', since they should never be used to
modify the path name. (Only the pathname buffer, cn_pnbuf, should be
modified.) Propagate the const poisoning to code that uses the namei
and componentname structs.
- Try V3 first for diskless booting. Fall back to V2 if V3 fails.
- optionally (option NFS_BOOT_TCP) try a TCP mount first
for diskless booting. Fall back to UDP if it fails.
- Enable switching between UDP and TCP for remounts.
XID confusions with servers that cache them over a long period and
with clients that reboot quickly.
Problems: because of the sanity check that is done by comparing the system
time with filesystem time, XIDs will start at 0 until root is mounted,
which means it isn't completely safe for diskless setups. But it's clearly
better than it was. It would also be cleaner if all XID handling (more
generally, all RPC handling) within the kernel went through the
same functions.
This takes care of two related problems:
- `umount -f' wouldn't work if someone's working directory is
the filesystem root.
- vfs_unmountall() would complain about a busy `/' on a
diskless setup.
* Never change the NQNFS flag and/or version when just doing an update mount.
Fixes a problem that made diskless booting impossible under some
circumstances.
* Make 2nd and 3rd args timespecs, not timevals.
* Consistently pass a Boolean as the 4th arg (except in LFS).
Also, fix ffs_update() and lfs_update() to actually change the nsec fields.
device and a printable "external name" (name + unit number), thus eliminating
if_name and if_unit. Updated interface to (*if_watchdog)() and (*if_reset)()
to take a struct ifnet *, rather than a unit number.
directory problems.
XXX There is no clean solution to the cookie/cookieverifier validity mess.
Together with the disabled strict cookie check, this puts us back at
what v2 did in this case. Slightly better solution possible by
consequently storing 64bit cookies in other places too.