From nobody Thu Dec 16 22:33:56 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 554D718DF9F6; Thu, 16 Dec 2021 22:33:57 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JFRjd0g2wz3JSp; Thu, 16 Dec 2021 22:33:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EAEE610C94; Thu, 16 Dec 2021 22:33:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1BGMXusv028720; Thu, 16 Dec 2021 22:33:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1BGMXuWH028719; Thu, 16 Dec 2021 22:33:56 GMT (envelope-from git) Date: Thu, 16 Dec 2021 22:33:56 GMT Message-Id: <202112162233.1BGMXuWH028719@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Rick Macklem Subject: git: 150da1e3cd51 - main - nfscl: Partially revert commit 867c27c23a5c List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 150da1e3cd51e552f7d6bc159b387e540c5a3733 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1639694037; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dErivV5KKtGQjOv6vryhTYRApcJOdnd79S287U0EHj8=; b=rV5xR1rFXQEypzgWUGD5SNN4FSo2SdESk8A2TYaQG//svbOMGXfkmWXFZ3thod1F73P8PV /A2EFITMf+/85L68agMBnq8kNaPxkBKED3ux9xqDJv3kBQQZsTcxLo02JRRMK1+1A9GLu1 FEVQUyEoeapTH/iO/rhpr3V5qmPFF4aN8tRurTNI91leCtjAdJofXdVsaYVf4nAWK4p1fk CIzChAhwiScoIgxjSH5nfS+qAI4ZC2JeUvJ6c0XJVKOoUocfaVtP13gMujmXHRmMp4XwAB PY7R9n24jM4yjE3rEZj0Yg5x3H9gSkNXvkpQRFBiaswjwqQjchaDPhjSAAyZ9w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1639694037; a=rsa-sha256; cv=none; b=Wy+hj+olB5pjU+rihw76lpnN0WGNHKQV36FStc2rsYJOVytRK8JxLdbRFRQKNLZpyWtA/Z oysuxAnwk5OvO1OdI+FUoYndFzqpps4Xmm1SK2KGnBvLq26umBANe2gSoVJEVzBA7CIMwW cAtTCuZ1lgKhe2zTSNI+AekBGxLzfzD+gOyXitvqS2U+DE3FoT9CAE9CVTiTClh8fqZlCy 2uyb9qjyLdQFwKivFWh/sIfbKUinP89RZzSzp9awFYQ/V2J4JanHLwawGI6hkGPMfu1Ag/ nArDro965+obIJb/ltUnan1lxyOYyf2BlQOcrl33lL4HhLbK5+NeEaVvFr3d9g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=150da1e3cd51e552f7d6bc159b387e540c5a3733 commit 150da1e3cd51e552f7d6bc159b387e540c5a3733 Author: Rick Macklem AuthorDate: 2021-12-16 22:30:37 +0000 Commit: Rick Macklem CommitDate: 2021-12-16 22:30:37 +0000 nfscl: Partially revert commit 867c27c23a5c Commit 867c27c23a5c enabled the n_directio_opens code in open/close, which sets/clears NNONCACHE, for IO_APPEND. This code should not be enabled unless newnfs_directio_enable is non-zero. This patch reverts that part of commit 867c27c23a5c. A future patch that fixes the case where the file that is being written IO_APPEND is mmap()'d. MFC after: 3 months --- sys/fs/nfsclient/nfs_clvnops.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/fs/nfsclient/nfs_clvnops.c b/sys/fs/nfsclient/nfs_clvnops.c index db2ef26a77c6..ba2ba27b8fb6 100644 --- a/sys/fs/nfsclient/nfs_clvnops.c +++ b/sys/fs/nfsclient/nfs_clvnops.c @@ -709,8 +709,8 @@ nfs_open(struct vop_open_args *ap) /* * If the object has >= 1 O_DIRECT active opens, we disable caching. */ - if (vp->v_type == VREG && ((newnfs_directio_enable && (fmode & - O_DIRECT)) || (fmode & O_APPEND))) { + if (newnfs_directio_enable && (fmode & O_DIRECT) && + (vp->v_type == VREG)) { if (np->n_directio_opens == 0) { NFSUNLOCKNODE(np); if (VOP_ISLOCKED(vp) != LK_EXCLUSIVE) { @@ -967,11 +967,11 @@ nfs_close(struct vop_close_args *ap) error = nfscl_maperr(ap->a_td, error, (uid_t)0, (gid_t)0); } - if (vp->v_type == VREG && ((newnfs_directio_enable && (fmode & - O_DIRECT)) || (fmode & O_APPEND))) { + if (newnfs_directio_enable) KASSERT((np->n_directio_asyncwr == 0), ("nfs_close: dirty unflushed (%d) directio buffers\n", np->n_directio_asyncwr)); + if (newnfs_directio_enable && (fmode & O_DIRECT) && (vp->v_type == VREG)) { NFSLOCKNODE(np); KASSERT((np->n_directio_opens > 0), ("nfs_close: unexpectedly value (0) of n_directio_opens\n"));