summaryrefslogtreecommitdiffstats
path: root/sys/nfs/nfs_kq.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Refactor klist insertion and removalvisa2020-12-251-3/+3
| | | | | | | | | | | | Rename klist_{insert,remove}() to klist_{insert,remove}_locked(). These functions assume that the caller has locked the klist. The current state of locking remains intact because the kernel lock is still used with all klists. Add new functions klist_insert() and klist_remove() that lock the klist internally. This allows some code simplification. OK mpi@
* Rename poll-compatibility flag to better reflect what it is.mpi2020-06-111-4/+4
| | | | | | While here prefix kernel-only EV flags with two underbars. Suggested by kettenis@, ok visa@
* Use a new EV_OLDAPI flag to match the behavior of poll(2) and select(2).mpi2020-06-081-9/+64
| | | | | | | | | Adapt FS kqfilters to always return true when the flag is set and bypass the polling mechanism of the NFS thread. While here implement a write filter for NFS. ok visa@
* Abstract the head of knote lists. This allows extending the lists,visa2020-04-071-3/+3
| | | | | | for example, with locking assertions. OK mpi@, anton@
* Replace field f_isfd with field f_flags in struct filterops to allowvisa2020-02-201-3/+3
| | | | | | adding more filter properties without cluttering the struct. OK mpi@, anton@
* sys/nfs: misc. tsleep(9) -> tsleep_nsec(9); ok mpi@cheloha2020-01-211-3/+3
|
* Use C99 designated initializers with struct filterops. In addition,visa2019-12-311-5/+14
| | | | | | make the structs const so that the data are put in .rodata. OK mpi@, deraadt@, anton@, bluhm@
* Convert infinite sleeps to tsleep_nsec(9).mpi2019-12-051-2/+2
| | | | ok jca@
* Allow concurrent reads of the f_offset field of struct file byanton2019-08-051-2/+2
| | | | | | | | | serializing both read/write operations using the existing file mutex. The vnode lock still grants exclusive write access to the offset; the mutex is only used to make the actual write atomic and prevent any concurrent reader from observing intermediate values. ok mpi@ visa@
* Revert anton@ changes about read/write unlockingsolene2019-07-121-2/+2
| | | | | | https://marc.info/?l=openbsd-cvs&m=156277704122293&w=2 ok anton@
* Make read/write of the f_offset field belonging to struct file MP-safe;anton2019-07-101-2/+2
| | | | | | | | | | | | | | | | as part of the effort to unlock the kernel. Instead of relying on the vnode lock, introduce a dedicated lock per file. Exclusive write access is granted using the new foffset_enter and foffset_leave API. A convenience function foffset_get is also available for threads that only need to read the current offset. The lock acquisition order in vn_write has been changed to match the one in vn_read in order to avoid a potential deadlock. This change also gets rid of a documented race in vn_read(). Inspired by the FreeBSD implementation. With help and ok mpi@ visa@
* add sizes for free(ptr, sizeof(*ptr)). use sizeof(*ptr) for malloc sizes.tedu2014-11-151-3/+3
|
* Support NOTE_EOF for kqueue EVFILT_READ filters on NFS files.guenther2014-08-061-1/+5
| | | | committing for jsg@, ok reyk@ tedu@ guenther@
* add a size argument to free. will be used soon, but for now default to 0.tedu2014-07-121-2/+2
| | | | after discussions with beck deraadt kettenis.
* decouple struct uvmexp into a new file, so that uvm_extern.h and sysctl.hderaadt2014-07-081-3/+1
| | | | | don't need to be married. ok guenther miod beck jsing kettenis
* Fix a few format string bugs with -DDEBUGsf2014-06-151-2/+2
|
* Reduce uvm include madness. Use <uvm/uvm_extern.h> instead ofmpi2014-03-281-2/+1
| | | | | | <uvm/uvm.h> if possible and remove double inclusions. ok beck@, mlarkin@, deraadt@
* Remove excessive sys/cdefs.h inclusionderaadt2012-12-051-3/+1
| | | | ok guenther millert kettenis
* Introduce a macro to invalidate the attributethib2009-01-191-2/+2
| | | | | | | cache instead of setting n_attrstamp to 0 directly. Lift the macro name from NetBSD. prompted by and OK blambert@
* issue a NOTE_TRUNCATE if the file size has shrinkedthib2008-09-111-4/+9
| | | | ok tedu@, blambert@, art@
* Return EINVAL instead of '1' for invalid kq filters.thib2008-08-201-2/+2
| | | | | From NetBSD; OK art@, blambert@
* First pass at removing clauses 3 and 4 from NetBSD licenses.ray2008-06-261-8/+1
| | | | | | | | | Not sure what's more surprising: how long it took for NetBSD to catch up to the rest of the BSDs (including UCB), or the amount of code that NetBSD has claimed for itself without attributing to the actual authors. OK deraadt@
* Canonical for() -> queue.h FOREACH macro conversions.blambert2008-06-111-1/+2
| | | | | | | | | Also, it is historical practice to #include <sys/queue.h> when using queue.h macros. ok thib@ krw@ special thanks to krw@ for reminders vice violence
* MALLOC/FREE -> malloc/free + M_ZERO.thib2007-09-201-4/+3
| | | | | | Uneeded includes and casts... ok krw@
* pedro ok'd this ~3500 line diff which removes the vop argumentderaadt2007-06-011-5/+2
| | | | | "ap = v" comments in under 8 seconds, so it must be ok. and it compiles too.
* kill some ifdef noyet code, de-static functions (makes my traces nicer),thib2007-05-311-21/+14
| | | | | | some comments and style. ok tedu@
* Add a name argument to the RWLOCK_INITIALIZER macro.thib2007-05-291-2/+2
| | | | | | Pick reasonble names for the locks involved.. ok tedu@, art@
* zap annoying __KERNEL_RCSID().thib2007-05-281-4/+1
| | | | ok krw@
* Collapse struct v_selectinfo in struct vnode, remove thethib2007-05-171-8/+3
| | | | | | | simplelock and reuse the name for the selinfo member. Clean-up accordingly. ok tedu@,art@
* Replace the nfskevq_lock lockmgr lock with rwlock.thib2007-04-191-21/+15
| | | | | | | | Replace nfs_kqinit() wich just calls lockinit with RWLOCK_INITALIZER. Assorted cleanup. ok tedu@ "reads good" art@
* If VOP_GETATTR() in the nfs_kqpoll() loop returns ESTALE, catch it.thib2007-04-121-2/+9
| | | | | | | | | Not doing so can lead to clients missing out if the file is for example removed on the server and the client is doing a 'tail -f' on it. If it returns ESTALE, mark the file deleted and proceed to handling the next entry. ok tedu@,art@
* Remove unnecessary lockmgr() archaism that was costing too much in termspedro2005-11-191-13/+12
| | | | | | of panics and bugfixes. Access curproc directly, do not expect a process pointer as an argument. Should fix many "process context required" bugs. Incentive and okay millert@, okay marc@. Various testing, thanks.
* kqueue support for NFS, adapted from netbsd.marius2004-07-211-0/+359
ok art@ pedro@, "get it in" deraadt@