#
a43f2b81 |
| 30-Apr-2024 |
miod <miod@openbsd.org> |
Convert all the NFS macros (in nfsm_subs.h) into inline functions with the appropriate extra arguments.
This (hopefully) completes the unmessyfication work started by thib@ a long, long time ago (in
Convert all the NFS macros (in nfsm_subs.h) into inline functions with the appropriate extra arguments.
This (hopefully) completes the unmessyfication work started by thib@ a long, long time ago (in a galaxy far away).
The conversion logic has been: - nfsm_dissect has been turned into an rvalue expression, leaving the cast operation up to its caller. - macros which had three different exit paths (return, goto nfsmout or fallthrough) have been split so that no macros have more than two exit paths. - then they have been modified to return a value, which lets the caller figure out what exit path is needed. - local variables abused by the macros are now local variables of the new inline functions.
This single commit is the sum of 25 intermediate diffs, which have all been carefully reviewed by (at least) jsg@ and semarie@.
Tested with v2 and v3 servers and clients.
ok jsg@ semarie@
show more ...
|
#
b66b9ef8 |
| 11-Mar-2021 |
jsg <jsg@openbsd.org> |
spelling
|
#
6bd4f7ca |
| 21-Jan-2019 |
anton <anton@openbsd.org> |
Introduce a dedicated entry point data structure for file locks. This new data structure allows for better tracking of pending lock operations which is essential in order to prevent a use-after-free
Introduce a dedicated entry point data structure for file locks. This new data structure allows for better tracking of pending lock operations which is essential in order to prevent a use-after-free once the underlying vnode is gone.
Inspired by the lockf implementation in FreeBSD.
ok visa@
Reported-by: syzbot+d5540a236382f50f1dac@syzkaller.appspotmail.com
show more ...
|
#
53ae78e5 |
| 05-May-2018 |
mpi <mpi@openbsd.org> |
Implement proper locking for NFS nodes.
Tested in bulks by many. ok visa@, beck@
|
#
482c7c11 |
| 15-Dec-2009 |
beck <beck@openbsd.org> |
Make sillyrename not so damn silly. The kindergarten algorithm here for picking a name meant that more than 58 sillys in a directory and we fail with EINVAL, resulting in strange problems for nfs whi
Make sillyrename not so damn silly. The kindergarten algorithm here for 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..
show more ...
|
#
9c9522ae |
| 02-Sep-2009 |
thib <thib@openbsd.org> |
Backout the asyncio/aiod change, as it causes buf's to get hung. problem noticed by deraadt@
ok beck@
|
#
00cb4738 |
| 27-Aug-2009 |
thib <thib@openbsd.org> |
introduce a flag member to struct nfs_aiod, and use flags instead of the exit and worked members. nad_worked becomes NFSAIOD_WAKEUP, which is set after if an aiod was removed from the idle list and w
introduce a flag member to struct nfs_aiod, and use flags instead of the exit and worked members. nad_worked becomes NFSAIOD_WAKEUP, which is set after if an aiod was removed from the idle list and woken up by nfs_asyncio().
don't rely on tsleep wchans being unique, that is keep going back to sleep if woken up unless the NFSAIOD_WAKEUP flag is set.
fix a divide by zero crash if nfs.vfs.iothreads is set to 0, as that can happen when we recalculate the maximum buf's to queue up for each aiod.
in nfs_asyncio() set the nad_mnt to NULL before returning the aiod back to the idle list in the case where we have already queued up to many bufs, otherwise we trip an assertion.
minimize the time we are holding the nfs_aiodl_mtx to only when we are inserting or removing from the lists, with the exception of nfs_set_naiod() as it would make the loops more complicated and its uncommon in any case.
tested by myself and deraadt@ "fine with me" deraadt@
show more ...
|
#
7ae83476 |
| 26-Aug-2009 |
thib <thib@openbsd.org> |
make sure that an aiod has been removed from the nfs_aiods_idle list before inserting it back into the list.
crashes debugged with help from deraadt@ who also tested this fix.
|
#
03240483 |
| 20-Aug-2009 |
thib <thib@openbsd.org> |
Rework the way we do async I/O in nfs. Introduce separate buf queues for 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 w
Rework the way we do async I/O in nfs. Introduce separate buf queues for 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@.
show more ...
|
#
e54eb321 |
| 10-Aug-2009 |
thib <thib@openbsd.org> |
Use an RB tree instead of a hashtable for fh/node lookups.
Idea from NetBSD.
OK blambert@
|
#
c585412d |
| 24-Jan-2009 |
thib <thib@openbsd.org> |
Use a timespec instead of a time_t for the clients nfsnode mtime, gives us better granularity, helps with cache consistency.
Idea lifted from NetBSD.
OK blambert@
|
#
fdc7e2e5 |
| 19-Jan-2009 |
thib <thib@openbsd.org> |
Introduce a macro to invalidate the attribute cache instead of setting n_attrstamp to 0 directly.
Lift the macro name from NetBSD. prompted by and OK blambert@
|
#
f958a786 |
| 14-Jun-2008 |
beck <beck@openbsd.org> |
Ensure each nfsiod can actually enqueue more than one asynchio - this mirrors the accidental situation that used to happen when it leaked buffers and allowed the syncer to do it, however this puts a
Ensure each nfsiod can actually enqueue more than one asynchio - this mirrors the accidental situation that used to happen when it leaked buffers and allowed the syncer to do it, however this puts a limit on how much of the buffer cache it is allowed to consume to a sensible amount - improves nfs write performance since we don't have to do tons of them synch now.
Modifies the existing code to use wakeup_one instead of cruft, and now all nfsiod's tsleep the same way.
ok thib@ art@
show more ...
|
#
c7d932a0 |
| 10-Jun-2008 |
thib <thib@openbsd.org> |
o Avoid putting duplicate entries into the name cache, add a function to handle cache_enter()'s for us since we need to update the appropriate timestamps so we don't miss on lookup; o Do not pu
o Avoid putting duplicate entries into the name cache, add a function to handle cache_enter()'s for us since we need to update the appropriate timestamps so we don't miss on lookup; o Do not purge the dvp in nfs_rmdir(), since there's no need; o cache the new entry created in nfs_mkdir(); o Do caching of the access modes, this drastically reduces the amount of over the wire access RPCs we do in the NFSv3 case.
This diff was written by Pedro Martelletto, sometime in 2004. A lot of people have been running with it at one time or another, this includes at least markus and matthieu.
OK deraadt@, blambert@
show more ...
|
#
116783b3 |
| 13-Dec-2007 |
thib <thib@openbsd.org> |
Garbage collect nfsdmap and leftover code. That structure was used as a part of the "old-style directory caching" that was removed in 2001;
ok beck@, blambert@
|
#
af851ec7 |
| 28-Oct-2007 |
thib <thib@openbsd.org> |
remove some unused members of struct nfsnode; some spacing while there.
ok krw@
|
#
3e258649 |
| 20-Sep-2007 |
thib <thib@openbsd.org> |
MALLOC/FREE -> malloc/free + M_ZERO. Uneeded includes and casts...
ok krw@
|
#
1f7dd9ae |
| 21-Jun-2007 |
thib <thib@openbsd.org> |
remove a whole bunch of duplicate function prototypes. (survived build/release on macppc/amd64).
ok pedro@
|
#
7a2c7c1a |
| 12-Apr-2007 |
thib <thib@openbsd.org> |
remove unused members from struct nfsmount and nfsnode;
ok pedro@
|
#
d67cd828 |
| 18-Mar-2007 |
mickey <mickey@openbsd.org> |
get rid of noop vop_reallocblks; pedro@ miod@ ok
|
#
4c5ee604 |
| 16-Jan-2007 |
thib <thib@openbsd.org> |
Retire VOP_LEASE(); It was a bit for NQNFS and has effectively been a no-op for quite some time now, without promise for future usage.
ok pedro@ Testing by krw@ (earlier diff) and Johan Mson Lindman
Retire VOP_LEASE(); It was a bit for NQNFS and has effectively been a no-op for quite some time now, without promise for future usage.
ok pedro@ Testing by krw@ (earlier diff) and Johan Mson Lindman (tybollt@solace.miun.se)
show more ...
|
#
e4c869ec |
| 03-Aug-2004 |
marius <marius@openbsd.org> |
NFS commit coalescion: instead of sending a commit for each block, coalesce these into larger ranges wherever possible.
this should speed up NFS writes quite a bit.
ok art@ millert@ pedro@ tedu@
|
#
27968240 |
| 26-Apr-2004 |
millert <millert@openbsd.org> |
nfs_poll cannot simply be defined to seltrue so use a stub nfs_poll duplicated from UFS. Closes PR 3757; OK deraadt@
|
#
c0c67a4c |
| 02-Mar-2004 |
tedu <tedu@openbsd.org> |
silly fifos aren't a real fs, so we have to be sure to call reclaim in the host fs.
|
#
154dfaaa |
| 23-Sep-2003 |
millert <millert@openbsd.org> |
Replace select backends with poll backends. selscan() and pollscan() now call the poll backend. With this change we implement greater poll(2) functionality instead of emulating it via the select ba
Replace select backends with poll backends. selscan() and pollscan() now call the poll backend. With this change we implement greater poll(2) functionality instead of emulating it via the select backend. Adapted from NetBSD and including some changes from FreeBSD. Tested by many, deraadt@ OK
show more ...
|