summaryrefslogtreecommitdiff
path: root/sys/nfs/nfs_vnops.c
AgeCommit message (Collapse)Author
2016-06-13make sure attrflag is initialized. from clang via david hillTed Unangst
2016-04-29Fix some gibbering horrors due to uninitialized struct nameidata'sBob Beck
1) turn NDINITAT into a function and make the macros point to it with the later goal of getting rid of them. 2) Sweep the kernel for places where people make a struct nameidata manually on the stack and fill in what they hope are the required fields and count on prayer and clean living to always get them right. Instead use NDINIT everywhere. NFS was especially bad for this and there have likely been things lurking there for a while. 3) Add a couple of strategic KASSERT's to catch future offenders. ok krw@ sthen@ deraadt@
2016-03-19Remove the unused flags argument from VOP_UNLOCK().natano
torture tested on amd64, i386 and macppc ok beck mpi stefan "the change looks right" deraadt
2016-02-13Convert to uiomove. From Martin Natano.Stefan Kempf
2015-12-22commited -> committedmmcc
2015-12-07NFS can pass a buffer cache buffer straight to VOP_STRATEGY here, so dma_flip isBob Beck
needed. Found by henning@ - thanks! ok deraadt@
2015-05-03Make sure we don't leak bytes from malloced memory in the padding of structPhilip Guenther
dirent. (The memset in previous commit was both wrong and insufficient.) problem with memset noted by brad@ and jsg@ ok millert@
2015-04-17Tweaks utimensat/futimens handling to always update ctime, even when bothPhilip Guenther
atime and mtime are UTIME_OMIT (at least for ufs, tmpfs, and ext2fs), and to correctly handle a timestamp of -1. ok millert@
2015-03-14Remove some includes include-what-you-use claims don'tJonathan Gray
have any direct symbols used. Tested for indirect use by compiling amd64/i386/sparc64 kernels. ok tedu@ deraadt@
2015-02-10First step towards making uiomove() take a size_t size argument:Miod Vallat
- rename uiomove() to uiomovei() and update all its users. - introduce uiomove(), which is similar to uiomovei() but with a size_t. - rewrite uiomovei() as an uiomove() wrapper. ok kettenis@
2014-12-29Explicitely include <uvm/uvm_extern.h> in order to build on variable page sizeMiod Vallat
architectures.
2014-12-18delete a whole mess of unnecessary caddr_t castsTed Unangst
2014-12-16primary change: move uvm_vnode out of vnode, keeping only a pointer.Ted Unangst
objective: vnode.h doesn't include uvm_extern.h anymore. followup changes: include uvm_extern.h or lock.h where necessary. ok and help from deraadt
2014-12-03stale header: this code hasn't used hash.h in a whileTed Unangst
2014-11-18move arc4random prototype to systm.h. more appropriate for most codeTed Unangst
to include that than rdnvar.h. ok deraadt dlg
2014-11-15Fix a mistake in a comment.Doug Hogan
Revert NFS_DIRBLKSIZE back to data. This matches an identical comment in another part of this file.
2014-11-14simplest free(size)Ted Unangst
2014-09-14remove uneeded proc.h includesJonathan Gray
ok mpi@ kspillner@
2014-07-12add a size argument to free. will be used soon, but for now default to 0.Ted Unangst
after discussions with beck deraadt kettenis.
2014-07-08decouple struct uvmexp into a new file, so that uvm_extern.h and sysctl.hTheo de Raadt
don't need to be married. ok guenther miod beck jsing kettenis
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-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-14Snapshots for all archs have been built, so remove the T32 codePhilip Guenther
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-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
2012-11-17buf_acquire() can sleep, so advance down b_vnbufs afterwardsTheo de Raadt
ok beck guenther
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@
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-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-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-09-10Backout the VOP diff until the issues naddy was seeing on alpha (gcc3)Thordur I. Bjornsson
have been resolved.
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-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-03-29Initialize various uninitialized variables. Found by jsg@ via Clang.Kenneth R Westerback
Feedback from miod@ and kettenis@. ok beck@
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@
2009-09-02Backout the asyncio/aiod change, as it causes buf's to get hung.Thordur I. Bjornsson
problem noticed by deraadt@ ok beck@
2009-08-20Rework the way we do async I/O in nfs. Introduce separate buf queues forThordur I. Bjornsson
each mount, and when work is "found", peg an aiod to that mount todo the I/O. Make nfs_asyncio() a bit smarter when deciding when to do asyncio and when to force it sync, this is done by keeping the aiod's one two lists, an "idle" and an "all" list, so asyncio is only done when there are aiods hanging around todo it for us or are already pegged to the mount. Idea liked by at least beck@ (and I think art@). Extensive testing done by myself and jasper and a few others on various arch's. Ideas/Code from Net/Free. OK blambert@.
2009-08-13Teach nfsm_fhtom about nfsm_info structsBret Lambert
ok thib@
2009-08-13- remove super-obvious comments from $fs_vnodeop_entries[]Jasper Lievisse Adriaanse
prodded by and ok thib@ agreed by art@ and blambert@