Commit ced9f6b
committed
NFSv4: Fix dropped lock for racing OPEN and delegation return
jira LE-2349
Rebuild_History Non-Buildable kernel-4.18.0-553.37.1.el8_10
commit-author Benjamin Coddington <bcodding@redhat.com>
commit 1cbc11a
Commmit f5ea161 ("NFSv4: Retry LOCK on OLD_STATEID during delegation
return") attempted to solve this problem by using nfs4's generic async error
handling, but introduced a regression where v4.0 lock recovery would hang.
The additional complexity introduced by overloading that error handling is
not necessary for this case. This patch expects that commit to be
reverted.
The problem as originally explained in the above commit is:
There's a small window where a LOCK sent during a delegation return can
race with another OPEN on client, but the open stateid has not yet been
updated. In this case, the client doesn't handle the OLD_STATEID error
from the server and will lose this lock, emitting:
"NFS: nfs4_handle_delegation_recall_error: unhandled error -10024".
Fix this by using the old_stateid refresh helpers if the server replies
with OLD_STATEID.
Suggested-by: Trond Myklebust <trondmy@hammerspace.com>
Signed-off-by: Benjamin Coddington <bcodding@redhat.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
(cherry picked from commit 1cbc11a)
Signed-off-by: Jonathan Maple <jmaple@ciq.com>1 parent b6f3b5c commit ced9f6b
1 file changed
+8
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7121 | 7121 | | |
7122 | 7122 | | |
7123 | 7123 | | |
7124 | | - | |
7125 | 7124 | | |
| 7125 | + | |
| 7126 | + | |
| 7127 | + | |
| 7128 | + | |
| 7129 | + | |
| 7130 | + | |
| 7131 | + | |
| 7132 | + | |
7126 | 7133 | | |
7127 | 7134 | | |
7128 | 7135 | | |
| |||
0 commit comments