Date: Mon, 2 Oct 2017 00:08:58 +0000 (UTC) From: Rick Macklem <rmacklem@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r324183 - projects/pnfs-planb-server-stable11/sys/fs/nfsclient Message-ID: <201710020008.v9208wSA019872@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201710020008.v9208wSA019872>