Commit Graph

320 Commits

Author SHA1 Message Date
thorpej 40b5fe66e7 Historical practice assumes that NFS root mounts are initially read/write. 1998-03-03 19:07:20 +00:00
fvdl 05acb550be Only free cookies on error when they were actually allocated by the readdir vop. 1998-03-03 13:38:32 +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 9329c1df98 Fix cookie handling I messed up totally when doing the Lite2 thing.
(Hello McFly? Anybody home?)
1998-03-03 00:17:04 +00:00
veego 190f3ca410 Add two includes for the 'struct nfs_args' so it compiles again. 1998-03-01 17:37:32 +00:00
ross 331fee623e Sweep up some miscellaneous leftover lite2 integration shrapnel. 1998-03-01 07:15:39 +00:00
fvdl e5bc90f40c Merge with Lite2 + local changes 1998-03-01 02:20:01 +00:00
cgd 4ae42be026 be a bit more clear about what protocols will be tried in the
BOOTP/DHCP case.
1998-02-28 01:45:01 +00:00
thorpej 2146a2ed29 Include the NFS option header. 1998-02-19 00:54:13 +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
mrg d90485202c - add defopt's for UVM, UVMHIST and PMAP_NEW.
- remove unnecessary UVMHIST_DECL's.
1998-02-10 14:08:44 +00:00
chs f64abc7b4c add flags arg to hashinit(), to pass to malloc(). 1998-02-07 02:44:44 +00:00
mikel a5ffacd6cf ELAST incremented, update nfsrv_v2errmap[] initialization 1998-02-06 08:22:54 +00:00
mrg 1a8c7604f4 initial import of the new virtual memory system, UVM, into -current.
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.  :-)
1998-02-05 07:59:28 +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 dba168ad94 Refuse to create entries in the dir cache for offset 0. This is a special
case anyway, and amd(8) erroneously returns some entries with cookie 0.
Fixes PR 4844
1998-01-22 00:53:59 +00:00
scottr ecc55fb707 Consolidate NFS_BOOT_* options into opt_nfs_boot.h 1998-01-12 21:27:09 +00:00
scottr afc2a8933a Make NFS_BOOT_DHCP work as expected. 1998-01-11 05:55:40 +00:00
drochner b5bcdb1107 Conditionalize call to RARP, check interface type.
(This file can now be included even if no ARP capable interfaces are
defined.)
1998-01-09 15:16:55 +00:00
drochner 2179b6488a Use interface type to select "hardware type" in bootp header. 1998-01-09 15:13:44 +00:00
drochner 9e7604474f Use new options "NFS_BOOT_BOOTP" and "NFS_BOOT_BOOTPARAM" for parts
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".)
1998-01-09 15:10:37 +00:00
fvdl 787c8aa329 Check vnode for VDIR type before doing anything with it in the
NFS readdir service.
1997-12-22 00:09:02 +00:00
gwr 21ce121705 Temporarily disable the bootparam "gateway" support. 1997-12-12 21:09:49 +00:00
gwr 0aa79a60f4 Change the format of the bootparam "gateway" parameter string to
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.)
1997-12-10 20:22:37 +00:00
fvdl 26a975b107 Move the EOF check after getting a block out of the if() that determines
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.
1997-11-23 13:52:24 +00:00
fvdl e46f160a4a Make sure the receive lock is taken when disconnecting a socket. Also
change a check for a 'connected' socket to use the socket rather than
the mount flags.

From Matthias Drochner.
1997-11-16 23:23:20 +00:00
fvdl aac8e91164 Oops. Fix goof in previous change. 1997-10-23 14:12:14 +00:00
fvdl 6b89492d21 Just return immediately in nfs_bioread if we got an empty buffer because
of EOF on a directory.
1997-10-22 01:45:16 +00:00
thorpej 98bb00f98f Fix alignment problems. From Frank van der Linden <fvdl@NetBSD.ORG>. 1997-10-20 22:08:44 +00:00
fvdl 6cdaaab885 Only do readaheads when reading sequential blocks; check v_lastr to
achieve this. Improves performance for demand paging. From Chris Demetriou.
1997-10-19 20:27:32 +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 6caf9310c8 NFS_SMALLFH should be a multiple of 4; since the nfsnode struct may grow
one more member, just make it the minimum (32) now.
1997-10-17 08:10:21 +00:00
christos d4d4c2efbc nfstov_mode converts 32 bits now.
change NFS_SMALLFH from 44 to 38 to accommodate the mode_t and nlink_t changes.
1997-10-17 00:02:16 +00:00
christos 8b88b63c52 u_short -> mode_t 1997-10-17 00:00:41 +00:00
christos 280d4b5839 Fix the location of the NFS_SMALLFH 1997-10-16 23:59:34 +00:00
fvdl 8cc94a2371 Get rid of some MARKCACHED calls I thought better of. Make sure d_reclen
is aligned for off_t access, or things will break on the Alpha.
1997-10-13 08:35:53 +00:00
fvdl c3ce5f02ea Do negative lookup caching. Use a timestamp of the oldest negative cache
entry, so it can be checked against directory modification time for
validity.
1997-10-12 23:13:35 +00:00
fvdl 01e7c03e2e Move cookie heuristic function inside ifdef NFS, to make a kernel with server
code but without client code link again. From Erik Bertelsen, PR 4259
1997-10-11 02:09:48 +00:00
fvdl 8aa50b9159 Fix unitialized var warning (did not appear on i386, but did on sparc). 1997-10-10 13:21:51 +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
drochner 9a7e1c1d7e Make this file deserve its name: add DHCP support, conditionalized
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.
1997-09-30 20:51:03 +00:00
drochner 34f6ce854a Use functions (shared with DHCP boot) in nfs_boot.c. 1997-09-30 20:46:17 +00:00
drochner 7de7853c54 Factor out some functions used by bootparam and DHCP boot. 1997-09-30 20:44:31 +00:00
thorpej 6b2d5c18a7 Correct a comment regarding the sense of the nfs_boot_rfc951 global. 1997-09-13 06:16:04 +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 d0a27c5bdd Circumvent the lack of a reliable gateway/netmask value in the
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
1997-09-09 21:36:35 +00:00
gwr 258bcc09af Change test from NETHER to NARP (revarpwhoami is in if_arp.c) 1997-09-02 21:33:17 +00:00
gwr 2f81e6c9c1 Supporting changes for the new BOOTP support in nfs_mountroot. 1997-08-29 16:12:49 +00:00
gwr 79c1e7ca6b Add support for nfs_mountroot using BOOTP based on the contributions
of Tor Egge (closes PR kern/2351).
1997-08-29 16:10:31 +00:00
gwr 78e695f5b3 Support for RARP,RPC/bootparam moved from nfs_boot.c to here. 1997-08-29 16:07:46 +00:00