From patchwork Tue May 7 20:44:33 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "J. Bruce Fields" X-Patchwork-Id: 2536461 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id C6161DF215 for ; Tue, 7 May 2013 20:44:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758788Ab3EGUol (ORCPT ); Tue, 7 May 2013 16:44:41 -0400 Received: from fieldses.org ([174.143.236.118]:50696 "EHLO fieldses.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757618Ab3EGUok (ORCPT ); Tue, 7 May 2013 16:44:40 -0400 Received: from bfields by fieldses.org with local (Exim 4.76) (envelope-from ) id 1UZokU-0005pg-Ac; Tue, 07 May 2013 16:44:34 -0400 Date: Tue, 7 May 2013 16:44:33 -0400 To: Steve Dickson Cc: Trond Myklebust , "J. Bruce Fields" , "David P. Quigley" , Linux NFS list , Linux FS devel list , Linux Security List , SELinux List Subject: Re: [PATCH 03/17] NFSDv4.2: Added NFS v4.2 support to the NFS server Message-ID: <20130507204433.GC32743@fieldses.org> References: <1367240239-19326-1-git-send-email-SteveD@redhat.com> <1367240239-19326-4-git-send-email-SteveD@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1367240239-19326-4-git-send-email-SteveD@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) From: "J. Bruce Fields" Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Mon, Apr 29, 2013 at 08:57:05AM -0400, Steve Dickson wrote: > From: Steve Dickson > > This enable NFSv4.2 support for the server. To enable this > code do the following: > echo "+4.2" >/proc/fs/nfsd/versions > > after the nfsd kernel module is loaded. We also need one more change to get working 4.2. --b. commit e4819461ed826bfafd899eb8719edb15f0fb68f4 Author: J. Bruce Fields Date: Tue May 7 11:57:52 2013 -0400 nfsd4: store correct client minorversion for >=4.2 This code assumes that any client using exchange_id is using NFSv4.1, but with the introduction of 4.2 that's no longer true. This main effect of this is that client callbacks will use the same minorversion as that used on the exchange_id. Note that clients are forbidden from mixing 4.1 and 4.2 compounds. (See rfc 5661, section 2.7, #13: "A client MUST NOT attempt to use a stateid, filehandle, or similar returned object from the COMPOUND procedure with minor version X for another COMPOUND procedure with minor version Y, where X != Y.") However, we do not currently attempt to enforce this except in the case of mixing zero minor version with non-zero minor versions. Signed-off-by: J. Bruce Fields --- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index 316ec84..91ead0e 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c @@ -1709,7 +1709,7 @@ out_new: status = nfserr_jukebox; goto out; } - new->cl_minorversion = 1; + new->cl_minorversion = cstate->minorversion; gen_clid(new, nn); add_to_unconfirmed(new);