]> git.baikalelectronics.ru Git - kernel.git/commit
NFSv4.x recover from pre-mature loss of openstateid
authorOlga Kornievskaia <kolga@netapp.com>
Wed, 18 Dec 2019 21:50:42 +0000 (16:50 -0500)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Wed, 15 Jan 2020 15:54:33 +0000 (10:54 -0500)
commit96290266fa4590c1bb4183fd61bef1ff8453ff66
treea767e974f0c3098d8fec2a6b623cbba258a0307d
parenteeb09ec3985922f4b0d4ee65ca0e9f037f6427ee
NFSv4.x recover from pre-mature loss of openstateid

Ever since the commit 1e8b894727e8, it's possible to lose an open stateid
while retrying a CLOSE due to ERR_OLD_STATEID. Once that happens,
operations that require openstateid fail with EAGAIN which is propagated
to the application then tests like generic/446 and generic/168 fail with
"Resource temporarily unavailable".

Instead of returning this error, initiate state recovery when possible to
recover the open stateid and then try calling nfs4_select_rw_stateid()
again.

Fixes: 1e8b894727e8 ("NFSv4: Handle NFS4ERR_OLD_STATEID in CLOSE/OPEN_DOWNGRADE")
Signed-off-by: Olga Kornievskaia <kolga@netapp.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
fs/nfs/nfs42proc.c
fs/nfs/nfs4proc.c
fs/nfs/pnfs.c