aboutsummaryrefslogtreecommitdiff
path: root/sys/nfsserver
Commit message (Collapse)AuthorAgeFilesLines
* Remove the 'waslocked' parameter to vfs_object_create().Eivind Eklund1999-01-051-2/+2
| | | | Notes: svn path=/head/; revision=42315
* Silence -Wtrigraph.Tim Vanderhoek1998-12-301-4/+4
| | | | | | | Submitted by: Bradley Dunn <bradley@dunn.org> (pr: kern/8817) Notes: svn path=/head/; revision=42155
* Fix for creating files on a Solaris 7 server with NFSv3 (the request wasDoug Rabson1998-12-251-11/+62
| | | | | | | | | slightly garbled but older servers seemed to understand it). Reviewed by: David O'Brien <obrien@nuxi.ucdavis.edu> Notes: svn path=/head/; revision=42060
* Added 3 new errno values, requred by various standards: EOVERFLOW,Dmitrij Tejblum1998-12-141-2/+3
| | | | | | | | | | ECANCELED, EILSEQ. Fixed ibcs2 and especially linux EIDRM and ENOMSG errno mapping. Reviewed by: Dan Nelson <dnelson@emsphone.com> Notes: svn path=/head/; revision=41796
* Remove the if fixed in the last commit; bde quite correctly point outEivind Eklund1998-12-091-3/+2
| | | | | | | that it can never fail. Notes: svn path=/head/; revision=41619
* Fix typo (; in "if (vp == NULL);").Eivind Eklund1998-12-081-2/+2
| | | | Notes: svn path=/head/; revision=41606
* The "easy" fixes for compiling the kernel -Wunused: remove unreferenced staticArchie Cobbs1998-12-073-6/+3
| | | | | | | and local variables, goto labels, and functions declared but not defined. Notes: svn path=/head/; revision=41591
* Fix a panic in nfsrv_dorec() where a NULL pointer could be passed toDoug Rabson1998-11-131-2/+4
| | | | | | | | | free() sometimes. Reviewed by: Eric Haug <ejh@eas.slu.edu> Notes: svn path=/head/; revision=41132
* Remove [apparently] bogus casts to u_long for the vnode_pager_setsize()Peter Wemm1998-11-091-3/+3
| | | | | | | | | | second argument. np_size is a 64 bit int, so is the second arg. This might have caused needless 2G/4G file size problems. I believe it was Bruce who queried this. Notes: svn path=/head/; revision=41026
* vm_object_page_clean() last arg changed from TRUE to OBJPC_SYNC. I'm notPeter Wemm1998-10-311-2/+2
| | | | | | | | | sure that this is necessary to be a sync write here since a VOP_FSYNC() follows and it will schedule, sort and complete the writes that the vm_object_page_clean() started (as I think I understand things). Notes: svn path=/head/; revision=40792
* Use TAILQ macros for clean/dirty block list processing. Set b_xflagsPeter Wemm1998-10-311-3/+3
| | | | | | | rather than abusing the list next pointer with a magic number. Notes: svn path=/head/; revision=40790
* The code checks each fragment mark to see if it's valid; if the fragmentKirk McKusick1998-09-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | is less than NFS_MINPACKET or greater than NFS_MAXPACKET in size, it barfs and, I think, drops the connection. However, there's no guarantee that in a multi-fragment RPC, all the fragments will be at least as large as NFS_MINPACKET. In fact, with the version of "tclnfs" we have here, which supports NFS over TCP, at least when built under SunOS 4.1.3 (i.e., with 4.1.3's user-mode ONC RPC library), I can *repeatably* cause "tclnfs" to send a request with more than one fragment, one of which is only 8 bytes long. I just do a 3877-byte write to a file, at an offset of 0. The check that "slp->ns_reclen" is greater than or equal to NFS_MINPACKET serves no useful purpose - if the NFS server code can't handle packets < NFS_MINPACKET bytes, it can't handle them over *any* protocol, so the check has to be done above the RPC-over-TCP layer - and should be removed. Obtained from: Fix from Guy Harris, forwarded by Rick Macklem. Notes: svn path=/head/; revision=39788
* Made unloading of the nfs LKM sort of work. This is mainly to testBruce Evans1998-09-074-7/+47
| | | | | | | | | detachment of vfs sysctls. Unloading of vfs LKMs doesn't actually work for any vfs, since it leaves garbage pointers to memory allocation control structures. Notes: svn path=/head/; revision=38894
* Instantiate `nfs_mount_type' in a standard file so that it is presentBruce Evans1998-09-051-2/+1
| | | | | | | | | | | when nfs is an LKM. Declare it in a header file. Don't forget to use it in non-Lite2 code. Initialize it to -1 instead of to 0, since 0 will soon be the mount type number for the first vfs loaded. NetBSD uses strcmp() to avoid this ugly global. Notes: svn path=/head/; revision=38866
* Check for NULL pointer before freeing a struct sockaddr. m_freem() can handleLuoqi Chen1998-09-011-2/+3
| | | | | | | NULL, buf free() can't. Notes: svn path=/head/; revision=38718
* Yow! Completely change the way socket options are handled, eliminatingGarrett Wollman1998-08-234-23/+47
| | | | | | | | | another specialized mbuf type in the process. Also clean up some of the cruft surrounding IPFW, multicast routing, RSVP, and other ill-explored corners. Notes: svn path=/head/; revision=38482
* If we get an ENOBUFS from the network, it's normally transient networkPeter Wemm1998-08-011-1/+11
| | | | | | | | | | | | interface congestion (eg: nfs over a ppp link, etc). Don't log these for UDP mounts, and don't cause syscalls to fail with EINTR. This stops the 'nfs send error 55' warnings. If the error is because the system is really hosed, this is the least of your problems... Notes: svn path=/head/; revision=37997
* Cast pointers to uintptr_t/intptr_t instead of to u_long/long,Bruce Evans1998-07-151-3/+3
| | | | | | | | | | respectively. Most of the longs should probably have been u_longs, but this changes is just to prevent warnings about casts between pointers and integers of different sizes, not to fix poorly chosen types. Notes: svn path=/head/; revision=37649
* Moved `#ifndef NFS_NOSERVER' after including nfs.h.KATO Takenori1998-07-021-2/+2
| | | | Notes: svn path=/head/; revision=37339
* fix buildworld hopefully be3fore anyone complains...John-Mark Gurney1998-06-302-2/+6
| | | | | | | | | | | NFS_*TIMO should possibly be converted to sysctl vars (jkh's suggestion), but in some cases it looks like nfs keeps a copy of the value in a struct hash sizes are already ifdef'd KERNEL, so there aren't userland inpact from them... Notes: svn path=/head/; revision=37291
* convert some nfs tunables to options, these are:John-Mark Gurney1998-06-302-2/+6
| | | | | | | | | | | | | | | | | | | NFS_MINATTRTIMO VREG attrib cache timeout in sec NFS_MAXATTRTIMO NFS_MINDIRATTRTIMO VDIR attrib cache timeout in sec NFS_MAXDIRATTRTIMO NFS_GATHERDELAY Default write gather delay (msec) NFS_UIDHASHSIZ Tune the size of nfssvc_sock with this NFS_WDELAYHASHSIZ and with this NFS_MUIDHASHSIZ Tune the size of nfsmount with this NFS_NOSERVER (already documented in LINT) NFS_DEBUG turn on NFS debugging also, because NFS_ROOT is used by very different files, it has been renamed to opt_nfsroot.h instead of the old opt_nfs.h.... Notes: svn path=/head/; revision=37272
* Fixed typo in ifdefed code. (NFS_ACDEBUG is not in LINT. Therefore,Bruce Evans1998-06-211-2/+2
| | | | | | | code controlled by it did not even compile.) Notes: svn path=/head/; revision=37089
* Avoid an egcs pessimization for 64-bit signed division on i386's.Bruce Evans1998-06-141-4/+4
| | | | | | | | | | | | Pre-2.8 versions of gcc generate a call to __divdi3() for all 64-bit signed divisions, but egcs optimizes them to a shift and fixup when the divisor is a constant power of 2. Unfortunately, it generates a call to __cmpdi2() for the fixup, although all except possibly ancient versions of gcc and egcs do ordinary 64-bit comparisons inline. Notes: svn path=/head/; revision=36979
* This commit fixes various 64bit portability problems required forDoug Rabson1998-06-072-6/+6
| | | | | | | | | | | | | FreeBSD/alpha. The most significant item is to change the command argument to ioctl functions from int to u_long. This change brings us inline with various other BSD versions. Driver writers may like to use (__FreeBSD_version == 300003) to detect this change. The prototype FreeBSD/alpha machdep will follow in a couple of days time. Notes: svn path=/head/; revision=36735
* For the on-the-wire protocol, u_long -> u_int32_t; long -> int32_t;Peter Wemm1998-05-319-319/+322
| | | | | | | | | | int -> int32_t; u_short -> u_int16_t. Also, use mode_t instead of u_short for storing modes (mode_t is a u_int16_t). Obtained from: NetBSD Notes: svn path=/head/; revision=36541
* Support 'mount -u' remounts. This may require disconnecting and rebindingPeter Wemm1998-05-313-3/+18
| | | | | | | | | the socket. Certain mode changes are not allowed. Obtained from: NetBSD Notes: svn path=/head/; revision=36540
* Cut-n-paste glitchPeter Wemm1998-05-311-2/+2
| | | | Notes: svn path=/head/; revision=36539
* Prototype support for selectively allowing non-reserved ports on a perPeter Wemm1998-05-311-1/+14
| | | | | | | | | export basis. Needs userland support yet. Obtained from: NetBSD Notes: svn path=/head/; revision=36534
* Hide whiteouts from NFS, since the protocol doesn't support them.Peter Wemm1998-05-311-5/+7
| | | | | | | Obtained from: NetBSD Notes: svn path=/head/; revision=36533
* NetBSD has a comment that Solaris 2.5 doesn't do verifiers correctly,Peter Wemm1998-05-311-1/+7
| | | | | | | | | | we have weakened this test already for Digital Unix, so it may be enough for Solaris. It needs to be checked again. Obtained from: NetBSD Notes: svn path=/head/; revision=36532
* Don't pass a second copy of the uid/gid in with the v2/v3 sattr structures,Peter Wemm1998-05-312-11/+7
| | | | | | | | | | | it just makes more work. We pass a copy of the uid/gid with the credentials. (although, this may need to be revisited if a non AUTHUNIX authentication method (such as NFSKERB) ever gets implemented). Obtained from: NetBSD Notes: svn path=/head/; revision=36531
* Use the new SB_UPCALL flag,Peter Wemm1998-05-311-1/+4
| | | | | | | Obtained from: NetBSD (but I changed the flag clear order in case). Notes: svn path=/head/; revision=36530
* Don't try and free mrep twice on some error conditions.Peter Wemm1998-05-311-2/+5
| | | | | | | Obtained from: NetBSD Notes: svn path=/head/; revision=36520
* #ifdef a diagnostic panic, plus another missed costmetic change.Peter Wemm1998-05-311-2/+4
| | | | | | | Obtained from: NetBSD Notes: svn path=/head/; revision=36519
* We have gained 2 more errno's, add them to the NFSv2 mapping table.Peter Wemm1998-05-311-2/+2
| | | | Notes: svn path=/head/; revision=36518
* Missed a cosmetic change that the other BSD's have.Peter Wemm1998-05-311-2/+2
| | | | Notes: svn path=/head/; revision=36517
* oops, nfs_msg() is called from client code too.Peter Wemm1998-05-311-1/+4
| | | | Notes: svn path=/head/; revision=36516
* When we can't reconnect a socket, don't forget to unlock before retryingPeter Wemm1998-05-311-1/+4
| | | | | | | | | or we can deadlock. Obtained from: NetBSD Notes: svn path=/head/; revision=36515
* Don't log zero length reads, this can happen during normal operation.Peter Wemm1998-05-311-1/+9
| | | | | | | Obtained from: NetBSD Notes: svn path=/head/; revision=36514
* Consider for readdir chunk sizes when tuning socket buffer reservations.Peter Wemm1998-05-311-3/+5
| | | | | | | Obtained from: NetBSD Notes: svn path=/head/; revision=36513
* Refuse READDIR / READDIRPLUS rpc's for non-directoriesPeter Wemm1998-05-311-1/+9
| | | | | | | Obtained from: NetBSD Notes: svn path=/head/; revision=36512
* Some const'sPeter Wemm1998-05-314-8/+8
| | | | | | | Obtained from: NetBSD Notes: svn path=/head/; revision=36511
* NFS Jumbo commit part 1. Cosmetic and structural changes only. The aimPeter Wemm1998-05-318-545/+561
| | | | | | | | | of this part of commits is to minimize unnecessary differences between the other NFS's of similar origin. Yes, there are gratuitous changes here that the style folks won't like, but it makes the catch-up less difficult. Notes: svn path=/head/; revision=36503
* When using NFSv3, use the remote server's idea of the maximum file sizePeter Wemm1998-05-301-6/+12
| | | | | | | | | | | | | | | | | | | rather than assuming 2^64. It may not like files that big. :-) On the nfs server, calculate and report the max file size as the point that the block numbers in the cache would turn negative. (ie: 1099511627775 bytes (1TB)). One of the things I'm worried about however, is that directory offsets are really cookies on a NFSv3 server and can be rather large, especially when/if the server generates the opaque directory cookies by using a local filesystem offset in what comes out as the upper 32 bits of the 64 bit cookie. (a server is free to do this, it could save byte swapping depending on the native 64 bit byte order) Obtained from: NetBSD Notes: svn path=/head/; revision=36473
* Convert a couple of large allocations to use zones rather than mallocPeter Wemm1998-05-243-17/+15
| | | | | | | | | for better packing. This means that we can choose better values for the various hash entries without having to try and get it all to fit within an artificial power of two limit for malloc's sake. Notes: svn path=/head/; revision=36329
* Only ignore "owner" permissions selectively rather than always. In somePeter Wemm1998-05-201-22/+31
| | | | | | | | | | | | | | cases we ignore it (eg: read/write) to maintain chmod-after-open semantics but in other cases we do care, eg: creating files, access() etc. Never ignore errors from VOP_ACCESS() on immutable files. This apparently comes from BSDI (from Keith Bostic) via NetBSD. PR: 5148 Submitted by: Yoshiro MIHIRA <sanpei@yy.cs.keio.ac.jp> Notes: svn path=/head/; revision=36251
* Allow control of the attribute cache timeouts at mount time.Peter Wemm1998-05-195-107/+170
| | | | | | | | | We had run out of bits in the nfs mount flags, I have moved the internal state flags into a seperate variable. These are no longer visible via statfs(), but I don't know of anything that looks at them. Notes: svn path=/head/; revision=36176
* Get timespecs directly instead of via timevals.Bruce Evans1998-05-161-13/+7
| | | | Notes: svn path=/head/; revision=36097
* In the words of the submitter:Mike Smith1998-05-071-13/+24
| | | | | | | | | | | | | | | | | | | | | | --------- Make callers of namei() responsible for releasing references or locks instead of having the underlying filesystems do it. This eliminates redundancy in all terminal filesystems and makes it possible for stacked transport layers such as umapfs or nullfs to operate correctly. Quality testing was done with testvn, and lat_fs from the lmbench suite. Some NFS client testing courtesy of Patrik Kudo. vop_mknod and vop_symlink still release the returned vpp. vop_rename still releases 4 vnode arguments before it returns. These remaining cases will be corrected in the next set of patches. --------- Submitted by: Michael Hancock <michaelh@cet.co.jp> Notes: svn path=/head/; revision=35823
* Use random() to find our initial xid.Poul-Henning Kamp1998-04-061-11/+4
| | | | Notes: svn path=/head/; revision=35066