From nobody Thu Feb 10 13:46:50 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 54F7B19AD3AB; Thu, 10 Feb 2022 13:46:50 +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 4JvdMZ1tp6z4cvS; Thu, 10 Feb 2022 13:46:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644500810; 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=KyQJtgPf7XRoN1TzTQvHE5/vFJt53YM/Bxf/nRU3qh8=; b=DByK8B2a9SjIt2HIQoLw1JZ7QDC56fCkcvaN0j0cPmoKa6cMI/Z7uPoVj6CzaVehwqEiKd xnJPA2evsEZiWZYrcjGAx1a5J9jyflwQqv1/mYQrmSptMrXVvSg+7excQidPeyagaAeAjX /JWV6SY1412lGocgB1UXQBZzUBFQplOJUc/CdXzo3+o8e5xr64GBCEZuHG9aGQYw5fNgrz yh6ATMQQ0F0LaiE1lisPpKryP+WxPJm4nCNZSPVrOGycNYfbolV09HQdEeYwUe45oERlgy +yrfFDCbjHDoKbz3dS6UHQrTI4/kqJKpXM45lrbRPe2jC5+ZQBxWzVCQk6z2wg== 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 20978216CE; Thu, 10 Feb 2022 13:46:50 +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 21ADko7R049559; Thu, 10 Feb 2022 13:46:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 21ADko6G049558; Thu, 10 Feb 2022 13:46:50 GMT (envelope-from git) Date: Thu, 10 Feb 2022 13:46:50 GMT Message-Id: <202202101346.21ADko6G049558@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 7fbdc1e3d421 - stable/13 - geom: Assert that BIO_SPEEDUP BIOs have bio_data set to NULL 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 7fbdc1e3d421d4c2612933a5fe292541e9611aae Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644500810; 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=KyQJtgPf7XRoN1TzTQvHE5/vFJt53YM/Bxf/nRU3qh8=; b=IggEi13bXakcMgcm4aUzRkM7beSo+jc7st/YSaBlp0dP0TEqAuiFKV/Gmqf9/JtooazzZQ q5GgFgc1caZ3uByeJfydEFUdjiWyRR7RJ7608d98A3zlssL7Fj+dvG5gKQkYE1hE8dmdMw oMyHrq7DUslamsroM0RcfvnHBEzyRAC8GkdlINMLH6szpl3PyZ3UG22Ktfz/E+9lcHW32E rBXOIe4MglxA+yyhWjmNxruQdE8F5dcK2mrNLmFhJKJPuIWN5P2TvRZLGu+Fjd8MuXX/Zi xHrp1FTbAM60oTfoZbc1R8MT7DSuAixSNgms5+cJzEXbsx5AnjTPI8UkUbpeIA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1644500810; a=rsa-sha256; cv=none; b=OKs8dA6dJUL7jNcBBtOJjr0wMD1BdAW9JpofGiQQZQxK6Ccy3k6IrS1/3LYneqM7QT+R4C IV89z2bVR4egn53wgpzNAoqZ9NyqjMmzwzBbqTuNJNPQqvLTEl/UVJGX9k/vi2KPpA4MHV GXthHxR4C0s+PxDvBocnNEWPrgJ/mfJ4DTi2ojhGBYamXzsOp0ffwMctI8fMLsOhzckIHf HBeXLmX5iJ2CKHQWyyw6xtXPZ3dQQWJH6Hnr9bwUcSm+Z3gmkQQQQR6qyvGJZsHiKVwgbe QEdGLuS+4sRayJUUFtnISL4FjJfpFq8XpB/Ou3Y37yq/diqWiLSpvDj/5rNlxQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=7fbdc1e3d421d4c2612933a5fe292541e9611aae commit 7fbdc1e3d421d4c2612933a5fe292541e9611aae Author: Mark Johnston AuthorDate: 2022-01-27 14:58:19 +0000 Commit: Mark Johnston CommitDate: 2022-02-10 13:45:59 +0000 geom: Assert that BIO_SPEEDUP BIOs have bio_data set to NULL Like BIO_FLUSH, there is no reason for consumers to pass a BIO_SPEEDUP request with non-NULL bio_data, so assert this. Sponsored by: The FreeBSD Foundation (cherry picked from commit 38da0c96dc1b4698931f65d8d58e864dfc3a600e) --- sys/geom/geom_io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/geom/geom_io.c b/sys/geom/geom_io.c index 9bdcd12bf240..0ccbf00c1058 100644 --- a/sys/geom/geom_io.c +++ b/sys/geom/geom_io.c @@ -521,7 +521,7 @@ g_io_request(struct bio *bp, struct g_consumer *cp) KASSERT(bp->bio_data != NULL, ("NULL bp->data in g_io_request(cmd=%hu)", bp->bio_cmd)); } - if (cmd == BIO_DELETE || cmd == BIO_FLUSH) { + if (cmd == BIO_DELETE || cmd == BIO_FLUSH || cmd == BIO_SPEEDUP) { KASSERT(bp->bio_data == NULL, ("non-NULL bp->data in g_io_request(cmd=%hu)", bp->bio_cmd));