From nobody Sun Feb 06 01:26:50 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 71ED0198BC50; Sun, 6 Feb 2022 01:26:51 +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 4Jrs7b1Zlfz3vdH; Sun, 6 Feb 2022 01:26:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644110811; 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=26lH9pWpNJkO4qVZ0CGX9sSnP7eflITB/9b3rX0zQDs=; b=aRDWmXSnUY83f1a7gk71g7VV5qDf4o8qJed15x0/FIjUyo5TBq2+vr9LD6guX3QB/0krXE 04FDD84us1vjmBgu2MRH14w5RwAxl0m55LH7vcrDftQuSVOPrtORSPneYaIY0Y6xZMzF7T BBFAIjCCHre5hqLrxHK6VT4e4b9WU8YzsziYO0Db5VPn7FyRlfstCDaI6NVxEpotAnj58v aT5mufwpOeyQpNG+JF5jc6FgD2pMdhaGKDXWJSvk7X4A+r3YEbE5nf6bGmfh/VNUyQ/sFc X3lpb1qp95szsn9Z8oXpkSqJOIITxgWFVaEhFGP90OEK2b9kOSVhC+N2jNBCJA== 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 1340A1A91; Sun, 6 Feb 2022 01:26:51 +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 2161Qo8r061571; Sun, 6 Feb 2022 01:26:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2161QoB5061570; Sun, 6 Feb 2022 01:26:50 GMT (envelope-from git) Date: Sun, 6 Feb 2022 01:26:50 GMT Message-Id: <202202060126.2161QoB5061570@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 0af463e6619c - main - ffs_read(): lock buffers after snaplk with LK_NOWITNESS 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: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0af463e6619cf9f7386129d427c244d3da30fa3a Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644110811; 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=26lH9pWpNJkO4qVZ0CGX9sSnP7eflITB/9b3rX0zQDs=; b=TqFV3sScXcK5RgdMFd1zVUcTlgDOHh7bJBmg5IhG6Um4YnCm2w5dSgXCWhr3cBQbHakR36 kICYK/2AxdusOaSnbqHieVreicf82XKKEQF/lmqridaVgiVcFodFyLIfFB4V98YB1ghBdv ssNeXew4oHuZYbK9VWsCfUcv43zwwQ/NcpVnO1d4vq6kC2ndUzE8OdgO8feezZZ4BLqjhN 5nw5CGMuFbXP1pKtDG9GyYvowXvcyp9jwlffmpzeQPYFFnc/hg5YyeFqkLlQGAOnZA0WnU ncyBUljUr600nZ8uN4dpOHxN5olePJd/0GVhNt8gyUA+UKJn/fMEYR8OCn1QDA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1644110811; a=rsa-sha256; cv=none; b=H8Iz50msFNjxIXQEuPXJhS82vNgDZl2YELhz/vyYEyReK0LpvQMT9eE/GSkMFlyBVse5+7 UJj29aIe/0wNYJfdCUmibANQPVNJ6xCnoq3IsFbi3yqwBKrOw5VnSAWGLI8SfNqpZBoUXn 2mBfFFv5FsQLtItaPzIII7GAU3EHpTMDCcm+ZqpbSgS0KK1J7sgykKvVliHpPst6H31EqM t8ak2sg5ZEOo1kqSloLgCbkUCAVInKcn8DMb1vgHflly+H0kbFCnefOxxw6cLHQSCgSl67 U7eOuKYxNIlwilvY6cj914Latj/mtvDoCkmdUys6pM7NE4Dncyjc6u+BOGiCYQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=0af463e6619cf9f7386129d427c244d3da30fa3a commit 0af463e6619cf9f7386129d427c244d3da30fa3a Author: Konstantin Belousov AuthorDate: 2022-02-05 02:03:47 +0000 Commit: Konstantin Belousov CommitDate: 2022-02-06 01:26:22 +0000 ffs_read(): lock buffers after snaplk with LK_NOWITNESS Reviewed and tested by: mckusick Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D34179 --- sys/ufs/ffs/ffs_vnops.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/ufs/ffs/ffs_vnops.c b/sys/ufs/ffs/ffs_vnops.c index 66dafed5ac9e..b57e9a3a71b0 100644 --- a/sys/ufs/ffs/ffs_vnops.c +++ b/sys/ufs/ffs/ffs_vnops.c @@ -695,6 +695,9 @@ ffs_read(ap) return (EOVERFLOW); bflag = GB_UNMAPPED | (uio->uio_segflg == UIO_NOCOPY ? 0 : GB_NOSPARSE); +#ifdef WITNESS + bflag |= IS_SNAPSHOT(ip) ? GB_NOWITNESS : 0; +#endif for (error = 0, bp = NULL; uio->uio_resid > 0; bp = NULL) { if ((bytesinfile = ip->i_size - uio->uio_offset) <= 0) break;