Fix the handling of NFSv4.1 sessions for "soft" mounts.
authorrmacklem <rmacklem@FreeBSD.org>
Fri, 22 Jun 2018 21:37:20 +0000 (21:37 +0000)
committerrmacklem <rmacklem@FreeBSD.org>
Fri, 22 Jun 2018 21:37:20 +0000 (21:37 +0000)
commitd20de84cbcf0508e6e3236af7e67026770ba3f7b
tree810509b4f3835211ae0a9f7a9c05eb1b9548c110
parentbc671da98be78e22e9f02c141c2a513dca0cf3d4
Fix the handling of NFSv4.1 sessions for "soft" mounts.

When a "soft" mount is used for NFSv4.1, an RPC that fails without completing
will leave a slot in the NFSv4.1 session in an indeterminate state.
As such, all that can be done is free up the slot while making is no longer
usable.
A "soft" NFSv4.1 mount is not recommended in general, since it will leave
Open/Lock state in an indeterminate state. An exception is a pNFS mount of
a DS, since there are no Opens/Locks done for them except file creates
where loss of the Open state does not matter.
The patch also makes connections to DSs soft, so that they will fail when
a DS is non-functional or network partitioned, allowing the pNFS MDS to disable
the DS for a mirrored configuration.
This patch should not affect normal "hard" NFSv4.1 mounts.

MFC after: 2 weeks
sys/fs/nfs/nfs_commonkrpc.c