Bug 226493

Summary: ESX NFSv4.1 client can't perform the BindConnectiontoSession operation
Product: Base System Reporter: Rick Macklem <rmacklem>
Component: kernAssignee: Rick Macklem <rmacklem>
Status: Closed FIXED    
Severity: Affects Some People Keywords: patch
Priority: --- Flags: rmacklem: mfc-stable11+
rmacklem: mfc-stable10+
Version: CURRENT   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
Add partial support for BindConnectiontoSession to the NFSv4.1 server
none
Add partial support for BindConnectiontoSession to the NFSv4.1 server
none
Add partial support for BindConnectiontoSession to the NFSv4.1 server none

Description Rick Macklem freebsd_committer freebsd_triage 2018-03-10 01:10:17 UTC
Created attachment 191364 [details]
Add partial support for BindConnectiontoSession to the NFSv4.1 server

The VMware ESX NFSv4.1 client malfunctions because it can't perform
the BindConnectiontoSession operation.
The patch adds enough support for this operation to make the ESX client
function. It is incomplete, but since other clients do not use
BindConnectiontoSession for the TCP connections, I think it is adequate
for now.
Comment 1 Rick Macklem freebsd_committer freebsd_triage 2018-03-10 01:12:04 UTC
This patch needs to be committed in April.
Comment 2 Rick Macklem freebsd_committer freebsd_triage 2018-04-15 18:31:52 UTC
Created attachment 192534 [details]
Add partial support for BindConnectiontoSession to the NFSv4.1 server

Here is an updated version of the BindConnectiontoSession patch that
attempts to maintain the back channel more correctly, instead of assuming
any TCP connection can be used.
It maintains the old "not quite correct case of binding a backchannel by
default" until it sees a BindConnectiontoSession operation from a client.
Comment 3 Rick Macklem freebsd_committer freebsd_triage 2018-04-19 20:14:58 UTC
Created attachment 192666 [details]
Add partial support for BindConnectiontoSession to the NFSv4.1 server

Here is an updated version of the BindConnectiontoSession patch.
The main change is making the flag that indicates the client has
done a BindConnectiontoSession operation a ClientID flag instead
of per session.

I think this patch is now in a form adequate for head/current,
but I don't have a client that does BindConnectiontoSession to test with,
so I must depend on testing by others.
Comment 4 Rick Macklem freebsd_committer freebsd_triage 2018-06-01 20:16:23 UTC
This patch has been committed to head as r334492.
I forgot to list this PR3 in the log, but will try and
remember for the MFC.
Comment 5 commit-hook freebsd_committer freebsd_triage 2018-07-28 20:29:47 UTC
A commit references this bug:

Author: rmacklem
Date: Sat Jul 28 20:29:07 UTC 2018
New revision: 336842
URL: https://svnweb.freebsd.org/changeset/base/336842

Log:
  MFC: r334492
  Add the BindConnectiontoSession operation to the NFSv4.1 server.

  Under some fairly unusual circumstances, the Linux NFSv4.1 client is
  doing a BindConnectiontoSession operation for TCP connections.
  It is also used by the ESXi6.5 NFSv4.1 client.
  This patch adds this operation to the NFSv4.1 server.

  PR:		226493

Changes:
_U  stable/11/
  stable/11/sys/fs/nfs/nfs.h
  stable/11/sys/fs/nfs/nfs_commonsubs.c
  stable/11/sys/fs/nfs/nfs_var.h
  stable/11/sys/fs/nfs/nfsproto.h
  stable/11/sys/fs/nfsserver/nfs_nfsdserv.c
  stable/11/sys/fs/nfsserver/nfs_nfsdsocket.c
  stable/11/sys/fs/nfsserver/nfs_nfsdstate.c
Comment 6 commit-hook freebsd_committer freebsd_triage 2018-07-28 20:38:55 UTC
A commit references this bug:

Author: rmacklem
Date: Sat Jul 28 20:38:10 UTC 2018
New revision: 336846
URL: https://svnweb.freebsd.org/changeset/base/336846

Log:
  MFC: r334492
  Add the BindConnectiontoSession operation to the NFSv4.1 server.

  Under some fairly unusual circumstances, the Linux NFSv4.1 client is
  doing a BindConnectiontoSession operation for TCP connections.
  It is also used by the ESXi6.5 NFSv4.1 client.
  This patch adds this operation to the NFSv4.1 server.

  PR:		226493

Changes:
_U  stable/10/
  stable/10/sys/fs/nfs/nfs.h
  stable/10/sys/fs/nfs/nfs_commonsubs.c
  stable/10/sys/fs/nfs/nfs_var.h
  stable/10/sys/fs/nfs/nfsproto.h
  stable/10/sys/fs/nfsserver/nfs_nfsdserv.c
  stable/10/sys/fs/nfsserver/nfs_nfsdsocket.c
  stable/10/sys/fs/nfsserver/nfs_nfsdstate.c
Comment 7 Rick Macklem freebsd_committer freebsd_triage 2018-07-28 22:12:34 UTC
A patch adding BindConnectiontoSession has been committed and MFC'd.