summaryrefslogtreecommitdiff
path: root/sys/nfs
AgeCommit message (Collapse)Author
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@.
2010-08-07No "\n" needed at the end of panic() strings.Kenneth R Westerback
Bogus chunks pointed out by matthew@ and miod@. No cookies for marco@ and jasper@. ok deraadt@ miod@ matthew@ jasper@ macro@
2010-07-31another pair of files which relied on mbuf.h for pool.h; should be the last,Bret Lambert
as the kernel now compiles w/o ``#include <sys/pool.h>'' in mbuf.h; removing that line, though, is for another day, as a userland program (systat, IIRC) fails to build without it there. ok krw@
2010-07-05If we find something is not aligned according to ALIGNED_POINTER(), weTheo de Raadt
cannot then re-align it using ALIGN(). That is not portable since we have architectures where the modulo are quite different. define an ALIGN_POINTER() macro in place, and use it in one spot. This caused a NFS crash on sparc (which borrows mbufs and chains them itself in insane ways). I heard claudio and beck trying to diagnose it from over the room when suddenly I knew exactly what it was. blambert spent a few hours on it making sure that I wasn't insane.
2010-07-02m_copyback can fail to allocate memory, but is a void fucntion so gymnasticsBret Lambert
are required to detect that. Change the function to take a wait argument (used in nfs server, but M_NOWAIT everywhere else for now) and to return an error ok claudio@ henning@ krw@
2010-05-19clean up a few things that where left to rot after bob's vfs cache work.Thordur I. Bjornsson
sync a few comments to reality (or remove them), remove the cn_hash member from struct componentname, spacing. ok beck@
2010-04-12Don't jump the queue if we have to wait on the client side becauseBob Beck
the nfs_bufq is full - instead tsleep waiting for one of our nfsiod's to free up space for us in the queue so we can enqueue on the end. ok blambert@, tedu@, oga@
2010-04-09make more bettah. instead of doing:Owain Ainsworth
switch(type) { case VREG: /*something */ break; case VLNK: /* something */ break; default: panic("wtf?"); } do_something_that_doesn't_change_type(); switch(type) { case VREG: /* nowt */ break; case VLNK: n = 0; break; default: panic("wtf?"); } be a bit less silly and replace the second switch with: if (type == VLNK) n = 0; ok beck@, blambert@
2010-04-09In the nfs bio functions, instead of looking at an invalid vnode type,Owain Ainsworth
deciding to do nothing, printing about it and continuing along our merry way without even erroring the sodding buffer, just panic. by this point we are liked very fucked up anyway. found in either edmonton or stockholm then forgotten. ok beck@, blambert@
2010-04-03Don't return 0 if error is set to EBADRPC. Found by jsg@ and clang.Kenneth R Westerback
ok deraadt@
2010-03-29Initialize various uninitialized variables. Found by jsg@ via Clang.Kenneth R Westerback
Feedback from miod@ and kettenis@. ok beck@
2009-12-17This fixes a case where we could panic on a null deref with a bad vnodeBob Beck
in nfs_inactive, on a reboot. The core of the problem was in nfs_nget, when we lose the race to put a new nfsnode in the tree, we have previously allocated a vnode, which getnewvnode has done an insmntque into the nfs mp's mntlist. The problem being we then try again with a new vnode, abandoning this one on the mntlist, leaving junk there for us to die on when we unmount. This introduces VLARVAL - so we can indicate in a vnode that the higher level stuff hiding in v_data is incompletely set up. This flag is then used by nfs to deal with a halfway set up vnode and release it correctly. analysis and bogus fix by art@, correct fix by me after serveral failed attempts and much painful testing by krw@, good suggestions by tedu and miod ok krw@ oga@ thib@ blambert@ art@
2009-12-15back out previous fix, apparently neither art or i can fix anything right on ↵Bob Beck
the first try vgone doesn't work in other cases of this. I must fix this slightly differntly
2009-12-15This fixes a case where we could panic on a null deref with a bad vnodeBob Beck
in nfs_inactive, on a reboot. The core of the problem was in nfs_nget, when we lose the race to put a new nfsnode in the tree, we have previously allocated a vnode, which getnewvnode has done an insmntque into the nfs mp's mntlist. The problem being we then try again with a new vnode, abandoning this one on the mntlist, leaving junk there for us to die on when we unmount. analysis and bogus fix by art@, correct fix by me. much painful testing by krw@ ok oga@, art@
2009-12-15Make sillyrename not so damn silly. The kindergarten algorithm here forBob Beck
picking a name meant that more than 58 sillys in a directory and we fail with EINVAL, resulting in strange problems for nfs which in turn causes pain and stress in building, and PTSD in nfs and vfs hackers. Has bit us in the butt since the vienna f2k7 hackathon. good suggestions from deraadt@ guenther@ and otto@ ok deraadt@,oga@,blambert@,krw@,guenther@, and a "very special ok" tedu@ Oh god, I'm an nfs hacker..
2009-12-10"fix" from freebsd to hide potential race in silly renames, whereBob Beck
a directory gets reclaimed on a forced unmount before the silly file in it gets blown away... fixes an issue seen by phessler@ ok oga@, art@
2009-10-19antsyJonathan Gray
no binary change apart from nfsm_reqhead() which is clearly correct. ok thib@