Return-Path: linux-nfs-owner@vger.kernel.org Received: from mx2.netapp.com ([216.240.18.37]:44935 "EHLO mx2.netapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753186Ab2EXQtz (ORCPT ); Thu, 24 May 2012 12:49:55 -0400 From: "Adamson, Dros" To: Chuck Lever CC: "Myklebust, Trond" , "" Subject: Re: [PATCH 1/2] nfs4.1: add BIND_CONN_TO_SESSION operation Date: Thu, 24 May 2012 16:49:49 +0000 Message-ID: <84CCEB7E-7677-4383-B986-C3612D25FB6D@netapp.com> References: <1337876797-17706-1-git-send-email-dros@netapp.com> In-Reply-To: Content-Type: multipart/signed; boundary="Apple-Mail=_ADBB4CEB-458C-4A5A-B4F5-68104BE32456"; protocol="application/pkcs7-signature"; micalg=sha1 MIME-Version: 1.0 Sender: linux-nfs-owner@vger.kernel.org List-ID: --Apple-Mail=_ADBB4CEB-458C-4A5A-B4F5-68104BE32456 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On May 24, 2012, at 12:46 PM, Chuck Lever wrote: >=20 > On May 24, 2012, at 12:26 PM, Weston Andros Adamson wrote: >=20 >> This patch adds the BIND_CONN_TO_SESSION operation which is needed = for >> upcoming SP4_MACH_CRED work and useful for recovering from broken = connections >> without destroying the session. >>=20 >> Signed-off-by: Weston Andros Adamson >> --- >> fs/nfs/nfs4_fs.h | 1 + >> fs/nfs/nfs4proc.c | 54 ++++++++++++++++++++++++++++ >> fs/nfs/nfs4xdr.c | 90 = +++++++++++++++++++++++++++++++++++++++++++++++ >> include/linux/nfs4.h | 5 +++ >> include/linux/nfs_xdr.h | 6 +++ >> 5 files changed, 156 insertions(+), 0 deletions(-) >=20 > [ ... snipped ... ] >=20 >> diff --git a/include/linux/nfs4.h b/include/linux/nfs4.h >> index 0987146..80fbbfc6 100644 >> --- a/include/linux/nfs4.h >> +++ b/include/linux/nfs4.h >> @@ -69,6 +69,10 @@ >> #define NFS4_CDFC4_FORE_OR_BOTH 0x3 >> #define NFS4_CDFC4_BACK_OR_BOTH 0x7 >>=20 >> +#define CDFS4_FORE 0x1 >> +#define CDFS4_BACK 0x2 >> +#define CDFS4_BOTH 0x3 >=20 > A few more nits: >=20 > I'm looking back at the patch I did last year to add BIND_CONN_TO_SESS = for NFSv4.1 migration support... I used NFS4_CDFS4_FORE and so on here, = to match the defines in the paragraph above. Ah, good catch! I'll change to NFS4_CDFS4_* >=20 > In the XDR decoder function, I check the "dir_from_server" field to = ensure it is equal to or less than NFS4_CDFS4_BOTH (-EIO if not). Ok, that can't hurt! Note I'm already returning EIO in the proc handler = if dir !=3D NFS4_CDFS4_BOTH, but I think it makes sense to add this = sanity check. Thanks! -dros >=20 >> + >> #define NFS4_SET_TO_SERVER_TIME 0 >> #define NFS4_SET_TO_CLIENT_TIME 1 >>=20 >> @@ -582,6 +586,7 @@ enum { >> NFSPROC4_CLNT_SECINFO, >>=20 >> /* nfs41 */ >> + NFSPROC4_CLNT_BIND_CONN_TO_SESSION, >> NFSPROC4_CLNT_EXCHANGE_ID, >> NFSPROC4_CLNT_CREATE_SESSION, >> NFSPROC4_CLNT_DESTROY_SESSION, >=20 > --=20 > Chuck Lever > chuck[dot]lever[at]oracle[dot]com >=20 >=20 >=20 >=20 --Apple-Mail=_ADBB4CEB-458C-4A5A-B4F5-68104BE32456 Content-Disposition: attachment; filename="smime.p7s" Content-Type: application/pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIDTzCCA0sw ggIzoAMCAQICAQEwCwYJKoZIhvcNAQEFMEYxFzAVBgNVBAMMDldlc3RvbiBBZGFtc29uMQswCQYD VQQGEwJVUzEeMBwGCSqGSIb3DQEJARYPZHJvc0BuZXRhcHAuY29tMB4XDTExMDYwODIyMDc0NloX DTEyMDYwNzIyMDc0NlowRjEXMBUGA1UEAwwOV2VzdG9uIEFkYW1zb24xCzAJBgNVBA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