HomeFreeBSD

nfsd: fix session slot handling for failed callbacks

Description

nfsd: fix session slot handling for failed callbacks

When the NFSv4.1/4.2 server does a callback to a client
on the back channel, it will use a session slot in the
back channel session. If the back channel has failed,
the callback will fail and, without this patch, the
session slot will not be released.
As more callbacks are attempted, all session slots
can become busy and then the nfsd thread gets stuck
waiting for a back channel session slot.

This patch frees the session slot upon callback
failure to avoid this problem.

Without this patch, the problem can be avoided by leaving
delegations disabled in the NFS server.

(cherry picked from commit 4281bfec36285e2212f41568459c077bf4dbd91c)

Details

Provenance
rmacklemAuthored on Apr 23 2021, 10:24 PM
Parents
rG9186e4eb65c0: bhyve: Set SO_REUSEADDR on the gdb stub socket
Branches
Unknown
Tags
Unknown