]> git.baikalelectronics.ru Git - kernel.git/commit
NFSv4/pNFS: Fix a layoutget livelock loop
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Mon, 26 Jul 2021 11:58:49 +0000 (07:58 -0400)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Mon, 9 Aug 2021 20:57:04 +0000 (16:57 -0400)
commitee4013f2d3ac40078c371be91c25b400dbd0c4e8
tree3e81ab8676c16bbba86480779448ba71fcef885f
parent302662b64d0aaaa0be8560db28d20ef053a9c495
NFSv4/pNFS: Fix a layoutget livelock loop

If NFS_LAYOUT_RETURN_REQUESTED is set, but there is no value set for
the layout plh_return_seq, we can end up in a livelock loop in which
every layout segment retrieved by a new call to layoutget is immediately
invalidated by pnfs_layout_need_return().
To get around this, we should just set plh_return_seq to the current
value of the layout stateid's seqid.

Fixes: cf8e7a5a6cb5 ("NFS: Don't return layout segments that are in use")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
fs/nfs/pnfs.c