From nobody Thu Jun 09 04:16:12 2022 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 DE07784727F; Thu, 9 Jun 2022 04:16:12 +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 4LJW4D5VTtz3QMJ; Thu, 9 Jun 2022 04:16:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1654748172; 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=xyBuTeyh6PvOqleLxC1pGgFLl6HO5c/3fYV5IsNuoss=; b=reDAU4a1JAd3jFJ0s4ckUDQLf7JCojQqAjMz3uXUrx3EDxIUIabtzHkrOYr6qeMJXJDw1O n9L/QS5IqrgZKuZOCyMPCZ++pCatmvVPZ0LHfkpzhyDj1nLIQi26MsJqvyo5su+OywfIoH 8k1uo1Pulzsj6bL+RgsQoKhaQiW4R9TWVeg6wRroKrTIJUSparczbuksirX5DNFiqRlxvE 4K49w8O13vccsvApY3fbQ5Zcyh68ItkoOMTeZ8K8DMdd7BUqq557ea0FAQub4Zh6sl3A4J US61Kzm905ehj1L83ykMvQFoJPZbVGpDeydbawYTgHoZzw43DCMpqSU2CzSUjQ== 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 9D2981D2B2; Thu, 9 Jun 2022 04:16:12 +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 2594GCT1096256; Thu, 9 Jun 2022 04:16:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2594GCGn096255; Thu, 9 Jun 2022 04:16:12 GMT (envelope-from git) Date: Thu, 9 Jun 2022 04:16:12 GMT Message-Id: <202206090416.2594GCGn096255@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Rick Macklem Subject: git: 3f2ac12e658c - stable/13 - 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/stable/13 X-Git-Reftype: branch X-Git-Commit: 3f2ac12e658c3e9b36fcd501e225cb3261f9c388 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1654748172; 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=xyBuTeyh6PvOqleLxC1pGgFLl6HO5c/3fYV5IsNuoss=; b=QDuhk7r/FNth5kh8ZmMLacLwa/qkcWhdL0L4Maop6bEpd5gW5Cbw+DOn/0Fy51LpIv/1WY oa2SfApb0PFiavsuEJyxXDKfhrglwbmv87hGa5lXgFtnlTvzC5UHPZrZ2BVu2mX9VJJ37a r//ooebmU8eQjezk0UaEeqVThmcr6nWIVqsSosAlvE3rRLFA//qLG2AUcf07QEpr86pMeB BxqqYctOY4fe7g9GH/mlz37eZUiM216TArwAADG0IHc/l7p5AQJFVp8z2dAD/Qj7o9/yCu VWtXuQQ7Rpe+f2zcZbvCvbEy6OlIpsKlABuO9rHv054lmtImnoez3B8E1P08Yw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1654748172; a=rsa-sha256; cv=none; b=i8rcMuN4BrIiGBLyUHdI9L9uyCqbUD/73rjXaTNLa9Jm97qd4iKqM8CMjzn9MvC1lgpbng BV+gd+psPa+2f2nOs6W4GobPHkj2XzYfV+bfzPooagT6LxBUG64M0KmryxZZjFtX6KjMWV B6JpltT4aVg6ClTfA41rDas/5M9ER2RijQ0PIo9455tulA8eIODQLyCb92kXS0sL81PTL2 Vra615DZEnkcZn9v1cTI83TaViC489ucLywcZrFjzu7mFrqPay4iS2v5keMIf6ZxQcGpN5 h26bz5RyUyHqCrVQI/ptx6DZaFVDO3cuWfWAhs4+Xg7hQCEOHOIxfqXjXfSVjQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=3f2ac12e658c3e9b36fcd501e225cb3261f9c388 commit 3f2ac12e658c3e9b36fcd501e225cb3261f9c388 Author: Rick Macklem AuthorDate: 2021-12-16 22:30:37 +0000 Commit: Rick Macklem CommitDate: 2022-06-09 04:15:32 +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. (cherry picked from commit 150da1e3cd51e552f7d6bc159b387e540c5a3733) --- 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 538f029a8bfd..38b637c5c062 100644 --- a/sys/fs/nfsclient/nfs_clvnops.c +++ b/sys/fs/nfsclient/nfs_clvnops.c @@ -707,8 +707,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) { @@ -965,11 +965,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"));