Home | History | Annotate | Download | only in nfs
History log of /src/sys/nfs/nfs_clntsocket.c
RevisionDateAuthorComments
 1.7  05-Jul-2024  rin sys: Drop redundant NULL check before m_freem(9)

m_freem(9) safely has accepted NULL argument at least since 4.2BSD:
https://www.tuhs.org/cgi-bin/utree.pl?file=4.2BSD/usr/src/sys/sys/uipc_mbuf.c

Compile-tested on amd64/ALL.

Suggested by knakahara@
 1.6  21-Jan-2018  christos PR/40491: From Tobias Ulmer in tech-kern@:
1. Protect the nfs request queue with its own mutex
2. make the nfs_receive queue check for signals so that intr mounts
can be interrupted.
XXX: pullup-8
 1.5  17-Jun-2016  christos branches: 1.5.10;
Serialize all access to the NFS request queue via splsoftnet(). Fixes random
crashes.
XXX: Pullup-7
 1.4  13-Jun-2016  christos Simplify, no functional change.
 1.3  15-Jul-2015  manu Fix soft NFS force unmount

For many reasons, forcibly unmounting a soft NFS mount could hang forever.
Here are the fixes:
- Introduce decents timeouts in operation that awaited NFS server reply.
- On timeout, fails operations on soft mounts with EIO.
- Introduce NFSMNT_DISMNTFORCE to let the filesystem know that a
force unmount is ongoing. This causes timeouts to be reduced and
prevents the NFS client to attempt reconnecting to the NFS server.

Also fix a race condition where some asynchronous I/O could reference
destroyed mount structures. We fix this by awaiting asynchronous I/O
to drain before proceeding.

Reviewed by Chuck Silvers.
 1.2  05-Sep-2014  matt branches: 1.2.2;
Don't use catch as a variable name.
 1.1  02-Mar-2010  pooka branches: 1.1.2; 1.1.6; 1.1.24; 1.1.40; 1.1.42;
Get rid of dependency on fs_nfs.h, i.e. source modules with
conditional content depending on if the NFS client is wanted or
not. The server can now be made an independent module not depending
on the nfs client.

Tested with rump_nfs (standalone client), rump_nfsd (standalone
nfsd) and a qemu installation with both the client and the server.
 1.1.42.1  10-Jul-2016  martin Pull up following revision(s) (requested by christos in ticket #1184):
sys/nfs/nfs_socket.c: revision 1.198
sys/nfs/nfs_clntsocket.c: revision 1.5
Serialize all access to the NFS request queue via splsoftnet(). Fixes random
crashes.
 1.1.40.2  10-Jul-2016  martin Pull up following revision(s) (requested by christos in ticket #1184):
sys/nfs/nfs_socket.c: revision 1.198
sys/nfs/nfs_clntsocket.c: revision 1.5
Serialize all access to the NFS request queue via splsoftnet(). Fixes random
crashes.
XXX: Pullup-7
 1.1.40.1  04-Nov-2015  riz Pull up following revision(s) (requested by manu in ticket #882):
sbin/umount/umount.c: revision 1.48
sys/nfs/nfsmount.h: revision 1.53
sys/nfs/nfs_var.h: revision 1.94
sys/nfs/nfs_iod.c: revision 1.7
sys/nfs/nfs_socket.c: revision 1.197
sys/nfs/nfs_bio.c: revision 1.191
sys/nfs/nfs_vfsops.c: revision 1.230
sys/nfs/nfs_clntsocket.c: revision 1.3
Remove useless and harmful sync(2) call in umount(8)
Remove sync(2) call before unmount(2) in umount(8). This sync(2) is useless
since unmount(2) will perform a VFS_SYNC anyway.
But moreover, this sync(2) may be harmful, as there are some situation where
it cannot return (unreachable NFS server, for instance), causing umount -f
to be uneffective.
Fix soft NFS force unmount
For many reasons, forcibly unmounting a soft NFS mount could hang forever.
Here are the fixes:
- Introduce decents timeouts in operation that awaited NFS server reply.
- On timeout, fails operations on soft mounts with EIO.
- Introduce NFSMNT_DISMNTFORCE to let the filesystem know that a
force unmount is ongoing. This causes timeouts to be reduced and
prevents the NFS client to attempt reconnecting to the NFS server.
Also fix a race condition where some asynchronous I/O could reference
destroyed mount structures. We fix this by awaiting asynchronous I/O
to drain before proceeding.
Reviewed by Chuck Silvers.
 1.1.24.1  03-Dec-2017  jdolecek update from HEAD
 1.1.6.2  30-Apr-2010  uebayasi Sync with HEAD.
 1.1.6.1  02-Mar-2010  uebayasi file nfs_clntsocket.c was added on branch uebayasi-xip on 2010-04-30 14:44:22 +0000
 1.1.2.3  21-Mar-2010  yamt fix merge botches
 1.1.2.2  11-Mar-2010  yamt sync with head
 1.1.2.1  02-Mar-2010  yamt file nfs_clntsocket.c was added on branch yamt-nfs-mp on 2010-03-11 15:04:31 +0000
 1.2.2.2  09-Jul-2016  skrll Sync with HEAD
 1.2.2.1  22-Sep-2015  skrll Sync with HEAD
 1.5.10.1  08-Jun-2018  martin Pull up following revision(s) (requested by maya in ticket #856):

sys/nfs/nfs.h: revision 1.76
sys/nfs/nfs_subs.c: revision 1.230
sys/nfs/nfs_socket.c: revision 1.199
sys/nfs/nfs_clntsocket.c: revision 1.6

PR/40491: From Tobias Ulmer in tech-kern@:
1. Protect the nfs request queue with its own mutex
2. make the nfs_receive queue check for signals so that intr mounts
can be interrupted.

XXX: pullup-8

RSS XML Feed