From nobody Thu Jan 27 15:15:06 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 41811198774E; Thu, 27 Jan 2022 15:15:07 +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 4Jl3zt5QTFz4dd3; Thu, 27 Jan 2022 15:15:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1643296507; 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=8wST//hpUURarCoykG47TMPLJbgfy/S6uGNoP1PA0s0=; b=WekJhTIXDcrzq9IwFFnCLF/3MFi0B9DliriMvfmVukHgBzElTMJ+D3LYNZrsJAefPHuZzd ZGpJEBX5VkYQTpeIIwcozX01VGjbctmyxvm3+ZYzeiXfyIn0naQQnx0evj8rNFP8odegBc S/hsGyB65mRbG3nEzTtPdf0n0FTTxOOMmFKCnupFccIDikls0qM42TeY+dDxx6HPPh4kdc a5t2CCvs9/RBNO6HZEqxrmPDE+eTLX5jSMQFA+IpCFdqT0bwaDpzves7FsiSE7yJQHnSuv rAdxxYMwnW82JfidEU5hG+x4+68oTzwcu/Jsu/2GvmipQH6imUIvw+Nj2EqPuQ== 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 470C2190A1; Thu, 27 Jan 2022 15:15:06 +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 20RFF6sj006082; Thu, 27 Jan 2022 15:15:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 20RFF6jY006081; Thu, 27 Jan 2022 15:15:06 GMT (envelope-from git) Date: Thu, 27 Jan 2022 15:15:06 GMT Message-Id: <202201271515.20RFF6jY006081@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 38da0c96dc1b - main - geom: Assert that BIO_SPEEDUP BIOs have bio_data set to NULL 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 38da0c96dc1b4698931f65d8d58e864dfc3a600e Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1643296507; 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=8wST//hpUURarCoykG47TMPLJbgfy/S6uGNoP1PA0s0=; b=Z7xhIBBIGYjVjdjt5Av4gw6miVwBQ2OnaT9EzkPoJR+ETyPVX+UkKNyxw4PL1RoQf3K4pW SlOcabWB+olfHK1X5mJs+wiUM0HDmnq0M7WLk1JsRnu4urr/8rz+EYPw+Ee/hcDbPee3pO CR5vCQyzpBFRckkKiKmkzPq9QDF/mY9u77Xctdw8I04JJCVmwZefRRqInYv9F/fRLJjbpn +aH6nFrf2F8R3X95nVzT3uDQjLrH68edheSSxySVSZcbDrhHAA6rJrA+2N7xpSBhTtYy3P Jab3y6R+OZy9Y1nG55C8N9AN6o3cuVq+eEMyoBCyqo+3rF/3ipehO7pkdadyaQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1643296507; a=rsa-sha256; cv=none; b=OZlX9jwtk2Mj9k75j9g5cz38uruzRf9lkDUokKETk/HXVG/2F72UvH75HLA900ybvRkglu fumyGdbk4Ctl7U0OTTlsj1V9GFsyQmGcmNx8JzFt1w3QogOlhXT9u/f4ivVRh1pRs9Urc7 yQMW2S49Bu+XgHnGn6Xu0QqYr81TSqRq/83Cgbn72fkl/Vu6WTvspLjNQgI+R1fvrjLbhw GXabPtfFmJL/AhCX3CUy6QuLpSgCV9yLS2ato3DW2gijIjKz+n37VxTXgRjxSlbCfgwat9 fTxJ4yQSOwfLz2D743ffq9DIvMjVaw4qT2xi1R4yswVQC5PaVB8qOA9+l1DXdA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=38da0c96dc1b4698931f65d8d58e864dfc3a600e commit 38da0c96dc1b4698931f65d8d58e864dfc3a600e Author: Mark Johnston AuthorDate: 2022-01-27 14:58:19 +0000 Commit: Mark Johnston CommitDate: 2022-01-27 14:58:19 +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. MFC after: 2 weeks Sponsored by: The FreeBSD Foundation --- 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 6ec90741a7e2..a5cb8c7279e4 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));