From owner-svn-src-projects@freebsd.org Sat Apr 27 23:29:57 2019 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D5CE4159FDCF for ; Sat, 27 Apr 2019 23:29:56 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7BE90724C5; Sat, 27 Apr 2019 23:29:56 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 569D12167; Sat, 27 Apr 2019 23:29:56 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3RNTu31073408; Sat, 27 Apr 2019 23:29:56 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3RNTu8M073407; Sat, 27 Apr 2019 23:29:56 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201904272329.x3RNTu8M073407@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Sat, 27 Apr 2019 23:29:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r346798 - projects/nfsv42/sys/fs/nfs X-SVN-Group: projects X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: projects/nfsv42/sys/fs/nfs X-SVN-Commit-Revision: 346798 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 7BE90724C5 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.967,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Apr 2019 23:29:57 -0000 Author: rmacklem Date: Sat Apr 27 23:29:55 2019 New Revision: 346798 URL: https://svnweb.freebsd.org/changeset/base/346798 Log: Add code that will clear the NFSv4.2 attributes for non-NFSv4.2 mounts. Modified: projects/nfsv42/sys/fs/nfs/nfs.h projects/nfsv42/sys/fs/nfs/nfsproto.h Modified: projects/nfsv42/sys/fs/nfs/nfs.h ============================================================================== --- projects/nfsv42/sys/fs/nfs/nfs.h Sat Apr 27 22:31:41 2019 (r346797) +++ projects/nfsv42/sys/fs/nfs/nfs.h Sat Apr 27 23:29:55 2019 (r346798) @@ -431,6 +431,8 @@ typedef struct { (b)->bits[1] &= ~NFSATTRBIT_NFSV41_1; \ (b)->bits[2] &= ~NFSATTRBIT_NFSV41_2; \ } \ + if (((n)->nd_flag & ND_NFSV42) == 0) \ + (b)->bits[2] &= ~NFSATTRBIT_NFSV42_2; \ } while (0) #define NFSISSET_ATTRBIT(b, p) ((b)->bits[(p) / 32] & (1 << ((p) % 32))) @@ -457,6 +459,8 @@ typedef struct { (b)->bits[1] &= ~NFSATTRBIT_NFSV41_1; \ (b)->bits[2] &= ~NFSATTRBIT_NFSV41_2; \ } \ + if (((n)->nd_flag & ND_NFSV42) == 0) \ + (b)->bits[2] &= ~NFSATTRBIT_NFSV42_2; \ } while (0) #define NFSCLRNOTSETABLE_ATTRBIT(b, n) do { \ @@ -465,6 +469,8 @@ typedef struct { (b)->bits[2] &= NFSATTRBIT_SETABLE2; \ if (((n)->nd_flag & ND_NFSV41) == 0) \ (b)->bits[2] &= ~NFSATTRBIT_NFSV41_2; \ + if (((n)->nd_flag & ND_NFSV42) == 0) \ + (b)->bits[2] &= ~NFSATTRBIT_NFSV42_2; \ } while (0) #define NFSNONZERO_ATTRBIT(b) ((b)->bits[0] || (b)->bits[1] || (b)->bits[2]) Modified: projects/nfsv42/sys/fs/nfs/nfsproto.h ============================================================================== --- projects/nfsv42/sys/fs/nfs/nfsproto.h Sat Apr 27 22:31:41 2019 (r346797) +++ projects/nfsv42/sys/fs/nfs/nfsproto.h Sat Apr 27 23:29:55 2019 (r346798) @@ -1159,6 +1159,11 @@ struct nfsv3_sattr { NFSATTRBM_SUPPATTREXCLCREAT) /* + * NFSATTRBIT_NFSV42 - Attributes only supported by NFSv4.2. + */ +#define NFSATTRBIT_NFSV42_2 0 + +/* * Set of attributes that the getattr vnode op needs. * OR of the following bits. * NFSATTRBIT_GETATTR0 - bits 0<->31