From nobody Mon Feb 7 09:50:57 2022 X-Original-To: dev-commits-src-branches@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 0A8F419C1676; Mon, 7 Feb 2022 09:51:04 +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 4JshGr3cKtz3sbY; Mon, 7 Feb 2022 09:51:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644227462; 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=nJk8VOdQft6paILT1Y434AYwUcbXePaaBcFq79lxSYw=; b=iarw7KfW5wz+CJljKDdsLrjcaN6TvcfbnIDCyuHIBrMPmshOOAvxsEv8oymNUvR5B+Ib4C 0HU+gkpbwe4txKIrQuVylTgWSVK13WiW3zFLYpK+nLoVX8BEtWPyxyzUyZ9NAw/WfS27Jg doyb0jIryoG9lX/duLKouep7V+h1fp8tFofBJdusQAAS1PM+3/WyK0Xyf/zBmbDaD1Lm8o aTGktwAw0CbutcBxUhE7R5aWVrISqxjP9YLDkjxg5Ghi3IPapowHNC+pYd3Ke9tQz9Px4N qNRivLzI3abFbGszWkLYXUoSiWZgkbwA6Y6MZuiulPB2+mgAxCNsJBRFrIkc0Q== 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 EF997238CC; Mon, 7 Feb 2022 09:50:57 +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 2179ovSb059134; Mon, 7 Feb 2022 09:50:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2179ovB1059133; Mon, 7 Feb 2022 09:50:57 GMT (envelope-from git) Date: Mon, 7 Feb 2022 09:50:57 GMT Message-Id: <202202070950.2179ovB1059133@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 15def34bd8c3 - stable/13 - Add GB_NOWITNESS flag List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 15def34bd8c3703c13b6fd5eb681c10c7e33b304 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644227463; 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=nJk8VOdQft6paILT1Y434AYwUcbXePaaBcFq79lxSYw=; b=RIB3SZB/C9cTeH3wzu7srFGbU+QUXT6kBVWnglSmAn5dKm/xSxV4VeT8ijYdGA88x/KSAs kyT9zyrdZaLrYp8tn+8q6xT0Fk+27jHhD0cM0eXdsmxitMuZIiwUaH7hh5MGDFtag8MZSE yTwG/5t1PeasfKoRR1eT9nVKEICJ5KVD66Oa9pDvhkCBctX1LJDOra+qTgCEmuzm0ssGjc FQ3GS26QX8um++aqTXJvKNm8u8eeWWi5AicwrxcSdvJ9ECYF/uHLv1y7ug1wI+Jo1yPF3i vysnfl1UFm5nix5nS0N+1T6tNQUZtsnzhXHMKSIJ2qy/ZgCocCTdvOf5SjsLng== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1644227463; a=rsa-sha256; cv=none; b=tB1aM3EzhEMXQMjPGxm8RjYfvS2nVbBHrdBn7fjz8lUD5NGKEapbVuRpeFerJdLwQpoU9z gDWe///Y3krX9IFTkU/Yd0AtO8kBezRB4qC4pkV9xEoVR1RX6dhjwWl0BDSE9bOvs+oTfB nueE9Uxjwt2PKY1JrOsbJQXWmMLgNX7YxoV0aBad5BP/NPtT9OS5uDAx+ibswayLT7nJD8 V7aeGIHog4eSGR5dAibLs6Ywgip9iNZXFvDZcS401Cos5TKwctuhJy/nZXsWsdrjQxLSEq slTMCyEd5C8yPeSHxjDOukxSVxwKUSHmfgzM8OiBCpH5/UVbccApWP/ZDkPjHw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=15def34bd8c3703c13b6fd5eb681c10c7e33b304 commit 15def34bd8c3703c13b6fd5eb681c10c7e33b304 Author: Konstantin Belousov AuthorDate: 2022-01-28 04:37:23 +0000 Commit: Konstantin Belousov CommitDate: 2022-02-07 09:38:50 +0000 Add GB_NOWITNESS flag (cherry picked from commit c02780b78c7f1df3e682e1a88b380820c288ec04) --- sys/kern/vfs_bio.c | 5 ++++- sys/sys/buf.h | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index 4491033d44eb..3798d9137d3b 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -3987,7 +3987,10 @@ loop: * it must be on a queue. */ lockflags = LK_EXCLUSIVE | LK_INTERLOCK | - ((flags & GB_LOCK_NOWAIT) ? LK_NOWAIT : LK_SLEEPFAIL); + ((flags & GB_LOCK_NOWAIT) != 0 ? LK_NOWAIT : LK_SLEEPFAIL); +#ifdef WITNESS + lockflags |= (flags & GB_NOWITNESS) != 0 ? LK_NOWITNESS : 0; +#endif error = BUF_TIMELOCK(bp, lockflags, BO_LOCKPTR(bo), "getblk", slpflag, slptimeo); diff --git a/sys/sys/buf.h b/sys/sys/buf.h index e1b0450e2613..fcc4a4689130 100644 --- a/sys/sys/buf.h +++ b/sys/sys/buf.h @@ -497,6 +497,7 @@ buf_track(struct buf *bp __unused, const char *location __unused) #define GB_CKHASH 0x0020 /* If reading, calc checksum hash */ #define GB_NOSPARSE 0x0040 /* Do not instantiate holes */ #define GB_CVTENXIO 0x0080 /* Convert errors to ENXIO */ +#define GB_NOWITNESS 0x0100 /* Do not record for WITNESS */ #ifdef _KERNEL extern int nbuf; /* The number of buffer headers */