filesystem, if the number of threads is "-1", meaning it's never been
set, then set it to 4. You can override by setting this to some other
number (including 0) before or after mounting, of course.
Thanks to whoever it was that suggested this on ICB... sorry I don't
remember who.
timeout()/untimeout() API:
- Clients supply callout handle storage, thus eliminating problems of
resource allocation.
- Insertion and removal of callouts is constant time, important as
this facility is used quite a lot in the kernel.
The old timeout()/untimeout() API has been removed from the kernel.
in vfs_detach(). vfs_done may free global filesystem's resources,
typically those allocated in respective filesystem's init function.
Needed so those filesystems which went in via LKM have a chance to
clean after themselves before unloading. This fixes random panics
when LKM for filesystem using pools was loaded and unloaded several
times.
For each leaf filesystem, add appropriate vfs_done routine.
default, as the copyright on the main file (ffs_softdep.c) is such
that is has been put into gnusrc. options SOFTDEP will pull this
in. This code also contains the trickle syncer.
Bump version number to 1.4O
With nfsv2, the nfsm_reply() macro always causes the service routine
to return if error was nonzero.
With nfsv3, we can keep going after nfsm_reply() without returning,
but nqnfsrv_getlease() didn't take this into account, so add a
return(0) after each error-case nfsm_reply(0).
call with F_FSCTL set and F_SETFL calls generate calls to a new
fileop fo_fcntl. Add genfs_fcntl() and soo_fcntl() which return 0
for F_SETFL and EOPNOTSUPP otherwise. Have all leaf filesystems
use genfs_fcntl().
Reviewed by: thorpej
Tested by: wrstuden
shutdown:
During an unmount, wake up all the processes which are waiting to lock
the socket for receive, and wait for them (and the process blocked in
soreceive, if any) to go away before blowing away the socket and the
mount structure.
-arrange gateway code to fall back to the old method if the new "getfile"
is not answered (and both are enabled -- allow to switch off the new
method for symmetry)
-handle error if setting the netmask fails
count is 0, wait for use count to drain before finishing the close.
This is necessary in order for multiple processes to safely share file
descriptor tables.
* Add prototype to libkern.h.
* Remove the almost-identical-copy from libsa/net.[ch].
* Change its type back to the (wrong, but harmless) historical one. (u_long)
* Kill the XXX local prototype in nfs_bootparam.c
* We shouldn't truncate the file.
* We were leaving the vnode locked (unless the truncate happened to fail).
Solaris clients may cause this under some conditions.
Problem reported by chopps, analysis and fix by me.
interface and the address allocated, to roll everything back if the
mount fails:
-put an interface pointer into "struct nfs_diskless" to have it
available for cleanup, don't pass it around anymore where the
"struct nfs_diskless" is already passed
-add a "cleanup" function which shuts the interface down
-in the protocol-specific parts, either return with "everything
ready" or "completely shut down"
-use common functions for interface initialization and shutdown
-add a function to delete all routes associate to an interface
(why is this necessary and not done by ~IFF_UP?)
g/c diskless swap stuff
general cleanup
* Increase the size of sigset_t to accomodate 128 signals -- adding new
versions of sys_setprocmask(), sys_sigaction(), sys_sigpending() and
sys_sigsuspend() to handle the changed arguments.
* Abstract the guts of sys_sigaltstack(), sys_setprocmask(), sys_sigaction(),
sys_sigpending() and sys_sigsuspend() into separate functions, and call them
from all the emulations rather than hard-coding everything. (Avoids uses
the stackgap crap for these system calls.)
* Add a new flag (p_checksig) to indicate that a process may have signals
pending and userret() needs to do the full (slow) check.
* Eliminate SAS_ALTSTACK; it's exactly the inverse of SS_DISABLE.
* Correct emulation bugs with restoring SS_ONSTACK.
* Make the signal mask in the sigcontext always use the emulated mask format.
* Store signals internally in sigaction structures, rather than maintaining a
bunch of little sigsets for each SA_* bit.
* Keep track of where we put the signal trampoline, rather than figuring it out
in *_sendsig().
* Issue a warning when a non-emulated sigaction bit is observed.
* Add missing emulated signals, and a native SIGPWR (currently not used).
* Implement the `not reset when caught' semantics for relevant signals.
Note: Only code touched by the i386 port has been modified. Other ports and
emulations need to be updated.
not in the kernel, genfs_lease_check() is simply a no-op. This allows
LKM'd file systems to be exported (previously did not work properly
due to a compile-time decision based on -DNFSSERVER).
- defopt NFSSERVER
as with user-land programs, include files are installed by each directory
in the tree that has includes to install. (This allows more flexibility
as to what gets installed, makes 'partial installs' easier, and gives us
more options as to which machines' includes get installed at any given
time.) The old SYS_INCLUDES={symlinks,copies} behaviours are _both_
still supported, though at least one bug in the 'symlinks' case is
fixed by this change. Include files can't be build before installation,
so directories that have includes as targets (e.g. dev/pci) have to move
those targets into a different Makefile.
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.
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...