UVM was written by chuck cranor <chuck@maria.wustl.edu>, with some
minor portions derived from the old Mach code. i provided some help
getting swap and paging working, and other bug fixes/ideas. chuck
silvers <chuq@chuq.com> also provided some other fixes.
this is the rest of the MI portion changes.
this will be KNF'd shortly. :-)
conditional on a particular configuration method.
The global flags "nfs_boot_rfc951" and "nfs_boot_bootparam" control
independantly if the functions are actually called. (Previous meaning
of "nfs_boot_rfc951" was "either-or".)
gateway=server:255.255.255.0 because that is the perferred format,
and the sys/libsa code already knows how to parse that format.
(Copied ip_convert here from the libsa code.)
whether we get it off the wire. An nfsiod might have been busy with
it, and finished while we were waiting for it in nfs_getcacheblk, so
we need to check for EOF again no matter what.
the directory cache as translation table. See nfs_subs.c for comments.
Makes the code a bit more complex to look at than I would have liked,
but doesn't affect the speed of the default behavior.
* Optimize caching behavior a bit when buffers are invalidated.
* Save some RPCs in readdir operations by not bothering if there is
a small amount left to do to fill the buffer. It'll be done in the
next RPC with a larger chunk anyway. Wastes a bit of buffer space
but is faster.
* Make n_vattr an allocated vattr struct. This avoids nfsnode bloat,
and is friendlier to the malloc routines.
directory cookie that may be thrown back at us from userspace, up
to a size limit. Fixes double entry problem.
* Split flags for internal and external use in the NFS mount structure.
* Fix some buffer structure fields that weren're being used correctly.
* Fix missing directory cache inval call in nfs_open.
* Limit on NFS_DIRBLKSIZ no longer needed, bumped to the more reasonable
value of 8k.
* Various other things that I forget, all related to the dir caching
somehow, though.
with NFS_BOOT_DHCP.
Don't increment xid between retries anymore, it is not required and
it increases the response time in case of a slow server.
Use common code with bootparam boot.
Sun RPC bootparam/whoami return by requesting a "pseudo file"
named "gateway" and using its contents as the gateway:netmask
Example /etc/bootparams line: client gateway=router:0xfffffff0
interface. Without this, NFS_BOOT_NETMASK could be useless in
subnetting envirinment.
2. Comment out unneeded NFS swap related stuff.
Closes PR kern/3918.
From Olaf Seibert <rhialto@polder.ubc.kun.nl> (PR 3687)
* Make an attempt to check the maximum filesize before attempting
a write to the server, as write RPCs will typically happen
asynchronously, and the process will not see the error.
Fixes problems with unexpectly truncated files at 4G
* Pass up errors in nfs_writerpc correctly
the server code would always skip all dir entries for a readdirplus
operation. To avoid endlessly retrying clients, try VFS_VGET first,
and it it fails, return NFSERR_NOTSUPP so that client will fall
back to normal readdir operations.
In readdirplus, don't keep such pointers but store the file attributes
in a variable instead until they are needed. Change nfsm_loadattr*
a bit so it can accept a direct pointer to an nfs_fattr structure.
architectures), truncate them intelligently instead.
The truncation is done centralized in vnode_pager.c.
This prevents from wrap-over effects when parts of large (>2^32 byte) files
are mmapped.
Don't allow to mmap above the numerical range of vm_offset_t.
This is considered a temporary solution until the vm system handles the
object sizes/offsets more cleanly.
with full pathname lookups if a public filehandle is used, and that
it translates the '%' escapes (URL-style) in the same case. Also,
make nfsrv_fhtovp convert the public filehandle to the vp of the
publicly exported filesystem, as stored in the nfs_pub structure.
a request on the public filehandle. Extend the lookup operation to
support WebNFS, including index file support (URL style). Yucky, it's
optional in the spec, but Solaris 2.6 will support it, so..
The RPC/bootparamd calls to get the root and swap paths are now done
in nfs_boot_init() instead of nfs_boot_getfh(), so the latter now just
does the RPC/mountd call. Also changed some panics into error returns.
other requests will get through and the mount point will be effectively dead.
This could happen for mounts using TCP and -i and/or -s.
* Reserve enough space for UDP sockets. Fixes PR 3008, from Naofumi Honda.
anyone else can get to it, by checking if a reply was received, and it
has thus become unnecessary to take the lock. From FreeBSD.
XXX I don't really like this, "locks" potentially suffer from the same
problem throughout the whole kernel; they should probably be FIFO everywhere.
Some of the stuff (e.g., rarpd, bootpd, dhcpd etc., libsa) still will
only support Ethernet. Tcpdump itself should be ok, but libpcap needs
lot of work.
For the detailed change history, look at the commit log entries for
the is-newarp branch.
date: 1997/02/10 18:41:15; author: cp; state: Exp; lines: +8 -2
Make nfs_realign go away on sparc and add functionality to nfsm_disct.
===
[XXX this introduces an ifdef __i386__, see the comment. Should be changed]
date: 1996/07/23 17:14:46; author: donn; state: Exp; lines: +6 -4
Be sure to push out the last page of the file before truncating it.
date: 1996/10/14 22:41:20; author: donn; state: Exp; lines: +2 -2
From Chris: Nfs_link() called vput() on the wrong vnode when aborting
from a cross-device link, which could (and did) lead to crashes.
date: 1996/10/24 16:43:43; author: pjd; state: Exp; lines: +6 -2
Return EOPNOTSUPP when trying to do a setattr with flags.
===
Also (from BSDI too, but the RCS message did not quite describe the change
to this particular file well): move the EROFS a bit further down to
let VOP_ACCESS do it's work and return an 'expected' error value to
a possible layered filesystem.
date: 1995/11/30 20:37:03; author: cp; state: Exp; lines: +25 -14
Change splsoftclock() to splnet();
Make nfsrv_getstream create two copies of data when
splitting up an mbuf rather than two references to the
same external buffer. The symptom this fixes is client
hangs.
date: 1997/02/10 18:41:13; author: cp; state: Exp; lines: +4 -1
Make nfs_realign go away on sparc and add functionality to nfsm_disct.
date: 1996/11/20 20:02:54; author: pjd; state: Exp; lines: +7 -4
In nfsrv_access(), if VOP_ACCESS() returns an error and the
error == EPERM or its not the owner doing the access, return the error.
date: 1995/11/30 20:37:53; author: cp; state: Exp; lines: +3 -3
Change splsoftclock() to splnet();
Make nfsrv_getstream create two copies of data when
splitting up an mbuf rather than two references to the
same external buffer. The symptom this fixes is client
hangs.
date: 1996/10/16 00:06:05; author: ewv; state: Exp; lines: +5 -3
Clear pending signal when an unmount fails, this allows us another chance
at the umount after a short sleep. The fixes a problem where /usr is
mounted via nqnfs and the system hangs on shutdown since the umount()
always fails with EBUSY (inetd is still busy on usr) and since we don't
clear the signal we end up stuck looping and never give inetd a chance to
catch its SIGKILL.
date: 1996/10/23 18:22:14; author: donn; state: Exp; lines: +12 -7
Kirk's changes to prevent races when unmounting. (1) Unmount()
and vfs_unmountall() now call vfs_busy() so that they participates
in the mount structure locking scheme. Dounmount() calls vfs_unbusy()
to unlock things, and makes sure to wake up waiters if there's an
error. (2) The MFS and NQNFS daemons also now use vfs_busy() when
unmounting filesystems. Kirk restructured the code so that a
successful unmount by another process won't leave the possibility
that a daemon might reference a mount structure that has been freed.