Commit Graph

396 Commits

Author SHA1 Message Date
fvdl 44ab379124 The length check for readdirplus entries wasn't right, causing troubles
with 32k readdir sizes. From FreeBSD.
1999-12-05 01:43:06 +00:00
fvdl 5a7300902c Insert an extra VOP_ACCESS check in nfs_lookup, to avoid cached access
mishaps for lookup and getattr. Closes PR 8884.

While at it, cache access RPCs.
1999-11-29 23:34:00 +00:00
fvdl d901f6eae0 Be more careful to block bio interrupts for some data structures. There
were at least a few missed cases where vp->v_{clean,dirty}blkhd were
unprotected since the softdep/trickle sync merge.
1999-11-23 23:52:40 +00:00
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
fvdl f39cfa5c7b Stuff values in va_blocksize that are closer to reality. 1999-11-01 21:32:41 +00:00
sommerfeld ff0b960398 Fix bug in error handling for NFSv3 + nqnfs.
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).
1999-10-10 02:44:55 +00:00
is ee1ce1c15e Don't truncate minor numbers >= 256.
Problem reported by Saitoh Masanobu, fix by Frank van der Linden.
1999-09-06 09:27:18 +00:00
jdolecek 2ac419a152 Adapt to cache_lookup() changes.
XXX I had no chance to actually test the changes for nfs, but hopefully I got
it right.

Tested by: jdolecek
Rewieved by: wrstuden
1999-09-05 14:28:26 +00:00
drochner 6b4bfbbe10 Wait some seconds after the interface is brought up before packets
are sent. Needed at least for if_ti to get the link up.
1999-09-03 20:06:46 +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
sommerfeld 873713a5f7 Fix overzealous DIAGNOSTIC check in nfs_disconnect()
(fix pr8249, 8288)
1999-08-29 16:29:16 +00:00
wrstuden 3bf14d81e9 Add support for fcntl(2) to generate VOP_FCNTL calls. Any fcntl
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
1999-08-03 20:19:16 +00:00
wrstuden 3954583ce7 Teach nfs_lookup() to set PDIRUNLOCK when appropriate. Should resolve
PR 8051 by Konrad Schroder.
1999-08-02 18:58:23 +00:00
fvdl 3c9ce57651 Don't try to copy an mbuf that may have been freed in case of an error. 1999-07-30 09:46:24 +00:00
thorpej d7f9efdafc In nfs_create(), make sure error is reset to 0 if we restart the operation. 1999-07-29 17:01:21 +00:00
enami 18a17d4777 Don't use the result of inet_ntoa after calling the another inet_ntoa,
since they share the same static storage.
1999-07-26 02:16:35 +00:00
wrstuden 5e77d9fec1 Teach nfs_lookup to clear PDIRUNLOCK. 1999-07-08 22:53:08 +00:00
wrstuden 379a26972f Modify file systems to deal with struct lock in struct vnode. All leaf
fs's other than nfs use genfs_lock() for locking.

Modify lookup routines to set PDIRUNLOCK when they unlock the parrent.
1999-07-08 01:05:58 +00:00
drochner c867601f9f mount diskless root with "NFSMNT_NOCONN" (which is default in "mount_nfs"
for quite a while) to allow certain servers (multihomed, as our DEC NSE
cluster) to be used as root filesystem without special tweaks
1999-07-07 21:29:29 +00:00
sommerfeld c1ecf66965 kern/5591: Fix race in the NFS socket code during umount -f and system
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.
1999-07-04 19:56:00 +00:00
wrstuden 6e06666498 Add fhopen, fhstat, fhstatfs syscalls. Also move getfh in from the nfs
syscall code.
1999-06-29 22:18:47 +00:00
fvdl 5958c68bc5 Be more correct with attribute structures for setattr RPCs and friends,
so that picky servers (e.g. Solaris 7) don't refuse our requests. Move
some code into a macro, and a bit of KNF. From OpenBSD.
1999-05-29 01:22:03 +00:00
drochner 16f2b4c6a9 -print diskless boot related IP addresses in dot notation
-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
1999-05-07 15:17:26 +00:00
drochner 41b78a54f1 print diskless boot related IP addresses in dot notation 1999-05-07 15:10:03 +00:00
thorpej e3669c3393 Add "use counting" to file entries. When closing a file, and it's reference
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.
1999-05-05 20:01:01 +00:00
sommerfe 6f883a0b1c Include checks (under DIAGNOSTIC) to catch vnode lock leaks soon after
they happen (while we still know which remote op is to blame for it),
instead of later when we trip over the already-locked vnode.
1999-05-04 16:08:02 +00:00
sommerfe 623d43160b Fix vnode lock leak in nfsrv_mknod() if to-be-created vnode already existed. 1999-05-04 16:01:37 +00:00
ross 4634c0e3d4 libkern just got an inet_addr(), but it won't compile, no prototype. Cleanup...
* 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
1999-04-12 01:05:01 +00:00
gwr 2c54ffdf02 Enable the code that gets our gateway+netmask from the
bootparam server using the "gateway" pseudo file.
(Compatible with sys/lib/libsa/dev_net.c)
1999-04-11 22:15:25 +00:00
mycroft afa07de60d Fix two problems with NFSV3CREATE_GUARDED:
* 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.
1999-03-30 12:01:18 +00:00
sommerfe e94a23c0ef Fix crash reported in PR7116 on shutdown 1999-03-25 04:07:33 +00:00
mrg d2397ac5f7 completely remove Mach VM support. all that is left is the all the
header files as UVM still uses (most of) these.
1999-03-24 05:50:49 +00:00
kleink 9ee75a4fcc Add _PC_FILESIZEBITS to pathconf vnop. 1999-03-22 19:21:07 +00:00
fvdl 84c33581df ..JUKEBOX can happen on writes too. 1999-03-16 23:24:28 +00:00
fvdl df3c103b26 The JUKEBOX error may be returned by the read operation, so don't
filter it out.
1999-03-16 23:22:57 +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 bc94ad4c5e Rationalize the vfs_checkexp macro to be VFS_CHECKEXP. 1999-02-27 00:47:34 +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
drochner 27098b1199 restructure the diskless NFS boot code to keep track of the used
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
1999-02-21 15:07:49 +00:00
thorpej a4376d6a58 Fix printf format problems on Alpha. 1999-02-12 01:38:38 +00:00
thorpej 1b97ad6910 Fix printf format warnings on Alpha. 1999-02-12 01:37:06 +00:00
mrg 1c93cc902d non-root users can mkfifo over NFS. 1999-01-31 09:24:10 +00:00
thorpej a3574d12b6 Clean up the NFS sysctl variables. 1998-11-13 20:09:54 +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
mycroft 6957bd875c Do not permit the u area for nfsd or nfsiod to be swapped out. 1998-11-08 15:57:44 +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
christos d758aee3a9 Fix copyright spacing. 1998-09-13 13:49:29 +00:00
mycroft fb526e055c Substantial signal handling changes:
* 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.
1998-09-11 12:50:05 +00:00