summaryrefslogtreecommitdiff
path: root/sys/nfs/nfs_vnops.c
AgeCommit message (Collapse)Author
2018-07-02Use more list macros for v_dirtyblkhd.Alexander Bluhm
OK mpi@
2018-06-21Drop redundant "node == parent node" checks from VOP_RMDIR()Visa Hankala
implementations. Rely on the VFS layer to do the checking. OK mpi@, helg@
2018-06-07Make callers of VOP_CREATE(9) and VOP_MKNOD(9) responsible forVisa Hankala
unlocking the directory vnode. OK mpi@, helg@
2018-05-05Implement proper locking for NFS nodes.Martin Pieuchot
Tested in bulks by many. ok visa@, beck@
2018-05-02Remove proc from the parameters of vn_lock(). The parameter isVisa Hankala
unnecessary because curproc always does the locking. OK mpi@
2018-04-28Clean up the parameters of VOP_LOCK() and VOP_UNLOCK(). It is alwaysVisa Hankala
curproc that does the locking or unlocking, so the proc parameter is pointless and can be dropped. OK mpi@, deraadt@
2018-04-25Fix use of unreferenced vnode by decrementing the vnode's referenceVisa Hankala
count after unlocking. To improve consistency, use vput() instead of VOP_UNLOCK() + vrele(). OK guenther@, mpi@, tedu@
2018-04-17Prepare vnops to be locked.Martin Pieuchot
- Use vput(9) instead of vrele(9) when a "locked" node is returned by nfs_nget(). - Make sure VN_KNOTE() is always called with a valid reference. - Add a missing PDIRUNLOCK in nfs_lookup() These changes are mostly noops as long as nfs_lock()/unlock() do nothing. Tested by bluhm@, visa@ and myself. ok visa@
2017-02-22Keep local definitions local.Martin Pieuchot
"good work" deraadt@, ok visa@
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@