Commit 726e545
committed
core: Return BAD_STATEID for NFSv4.0 special "stateless" stateids
Under some rare circumstances, especially when under I/O pressure, NFS
clients such as those on macOS may try to send NFS requests with an
invalid state id (seq=-1, other:ffffffffffffffffffffffff; or seq:0,
other:0).
This usually happens after the NFS server has been restarted and lost
information about the previous client state. Unfortunately, the macOS
client does not recover from this situation and keeps making requests to
the server. This slows down both server and client to a halt.
Send a "bad stateid" error upon occurring such a sequence. This lets the
NFS client reconnect and re-establish the correct state with the server.
Fixes: #160
Related: https://datatracker.ietf.org/doc/html/rfc7530#section-9.1.4.3
Signed-off-by: Christian Kohlschütter <christian@kohlschutter.com>1 parent ad8f569 commit 726e545
1 file changed
+11
-0
lines changedLines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
238 | 238 | | |
239 | 239 | | |
240 | 240 | | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
241 | 252 | | |
242 | 253 | | |
243 | 254 | | |
| |||
0 commit comments