Commit Graph

85 Commits

Author SHA1 Message Date
fvdl 0b1963121a Add Kirk McKusick's soft updates code to the trunk. Not enabled by
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
1999-11-15 18:49:07 +00:00
sommerfeld 5493437dd8 Once the mount structure is definitely doomed, always set the
NFSMNT_DISMNT bit in it so that any waiters can go away cleanly.
(formerly, we did this only in the NQNFS/KERB cases).
1999-08-29 18:32:15 +00:00
fair d143754986 Snatch a patch from OpenBSD to fix PRs 6529 and 7074.
Adjust fxdr_hyper() and txdr_hyper() macros.
1999-03-06 05:34:40 +00:00
mycroft 4de576b025 Clean up some sign extension bogosity in statfs, so negative numbers are
actually negative on a LP64 client.
1999-03-05 07:27:58 +00:00
wrstuden 862a56e88b Modify vfsops to seperate vfs_fhtovp() into two routines. vfs_fhtovp() now
only handles the file handle to vnode conversion, and a new call,
vfs_checkexp(), performs the export verification.
1999-02-26 23:44:43 +00:00
drochner 33ed457810 -call nfs_boot_cleanup() if mount failed
-g/c diskless swap initialization
1999-02-21 15:11:09 +00:00
fvdl fb1a849339 Use different names for the "nfscon" label to tsleep(), so that it can
be seen in which one a process is sleeping.
1998-11-12 22:31:02 +00:00
drochner 864b7d54c6 Use the "atime" instead of "mtime" of the remote root directory as
base for inittodr() - it is closer to the current time.
1998-09-28 21:20:52 +00:00
perry 4522c799a1 bzero->memset, bcopy->memcpy, bcmp->memcmp 1998-08-09 20:51:08 +00:00
jonathan d275e56dee * defopt COMPAT_{09,10,11,12,13} and COMPAT_NOMID.
TODO: revisit interaction between native compat and emul compat usage.
1998-07-05 08:49:30 +00:00
sommerfe 7ba7fbbb23 Always include fifos; "not an option any more". 1998-06-24 20:58:44 +00:00
sommerfe becaafeea0 defopt for options FIFO 1998-06-22 22:00:59 +00:00
kleink 382743ada3 Convert fsync vnode operator implementations and usage from the old `waitfor'
argument and MNT_WAIT/MNT_NOWAIT to `flags' and FSYNC_WAIT.
1998-06-05 19:53:00 +00:00
fvdl 092f0654fe Re-instate call to "safe" disconnect function that got lost during the
Lite2 merge.
1998-03-24 13:49:21 +00:00
thorpej 40b5fe66e7 Historical practice assumes that NFS root mounts are initially read/write. 1998-03-03 19:07:20 +00:00
fvdl 4f0f4cecdb Don't try to apply the cookie endian heuristic on a mounted file (e.g.
a swapfile). From Matthias Drochner.
1998-03-03 13:32:28 +00:00
fvdl e5bc90f40c Merge with Lite2 + local changes 1998-03-01 02:20:01 +00:00
thorpej b5bf2ed6d0 Place a pointer to an array of our vnodeopv_desc *'s in our vfsops
structure, for use by vfs_attach().
1998-02-18 07:05:47 +00:00
fvdl 0c8ab9044c Only take the receive lock before disconnecting when doing it from
nfs_decode_args. Otherwise we might just end up locking against ourselves.

XXX workaround, will do ok for now. Proper fix forthcoming.
1998-01-30 22:44:13 +00:00
fvdl 1cf3a3db94 * Implement optional 32 <-> 64 bit directory cookie translation. This uses
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.
1997-10-19 01:46:15 +00:00
fvdl 7f7d814e67 * New directory entry caching system. Provides full caching of any
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.
1997-10-10 01:53:17 +00:00
gwr 5367793904 Move the call to nfs_boot_getfh() from nfs_vfsops.c to nfs_boot.c
(just for better isolation - it can now be static)
1997-09-09 21:39:17 +00:00
gwr 2f81e6c9c1 Supporting changes for the new BOOTP support in nfs_mountroot. 1997-08-29 16:12:49 +00:00
christos 7af5edbdc3 Fix reversed test for version 3 that broke nfs version 2 mounts. 1997-07-18 17:31:46 +00:00
fvdl 43e1b9384f * Deal with servers that don't give complete FSINFO (like NT)
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
1997-07-17 23:54:27 +00:00
mrg 295af85e9e remove swap configuration. 1997-06-12 17:12:17 +00:00
gwr 01adc15274 Minor reorganization of nfs_mountroot code to simplify BOOTP support.
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.
1997-05-27 23:37:39 +00:00
fvdl c7a919199a Silently clear NFSMNT_NOCONN if it's a TCP mount. 1997-02-22 02:48:26 +00:00
fvdl 64fcae7bcb * Make sure a new socket is created when switching to/from NOCONN with
a mount
* Add extra printf statements to hopefully get some more info on lockups,
  specifically when a send error is ignored.
1997-02-04 21:33:19 +00:00
thorpej 647fa23dc4 - Add nfs_mountroot to nfs_vfsops.
- Only attempt to mount NFS root on a DV_IFNET class device.
- If nfs_boot_init() failes, return the error code to the caller.
1997-01-31 03:00:31 +00:00
cgd 90688fce27 Change the second and third args to struct vfsops' (*vfs_mount)() to
'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...
1996-12-22 10:10:12 +00:00
thorpej f02e8b3cf0 Make NFSSERVER work without NFSCLIENT. This is achieved by splitting
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>.
1996-12-03 00:22:43 +00:00
thorpej aa25de69d1 NFS performance improvement from Doug Rabson/FreeBSD:
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>
1996-12-02 22:55:39 +00:00
fvdl 735944405b Enhancements from Matthias Drochner:
- 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.
1996-10-20 13:13:22 +00:00
christos bcf4552fb1 revert kprintf changes 1996-10-13 01:39:03 +00:00
christos 117a51c5a5 printf -> kprintf, sprintf -> ksprintf 1996-10-10 23:31:17 +00:00
pk 6e8ba625ef Ignore the mountpoint's `v_usecount' in nfs_unmount() if MNT_FORCE is on.
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.
1996-06-24 10:26:40 +00:00
cgd d73abf41aa avoid unnecessary checks of m_get/MGET/etc.'s return values. When
they're called with M_WAIT, they are defined to never return NULL.
1996-06-14 22:21:12 +00:00
fvdl 2847784948 * Make mounts with symlinks work (needed for direct mounts with amd). PR #1917
* 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.
1996-05-23 22:47:27 +00:00
fvdl fa29f1090f Return earlier on error in nfs_statfs. Should fix problem reported by
both mrg and cgd.
1996-03-24 23:58:10 +00:00
christos 3fac949f8f Fix printf format strings. 1996-03-17 02:38:20 +00:00
fvdl 146f96c2ce Make readdirsize default to rsize if rsize is explicitly specified,
and readdirsize isn't.
1996-03-13 00:38:55 +00:00
fvdl 5ac7df1caf Bring in a merge of Rick Macklem's NFSv3 code from Lite2 1996-02-18 11:53:36 +00:00
gwr b29ca3a272 Do the RPC to bootparamd a little later (just before the mountd call)
so that we do not ask for the "swap" path when swapping on disk.
1996-02-13 17:53:32 +00:00
christos e4c93ec893 nfs prototype changes 1996-02-09 21:48:19 +00:00
jtc 299e1fe9df Rename struct timespec fields to conform to POSIX.1b 1996-02-01 00:31:05 +00:00
cgd 3e0efb4d89 changes to make this work on systems where pointers & longs are 64 bits.
This is mostly just changes to make the stuff that goes over the wire
use fixed-size types.
1995-12-19 23:07:11 +00:00
mycroft 5482957905 splnet --> splsoftnet 1995-08-12 23:59:09 +00:00
cgd 8f62c773e8 don't assume the f_fsnamelen is nul-truncated or longer than MFSNAMELEN 1995-06-18 14:45:14 +00:00
mycroft 41a1b362f8 Fix more off by one errors. 1995-06-02 19:50:11 +00:00