summaryrefslogtreecommitdiff
path: root/sys/nfs
AgeCommit message (Collapse)Author
2014-01-19Remove max_datalen. It is only used once an can be replaced easily withClaudio Jeker
MHLEN - max_hdr in that place. OK mikeb@
2014-01-18Use arc4random_buf() for fetching 64-bits of data because it is fasterTheo de Raadt
than calling arc4random() twice ok jsing
2013-12-26either dvp == vp or dvp != vp: zap extra test.Marc Espie
okay guenther@
2013-12-01Change 'mountlist' from CIRCLEQ to TAILQ. Be paranoid andKenneth R Westerback
use TAILQ_*_SAFE more than might be needed. Bulk ports build by sthen@ showed nobody sticking their fingers so deep into the kernel. Feedback and suggestions from millert@. ok jsing@
2013-11-27If the v_type is going to change when loading the NFS attribute cache,Joel Sing
purge the vnode from the namecache first. This prevents cache_purge() from later getting confused and trying to cache_zap() a namecache entry multiple times over, due to cache_zap() believing that the entry does not need to be removed from the vnode destinations queue. ok beck@
2013-11-26grow NFS request cache for the server side from 64 to 2048 entries.Bob Beck
FreeBSD did the corresponding change a while ago - the server request cache is used to avoid giving unnecessary failures to clients when a request is completed server side, but the client does not receive the result and therefore retries the request. This avoids errors like "file already exists" when the client tries to create files on a busy NFS server. ok krw@, tedu@, dcoppa@, deraadt@
2013-11-11Replace most of our formating functions to convert IPv4/6 addresses fromMartin Pieuchot
network to presentation format to inet_ntop(). The few remaining functions will be soon converted. ok mikeb@, deraadt@ and moral support from henning@
2013-11-03Fix bogus kthread_create() usage leading to wrong struct proc * pointerMiod Vallat
usage in the nfs kthreads. Spotted by fgsch@, similar diff by guenther@, ok guenther@
2013-10-17The header file netinet/in_var.h included netinet6/in6_var.h. ThisAlexander Bluhm
created a bunch of useless dependencies. Remove this implicit inclusion and do an explicit #include <netinet6/in6_var.h> when it is needed. OK mpi@ henning@
2013-10-02format string fix: int64_tStefan Fritsch
2013-09-20Add support for root on nfs using v3. Code adapted from NetBSD.Federico G. Schwindt
Tested on sparc by miod, octeon by aalm and armv7 by me. miod ok.
2013-09-14Correct the handling of I/O of >=2^32 bytes and the ktracing there ofPhilip Guenther
by using size_t/ssize_t instead of int/u_int to handle I/O lengths in uiomove(), vn_fsizechk(), and ktrgenio(). Eliminate the always-zero 'error' argument to ktrgenio() at the same time.
2013-09-14Snapshots for all archs have been built, so remove the T32 codePhilip Guenther
2013-09-12typo; Eivind EvensenTheo de Raadt
2013-08-27Manipulate timevals seperately, not inside a mbuf. Alignment constraintsTheo de Raadt
miod ran into. ok miod matthew
2013-08-13Switch time_t, ino_t, clock_t, and struct kevent's ident and dataPhilip Guenther
members to 64bit types. Assign new syscall numbers for (almost all) the syscalls that involve the affected types, including anything with time_t, timeval, itimerval, timespec, rusage, dirent, stat, or kevent arguments. Add a d_off member to struct dirent and replace getdirentries() with getdents(), thus immensely simplifying and accelerating telldir/seekdir. Build perl with -DBIG_TIME. Bump the major on every single base library: the compat bits included here are only good enough to make the transition; the T32 compat option will be burned as soon as we've reached the new world are are happy with the snapshots for all architectures. DANGER: ABI incompatibility. Updating to this kernel requires extra work or you won't be able to login: install a snapshot instead. Much assistance in fixing userland issues from deraadt@ and tedu@ and build assistance from todd@ and otto@
2013-07-04format string fixes: size_t and signednessStefan Fritsch
ok bluhm@
2013-06-25When we remove work from the nfs queue, wake up people waiting forBob Beck
room to queue IO right away, rather than waiting for us to complete the IO we are working on and potentially do a many buffers DELWRI dance before waking up the sleepers so they can continue. ok guether@ tedu@
2013-06-11final removal of daddr64_t. daddr_t has been 64 bit for a long enoughTheo de Raadt
test period; i think 3 years ago the last bugs fell out. ok otto beck others
2013-06-03Convert some internal APIs to use timespecs instead of timevalsPhilip Guenther
ok matthew@ deraadt@
2013-05-31Use %lld for printing time_tPhilip Guenther
2013-05-22Use SIOCAIFADDR rather than SIOCSIFADDR to set the address.Martin Pieuchot
ok mikeb@, claudio@
2013-04-17Unbreak and cleanup diskless swap automount.Florian Obser
Initial diff to replace unclear short variable name "nd" by "nfs_diskless" and to display the real nfs path to swap in pstat -s by deraadt@ Testing by me revealed diskless swap automount was broken since some time. Fix this by passing and using the correct vnode in nfs_diskless to swapmount(). Lots of input / help deraadt@, tweaks by deraadt@ OK deraadt@
2013-04-15Add an f_mntfromspec member to struct statfs, which specifies the name ofJoel Sing
the special provided when the mount was requested. This may be the same as the special that was actually used for the mount (e.g. in the case of a device node) or it may be different (e.g. in the case of a DUID). Whilst here, change f_ctime to a 64 bit type and remove the pointless f_spare members. Compatibility goo courtesy of guenther@ ok krw@ millert@
2013-03-28Add support for _PC_TIMESTAMP_RESOLUTION for ffs/mfs, cd9600, ext2,Philip Guenther
msdos, NFS, fifos and devices, plus support for querying it in getconf(2) and the requisite pathconf(2) manpage blurb ok tedu@
2013-03-28add a comment that we are faking it until code to ask the server is written.Ted Unangst
requested by deraadt
2013-03-28a better try at pathconf for nfs. there may be lies, but they are betterTed Unangst
lies than EINVAL, until we can uncover the truth.
2013-03-27rename NCHNAMLEN to NAMECACHE_MAXLEN. easier to read, easier to type.Ted Unangst
ok beck deraadt after a style issue noticed by kettenis
2013-01-16do not expose NETDEV to userland from param.hTheo de Raadt
2012-12-10Ensure NFS will only consume up to 1/4 of the available bufferBob Beck
mapping kva when busying up buffers in an nfsiod. (this in addition to the previous check for 1/4 of the total buffer space) This makes sparc installs work over nfsv2. ok deraadt@
2012-12-05Remove excessive sys/cdefs.h inclusionTheo de Raadt
ok guenther millert kettenis
2012-11-17buf_acquire() can sleep, so advance down b_vnbufs afterwardsTheo de Raadt
ok beck guenther
2012-09-10Cleanup VFS mount string handling:Joel Sing
- Avoid using copyinstr() without checking the return value. - sys_mount() has already copied the path in, so pass this to the filesystem mount code so that it does not have to copy it in again. - Avoid copyinstr()/bzero() dance when we can simply bzero() and strlcpy(). ok krw@
2012-07-11If the current offset is strictly less than the process filesizePhilip Guenthe
rlimit, then a write that would take it over the limit should be clamped, making it a partial write. ok beck@
2012-04-22Add struct proc * argument to FRELE() and FILE_SET_MATURE() inPhilip Guenthe
anticipation of further changes to closef(). No binary change. ok krw@ miod@ deraadt@
2012-03-23Make rusage totals, itimers, and profile settings per-process insteadPhilip Guenthe
of per-rthread. Handling of per-thread tick and runtime counters inspired by how FreeBSD does it. ok kettenis@
2012-03-21Prevent vrele() being called with a NULL argument if nfs_namei() returns anMark Kettenis
error in several places. Should fix the "vrele: null vp" panic that henning@ has been seeing lately. ok tedu@, krw@, deraadt@
2011-07-09KNFBob Beck
ok md5 "can't be worse" thib@
2011-07-08fix nfs pending writes, which were not handled correctly in the commitBob Beck
case. ok guenther@ thib@
2011-07-05Recommit the reverted sigacts change now that the NFS use-after-freePhilip Guenthe
problem has been tracked down. This fixes the sharing of the signal handling state: shared bits go in sigacts, per-rthread bits goes in struct proc. ok deraadt@
2011-07-05When calling nfs_request() for what could be an async request, passPhilip Guenthe
down curproc instead of the struct proc from the I/O request...which may gone away behind our back. Assert that the supplied request *is* curproc in a couple other places. Reproduction and testing by sthen@ ok deraadt@, beck@, art@
2011-07-04move the specfs code to a place people can see it; ok guenther thib krwTheo de Raadt
2011-04-18Revert the sigacts diff: NFS can apparently retain pointers to processesPhilip Guenthe
until they're zombies and then send them signals (for intr mounts). Until that is untangled, the sigacts change is unsafe. sthen@ was the victim for this one
2011-04-15Correct the sharing of the signal handling state: stuff that shouldPhilip Guenthe
be shared (p_sigignore, p_sigcatch, P_NOCLDSTOP, P_NOCLDWAIT) moves to struct sigacts, wihle stuff that should be per rthread (ps_oldmask, SAS_OLDMASK, ps_sigstk) moves to struct proc. Treat the coredumping state bits (ps_sig, ps_code, ps_type, ps_sigval) as per-rthread until our locking around coredumping is better. Oh, and remove the old SunOS-compat ps_usertramp member. "I like the sound of this" tedu@
2011-04-05Every single vop_default is set to eopnotsupp, so retire itThordur I. Bjornsson
and return EOPNOTSUPP directly from the VOP_* functions. Filesystems should, at some point fill in every function in the vop_default struct so we can get rid of the 'if' statements in VOP_*.
2010-12-21Bring back the "End the VOP experiment." diff, naddy's issues whereThordur I. Bjornsson
unrelated, and his alpha is much happier now. OK deraadt@
2010-12-05Make sure we only initialize the nfsrv_descript_pl pool once.Mark Kettenis
Re-initializing the pool everytime nfsd(8) terminates is very bad since it screws up the list of pools resulting in infinite loops when traversing that list. Issue found by Daniel Melameth. ok deraadt@
2010-09-10Backout the VOP diff until the issues naddy was seeing on alpha (gcc3)Thordur I. Bjornsson
have been resolved.
2010-09-09Rename lookup/relookup to vfs_lookup/vfs_relookup.Thordur I. Bjornsson
OK oga@, beck@, matthew@
2010-09-06End the VOP experiment. Instead of the ridicolusly complicated operationThordur I. Bjornsson
vector setup that has questionable features (that have, as far as I can tell never been used in practice, atleast not in OpenBSD), remove all the gunk and favor a simple struct full of function pointers that get set directly by each of the filesystems. Removes gobs of ugly code and makes things simpler by a magnitude. The only downside of this is that we loose the vnoperate feature so the spec/fifo operations of the filesystems need to be kept in sync with specfs and fifofs, this is no big deal as the API it self is pretty static. Many thanks to armani@ who pulled an earlier version of this diff to current after c2k10 and Gabriel Kihlman on tech@ for testing. Liked by many. "come on, find your balls" deraadt@.