Commit Graph

288 Commits

Author SHA1 Message Date
fvdl
e4145cb406 Align things right in NWDELAYHASH (for the Alpha). This fixes crashes in
the server code. From John Birell.
1996-05-27 11:22:31 +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
mycroft
49d52c9b1c Pass a proc pointer down to the usrreq and pcbbind functions for PRU_ATTACH, PRU_BIND and
PRU_CONTROL.  The usrreq interface really needs to be split up, but this will have to wait.
Remove SS_PRIV completely.
1996-05-22 13:54:55 +00:00
mycroft
261382c331 Change VOP_UPDATE() semantics:
* Make 2nd and 3rd args timespecs, not timevals.
* Consistently pass a Boolean as the 4th arg (except in LFS).
Also, fix ffs_update() and lfs_update() to actually change the nsec fields.
1996-05-11 18:26:27 +00:00
thorpej
3b8a528094 Changed struct ifnet to have a pointer to the softc of the underlying
device and a printable "external name" (name + unit number), thus eliminating
if_name and if_unit.  Updated interface to (*if_watchdog)() and (*if_reset)()
to take a struct ifnet *, rather than a unit number.
1996-05-07 02:51:25 +00:00
thorpej
b417cc19fe Make this compile again on a SPARC if NFSCLIENT is defined without
NFSSERVER.  (-Wall unused variable lossage)
1996-04-15 20:20:00 +00:00
thorpej
ea39811fd8 Make these link in the absense of "options FIFO". 1996-04-03 23:25:36 +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
fvdl
c0d2b279c6 Make sure not to free the reply mbuf twice. Should fix PR #2240 1996-03-20 21:59:56 +00:00
christos
3fac949f8f Fix printf format strings. 1996-03-17 02:38:20 +00:00
fvdl
f5e6df1ed0 Disable invalidating of directory offsets cookies. Should fix one or two
directory problems.

XXX There is no clean solution to the cookie/cookieverifier validity mess.
    Together with the disabled strict cookie check, this puts us back at
    what v2 did in this case. Slightly better solution possible by
    consequently storing 64bit cookies in other places too.
1996-03-13 00:44:17 +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
jtk
6c62245a7b fix panic "leaf should be empty" on diagnostic kernels when unlinking on
a read-only file system.
1996-03-05 05:30:09 +00:00
jtk
115750720d Do not return whiteout directory entries in NFS readdir replies. (The
NFS protocol doesn't know how to deal with them properly, yet.)
1996-03-02 15:55:52 +00:00
fvdl
52d04f3b3f Make sure to clear B_NEEDCOMMIT in the right spot. Fix 'officially blessed'
by Rick Macklem. Fixes PR kern/2128.
1996-02-29 20:26:16 +00:00
fvdl
3821dd940b Oops. Do previous fix on the right line this time.. (thanks Charles) 1996-02-25 17:47:26 +00:00
fvdl
1f20fc9fc2 Call soreserve() with the right size for receives (from pk). 1996-02-25 15:30:01 +00:00
cgd
e98dc62664 Third argument to VOP_PATHCONF is a register_t *, and register_t may be
different than 'int'.  Do the right thing when declaring variables which
are used this way.
1996-02-20 23:45:10 +00:00
fvdl
e9788cf246 Fix a missing 'error =' before 'if (error)'. 1996-02-18 14:06:50 +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
04ff35d122 Add stub for nfs_boot_getfh if NETHER==0 1996-02-16 15:18:19 +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
216907979a add 2 missing fwd struct declarations 1996-02-13 17:06:52 +00:00
pk
b153275d13 Don't return EBADRPC if we have something else. 1996-02-10 22:55:16 +00:00
christos
e4c93ec893 nfs prototype changes 1996-02-09 21:48:19 +00:00
mycroft
c9c8301a91 Fix vop_link, vop_symlink, and vop_remove semantics in several ways:
* Change the argument names to vop_link so they actually make sense.
* Implement vop_link and vop_symlink for all file systems, so they do proper
  cleanup.
* Require the file system to decide whether or not linking and unlinking of
  directories is allowed, and disable it for all current file systems.
(Also, remove the cross-device link check, that was moved into the file
systems some time ago.)
1996-02-09 15:47:11 +00:00
mycroft
53fccab940 Fix vop_link, vop_symlink, and vop_remove semantics in several ways:
* Change the argument names to vop_link so they actually make sense.
* Implement vop_link and vop_symlink for all file systems, so they do proper
  cleanup.
* Require the file system to decide whether or not linking and unlinking of
  directories is allowed, and disable it for all current file systems.
1996-02-09 14:45:36 +00:00
jtc
2ea599d8f8 Rename struct timespec fields to conform to POSIX.1b 1996-02-01 00:41:19 +00:00
jtc
299e1fe9df Rename struct timespec fields to conform to POSIX.1b 1996-02-01 00:31:05 +00:00
mycroft
59d1cce3ae Don't specify a uid or gid in create operations; let the server fill it in. 1996-01-31 05:13:33 +00:00
mycroft
85f2006f7a Correct some uses of -1 and VNOVAL. 1996-01-31 04:24:35 +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
ghudson
d61f235615 Add cookie support. Stash cookies in the word prior to the end of
each entry, and read them out in nfs_readdir().

Caveat: our current caching method for directory blocks uses the
server offset of the first directory entry as an identifier, so a
Linux emulation getdirentries() will wind up retrieving one block from
the NFS server for each directory entry, unnecessarily thrashing the
cache.  The situation isn't as bad for other emulations.

Instead of getblk(), we need to write a routine to scan each cache
block associated with vp to find a cookie that matches at some
directory entry.  Some later time.
1995-10-14 00:56:07 +00:00
mycroft
b12f4a4409 For now, return EINVAL if the client needs cookies. 1995-10-09 11:25:30 +00:00
mycroft
245f292fed Prefix names of system call implementation functions with `sys_'. 1995-10-07 06:25:19 +00:00
thorpej
60024eb978 Make system calls conform to a standard prototype and bring those
prototypes into scope.
1995-09-19 21:40:36 +00:00
ws
4d035ffc4d No point in computing cn_hash here,
as it gets immediately recomputed in lookup
1995-09-08 13:52:23 +00:00
mycroft
5482957905 splnet --> splsoftnet 1995-08-12 23:59:09 +00:00
gwr
19969f2fe2 Use RPCAUTH_UNIX in requests to please picky NFS servers. 1995-08-08 20:43:43 +00:00
cgd
e9d17d38b5 avoid unnecessary aging of buffers. This used to make sense, when buffer
caches were much smaller, but makes little sense now, and will become more
useless as RAM (and buffer cache) sizes grow.  Suggested by Bob Baron.
1995-07-24 21:19:27 +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
6897f39ae9 Various cleanup, including:
* Convert several data structures to use queue.h.
* Split in_pcbnotify() into two parts; one for notifying a specific PCB, and
one for notifying all PCBs for a particular foreign address.
1995-06-12 00:46:47 +00:00
mycroft
41a1b362f8 Fix more off by one errors. 1995-06-02 19:50:11 +00:00
mycroft
f1365566f1 Fix another off by one error. 1995-06-02 18:49:31 +00:00
mycroft
b1b27effa0 Imported group list now starts at offset 0, not 1. 1995-06-02 18:38:57 +00:00
mycroft
f5f32d8328 Exported group list now starts at offset 0, not 1. 1995-06-02 18:35:50 +00:00
jtc
95ded74f58 Moved egid credential from cr_groups[0] to new field cr_gid. POSIX.1
requires that sgid executables and the setuid() syscall *not* change
the supplemental group list.
1995-06-01 22:43:30 +00:00
mycroft
1448ab7a19 Remove gratuitous extra indirections. 1995-05-23 06:22:45 +00:00
cgd
f66bf5fd18 don't blindly set IFF_UP; or it with old flags 1995-05-23 00:14:06 +00:00
mycroft
f6ff0fba6d Use fxdr_*() and txdr_*() macros to do byte order conversions. 1995-05-20 01:52:49 +00:00
cgd
14b1452a90 kill unnecessary blank line at end of file 1995-04-30 07:03:13 +00:00
gwr
d73db495da Fixed RPC code to deal with RPC messages larger than one mbuf. 1995-04-24 21:54:56 +00:00
gwr
1012443810 Cosmetic changes suggested by Adam. 1995-03-28 21:29:32 +00:00
jtc
f76f1f89ad KERNEL -> _KERNEL 1995-03-26 20:35:13 +00:00
gwr
ca3ff7bdd8 Initialize fields in the RPC data where we were sending garbage. 1995-03-18 05:56:32 +00:00
gwr
8f7b63df4e Print the "root/swap on ..." messages here.
Add NFS_BOOT_OPTIONS for things like NFSMNT_NOCONN.
1995-03-18 05:54:10 +00:00
gwr
efc4706419 Do the printf "root/swap on" elsewhere to avoid confusion. 1995-03-18 05:51:22 +00:00
gwr
4b284ae4ba Make call to nfs_writerpc() consistent with others. 1995-03-18 05:49:51 +00:00
mycroft
2f805fa51b copy*str() should use size_t. 1995-03-09 12:05:21 +00:00
pk
d6faa0bf9c Working "config generic" support; from Theo. 1995-02-16 21:42:50 +00:00
mycroft
7b85c59a4e Turn mountlist into a CIRCLEQ, and handle setting and checking of MNT_ROOTFS
differently.
1995-01-18 06:15:17 +00:00
mycroft
396d1c1d0c Convert unspecified usec value to 0, per discussion with Rick. 1995-01-13 16:15:02 +00:00
mycroft
775d061b43 Add two missing brelse() calls. From Rick Macklem. 1995-01-12 12:08:23 +00:00
mycroft
69eef46dd1 Make sure readdir requests are only truncated on block boundaries. 1995-01-10 06:50:03 +00:00
mycroft
e16d63a4c0 Minor consistency nits. 1994-12-29 22:21:37 +00:00
mycroft
d23d4ad181 Remove a bit of redundant code. 1994-12-29 22:16:19 +00:00
mycroft
609063ce2b Format police. 1994-12-27 19:05:12 +00:00
mycroft
34c8e07091 Fix typos in last change. 1994-12-27 19:00:20 +00:00
ws
2f0fb8ee09 Implement and use a common access checking routine 1994-12-24 16:44:12 +00:00
mycroft
527b796ff5 Turn lease_check() into a vnode op, per CSRG. 1994-12-13 20:14:30 +00:00
mycroft
629ef9cd78 Sync with CSRG. 1994-12-13 17:17:01 +00:00
mycroft
6bd48aee2d Remove an old `#ifdef notyet'. 1994-12-13 16:18:48 +00:00
cgd
58604c58ca fix a couple of obvious, painful endianness bugs introduced in last commit. 1994-10-29 06:38:11 +00:00
cgd
6b7c260753 new RCS ID format. 1994-10-26 02:45:11 +00:00
cgd
6f353db960 update for new syscall args description mechanism 1994-10-20 04:28:10 +00:00
gwr
62f18b1dda Do the first BOOTPARAM RPC call to the broadcast address instead of
using the address of the RARP server because a BOOTPARAM server
might not be running on the machine that sent the RARP reply.
1994-09-26 16:42:29 +00:00
pk
cdf3d1ed89 mknod() must release its new vnode. 1994-08-30 19:42:22 +00:00
pk
e052143aab When updating an NFS mountpoint, we cannot just increase rsize' or wsize'
without also adjusting the corresponding socket buffers. We could probably
call sbrelease/sbreserve/soreserve ourselves without much harm, but we'd
have to duplicate much of the logic in nfs_connect(). In stead, blow the
socket away entirely and let nfs_connect() do its job again.
1994-08-23 09:31:00 +00:00
cgd
56364fe8b1 cleanliness; don't wrap lines. 1994-08-21 21:07:13 +00:00
mycroft
27377e3e10 Don't attempt to use IO_APPEND for NQNFS, as suggested by Rick Macklem. 1994-08-21 15:10:44 +00:00
mycroft
f7c13d44bd More LIST/CIRCLEQ migration. 1994-08-18 22:47:43 +00:00
mycroft
8743009944 Convert some more lists and queues. 1994-08-17 14:43:47 +00:00
mycroft
7b8734f3e8 Use LIST and TAILQ for hash chain and LRU chain, respectively. 1994-08-17 12:34:12 +00:00
mycroft
dbd174a5da Change the reply list to a TAILQ. 1994-08-17 11:41:36 +00:00
gwr
f23d6f0929 Add the option NFS_BOOT_RWSIZE to allow diskless boot configuration
to start with a reduced NFS read and write size (need for wd8003).
1994-08-14 03:35:27 +00:00
pk
4e501cd0bf Files with > 1 links can always be removed on the server, even if a
"silly name" exists.
1994-08-13 08:46:53 +00:00
cgd
c4b592cd82 fix typo 1994-08-12 04:31:51 +00:00
cgd
8814bea1a6 kill two errant spaces. 1994-08-12 03:49:24 +00:00
mycroft
1f532b06bd char * --> caddr_t, where appropriate. 1994-08-11 23:47:51 +00:00
gwr
38cca96798 Diskless boot will now bind the local socket to a reserved port to
satisfy picky servers.  Also fix some missing initializations.
(Thanks to Chuck Cranor for PR#394 -- now fixed.)
1994-08-11 22:25:32 +00:00
deraadt
0e5ad5faf5 delete unused extern decl 1994-08-08 19:29:29 +00:00
mycroft
9c55cb1c79 Set the group list length when copying credentials. 1994-07-22 23:16:36 +00:00
mycroft
24f8e9187d Fix a problem with write-behind causing processes to be killed occasionally.
From Rick Macklem.
1994-07-20 04:16:01 +00:00
gwr
dc718c003d Fix the conditionally compiled code inside #ifdef NFS_BOOT_GATEWAY
and make some printf args use host byteorder.
1994-07-19 02:23:27 +00:00
paulus
a02a99e328 If we don't have ethernet, nfs_boot_init reduces to just a panic.
This is so I don't get an undefined symbol compiling a kernel with
NFSCLIENT but no ethernet.
1994-07-16 11:43:12 +00:00
cgd
65855280c7 minor cache consistency fix 1994-07-12 21:03:14 +00:00
mycroft
a28c342dee Bug fix from Rick Macklem for a problem with linking to an open file. 1994-07-12 19:46:36 +00:00
mycroft
2896174213 Save FS type at mount time for some later tests. 1994-07-03 09:24:01 +00:00
mycroft
c6d5fd7263 Fix problem with O_TRUNC and NFS device nodes. 1994-07-03 09:22:37 +00:00
pk
4070698468 error codes are in network order too. 1994-06-30 10:45:03 +00:00
deraadt
9bc624e44c knf 1994-06-29 07:28:36 +00:00
cgd
fccfa11af5 New RCS ID's, take two. they're more aesthecially pleasant, and use 'NetBSD' 1994-06-29 06:39:25 +00:00
gwr
ccb36b6b7d Minor nits: replace ... with ...
p->p_cred->pc_ucred	p->p_ucred
	x / DEV_BSIZE		x >> DEV_BSHIFT
1994-06-28 19:12:59 +00:00
pk
bccc2c3c1b straighten out diskless swap code somewhat. 1994-06-22 14:01:45 +00:00
pk
2d90c57d10 Construct mountpath for remote root. 1994-06-21 08:30:20 +00:00
mycroft
0d8affb278 Turn P_NOSWAP and P_PHYSIO into a hold count, as suggested by a comment. 1994-06-15 19:59:21 +00:00
gwr
b7692860e5 Fix false "hits" in the attribute cache when booting diskless.
(Yet another thing that breaks when time.tv_sec is near zero...)
1994-06-14 03:29:12 +00:00
mycroft
fee90785c2 Move a misplaced #endif. 1994-06-13 16:00:41 +00:00
mycroft
d87a71b8c8 Undo last change. 1994-06-13 15:39:13 +00:00
gwr
3247b5928d Fix unresolved: prtactive 1994-06-13 15:33:32 +00:00
gwr
0784b58d30 New diskless boot code (uses RARP, bootparamd). 1994-06-13 15:28:55 +00:00
mycroft
0c51ee36cb Clean up deleted files. 1994-06-08 11:37:21 +00:00
mycroft
cde1d47595 Update to 4.4-Lite fs code, with local changes. 1994-06-08 11:33:09 +00:00
cgd
f42a80c7ea MIN -> min, MAX -> max 1994-05-24 02:33:03 +00:00
cgd
4da98bee08 stupidity for prototypes... 1994-05-19 05:04:07 +00:00
cgd
6dad8d7a8a put sync printing in one place 1994-05-18 00:35:07 +00:00
mycroft
0ae81ecb6b Trivial function name change. 1994-05-13 06:12:51 +00:00
mycroft
945e278f4e Cast some args to caddr_t. 1994-05-11 22:26:09 +00:00
cgd
a0a7429482 lots of changes: prototype migration, move lots of variables, definitions,
and structure elements around.  kill some unnecessary type and macro
definitions.  standardize clock handling.  More changes than you'd want.
1994-05-05 05:35:42 +00:00
glass
e22b4a56ec i really wish i knew what was wrong 1994-04-29 15:54:10 +00:00
cgd
d071d1cf05 some prototype cleanup, eliminate/replace bogus types (e.g. quad and
u_quad) -> use better types (e.g. quad_t & u_quad_t in inodes),
some cleanup.
1994-04-25 03:49:27 +00:00
cgd
4917d8beec make fs types consistent over new kernels. also, some proto foo. 1994-04-23 07:54:38 +00:00
cgd
f7003b8eba blow away all vestiges of nfsnode locking.
(1) it's unnecessary
	(2) it causes machines to hang (yup!)
	(3) it'd be gone in a few days anyway (it'd been yanked out
		of 4.4-Lite by macklem long ago)
It was only there because macklem couldn't originally decide if things
should be locked, or not...
1994-04-21 23:23:29 +00:00
cgd
3dda0064a5 Convert mount, vnode, and buf structs to use <sys/queue.h>. Also,
some knf and structure frobbing to do along with it.
1994-04-21 07:47:31 +00:00
glass
a3b042140f revised nfs diskless support. uses bootp+rpc to gather parameters 1994-04-18 06:18:05 +00:00
pk
092d94c85b Remove bogus type translation; in stead, use IFTOVT again to go from
`NFS mode bits' to `vnode type'.
Use aliased vnode consistently.
1994-04-14 10:27:46 +00:00
cgd
93159ea799 fs types are names now. 1994-04-14 04:05:45 +00:00
cgd
3337b6ac3c patchkit date deletions! 1994-04-10 06:45:56 +00:00
cgd
a61aa87590 make damn sure nothing's holding on the the mount point vnode 1994-04-10 01:22:23 +00:00
glass
9f7fed2901 make panic string unique 1994-03-31 05:44:49 +00:00
cgd
d7ce0b81a2 expand uid_t/gid_t/off_t 1994-03-27 09:09:21 +00:00
cgd
2beaff5c30 fix rcs id 1994-03-12 01:31:32 +00:00
ws
ec20310be9 Oops. Bug fix for nfs server. Reported by Theo. 1994-03-10 16:56:14 +00:00
ws
ce516ff13d Make FFS optional 1994-03-09 21:21:37 +00:00
pk
4013a20ab3 Enable nfs_lock(); useful when IO_APPEND'ing. 1994-03-01 20:31:09 +00:00
glass
b4b437e1c3 remove some warnings 1994-03-01 08:00:02 +00:00
mycroft
bc47f533d5 Macros bite again. 1994-02-15 21:43:09 +00:00
mycroft
28abb89625 Format police. 1994-02-15 21:26:01 +00:00
pk
e85a637bca Update {a,m}time vnode attributes on special files a la ufs_vnode.c,
but make it a non-urgent operation, to leave us some performance.
1994-02-15 21:07:10 +00:00
cgd
489bece05f be more intelligent with credentials, so nfsd's don't inherit
strange credentials.  This doesn't actually have any effect on
performance, because the remote cred is used for all operations,
anyway.  however, it makes "ps" et al. look normal, because the
proc's ucred is no longer clobbered.
1994-02-14 05:58:29 +00:00
mycroft
805c52eecb Eliminate some more uses of b_actl. 1994-02-06 11:28:37 +00:00
brezak
ae0948f33c Include nfs_hack_mountroot() in NFSDISKLESS_HARDWIRE 1994-01-18 01:35:15 +00:00
pk
acc0f12ec0 reparations... 1994-01-10 13:29:26 +00:00
pk
36655da823 Don't deny unlink()s of files with the "silly" bit on, but still have > 1 links,
but avoid doing gratuitous (possibly expensive) get_attr() calls.
1994-01-10 09:37:05 +00:00
cgd
2c5c3a2774 add support for union and loopback mounts, from jsp 1994-01-04 14:10:48 +00:00
cgd
953dee1999 fix nfs_print, add cross-device link checking (From jsp) 1993-12-22 13:03:22 +00:00
cgd
929c86a29b change return type of nfs_print back to int 1993-12-22 13:00:36 +00:00
cgd
de2aefd4b8 minor cleanup 1993-12-22 04:13:50 +00:00
cgd
ed9fe288db oops; fix last 1993-12-21 08:07:09 +00:00
cgd
6aa0cb00c6 from jsp: Changed to get attributes of root node and
generate correct type, rather than assuming it's a directory.
This allows Amd direct mounts to work correctly.
1993-12-21 07:49:30 +00:00