From owner-svn-src-projects@freebsd.org Mon Oct 2 00:08:59 2017 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8273EE31B59 for ; Mon, 2 Oct 2017 00:08:59 +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 mx1.freebsd.org (Postfix) with ESMTPS id 5148573A99; Mon, 2 Oct 2017 00:08:59 +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 v9208wLY019873; Mon, 2 Oct 2017 00:08:58 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v9208wSA019872; Mon, 2 Oct 2017 00:08:58 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201710020008.v9208wSA019872@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Mon, 2 Oct 2017 00:08:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r324183 - projects/pnfs-planb-server-stable11/sys/fs/nfsclient X-SVN-Group: projects X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: projects/pnfs-planb-server-stable11/sys/fs/nfsclient X-SVN-Commit-Revision: 324183 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.23 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: Mon, 02 Oct 2017 00:08:59 -0000 Author: rmacklem Date: Mon Oct 2 00:08:58 2017 New Revision: 324183 URL: https://svnweb.freebsd.org/changeset/base/324183 Log: Fix the pNFS Flex File Layout client so that it doesn't do LayoutCommit when the flag is set to say don't do it. Modified: projects/pnfs-planb-server-stable11/sys/fs/nfsclient/nfs_clstate.c Modified: projects/pnfs-planb-server-stable11/sys/fs/nfsclient/nfs_clstate.c ============================================================================== --- projects/pnfs-planb-server-stable11/sys/fs/nfsclient/nfs_clstate.c Mon Oct 2 00:02:01 2017 (r324182) +++ projects/pnfs-planb-server-stable11/sys/fs/nfsclient/nfs_clstate.c Mon Oct 2 00:08:58 2017 (r324183) @@ -5282,7 +5282,15 @@ nfscl_dolayoutcommit(struct nfsmount *nmp, struct nfsc else layouttype = NFSLAYOUT_FLEXFILE; LIST_FOREACH(flp, &lyp->nfsly_flayrw, nfsfl_list) { - if (flp->nfsfl_off <= lyp->nfsly_lastbyte) { + if (layouttype == NFSLAYOUT_FLEXFILE && + (flp->nfsfl_fflags & NFSFLEXFLAG_NO_LAYOUTCOMMIT) != 0) { + NFSCL_DEBUG(4, "Flex file: no layoutcommit\n"); + /* If not supported, don't bother doing it. */ + NFSLOCKMNT(nmp); + nmp->nm_state |= NFSSTA_NOLAYOUTCOMMIT; + NFSUNLOCKMNT(nmp); + break; + } else if (flp->nfsfl_off <= lyp->nfsly_lastbyte) { len = flp->nfsfl_end - flp->nfsfl_off; error = nfsrpc_layoutcommit(nmp, lyp->nfsly_fh, lyp->nfsly_fhlen, 0, flp->nfsfl_off, len,