From nobody Wed Dec 08 04:06:43 2021 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 4C2DF18C7D8F; Wed, 8 Dec 2021 04:06:44 +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 4J83Wm07zQz3GrQ; Wed, 8 Dec 2021 04:06:44 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 D8B0049F3; Wed, 8 Dec 2021 04:06:43 +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 1B846hi5037966; Wed, 8 Dec 2021 04:06:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B846h6s037965; Wed, 8 Dec 2021 04:06:43 GMT (envelope-from git) Date: Wed, 8 Dec 2021 04:06:43 GMT Message-Id: <202112080406.1B846h6s037965@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alexander Motin Subject: git: 916a91bd5ec9 - stable/13 - GEOM: Switch g_io_deliver() locking from cp to pp. 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: mav X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 916a91bd5ec9bfa7ca3d17d21cd45289f65082e4 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638936404; 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=uSw7H7TY4Tvn47LZrO8FkUbDPXAvpLl55O6IVJeztgk=; b=tHZYV5/bD9qMBX4wQpg04rM+UtW7mvM+9jQwiCxC8YrSCZCH03b0wJgDNhB1Af/DYlV/sE sDQuvYY3Jt8j63YuXeoSBzF/DtsqGP3L5FCEZGQkymP6tw922Od02z1etXUNPtWp3s1ExS Y0hH0xqJkG+fUV4lBuY2/1FpKPKP0Wa9SQKk3vanWnkY6FnyFPSVr/TCYR91n8g0UGoEAo Km20dcYfNUCInv+20c2PFe86byRUSBSEkLj35G7iS5JGoa2KiJRZ0V3Q0i7M7O23RsYIsE i0+ipnpWfcqP8Wn8dd32eMjRpMx6Xb3DxeMHKVUz6+rKXPw/l6e6yonuXXVWZg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638936404; a=rsa-sha256; cv=none; b=LDTD28IHLj8SMm63ymhD0+y1oyTzOQUFq6xtzXHwWW7kRvJLda+MdzxjweJFZplTSCdvZy TkOqXwOSnyyFpgaclPJkmyTX2HtGJxWk0bTRkOZ9g/xBtfijeZhDJ7MbBdKwTiZ7437Xeo GsATtDfwdcQBrhUQqHRSmpNIRQSiTSS6Irjn7pRQ7B2H38nKhwrtk/tdJVGuxQGaqB8DHa 27VKLetJ4bO6ob+ZJ9S01JEp98zE8Dahgk5SgGV1donC86nZbq2KpxtISzfVWkTHCevbNI DaHqPYGF98a37JIp+nlpW4iN3tcZCXN616NkMwH/gxYzWZJ865Y5bZJpvWOE/w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=916a91bd5ec9bfa7ca3d17d21cd45289f65082e4 commit 916a91bd5ec9bfa7ca3d17d21cd45289f65082e4 Author: Alexander Motin AuthorDate: 2021-11-21 23:50:59 +0000 Commit: Alexander Motin CommitDate: 2021-12-08 04:06:25 +0000 GEOM: Switch g_io_deliver() locking from cp to pp. Single provider may have multiple consumers, and locking one of consumers is not sufficient to protect the provider. Though the only part of the provider this locking protects now is its statistics. Reported by: Arka Sharma MFC after: 2 weeks (cherry picked from commit 06bd74e1e39cb33b18b19a748a80b5e1d70fda17) --- 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 2536549762f3..4134645fe618 100644 --- a/sys/geom/geom_io.c +++ b/sys/geom/geom_io.c @@ -670,7 +670,7 @@ g_io_deliver(struct bio *bp, int error) if ((g_collectstats & G_STATS_CONSUMERS) != 0 || ((g_collectstats & G_STATS_PROVIDERS) != 0 && pp->stat != NULL)) binuptime(&now); - mtxp = mtx_pool_find(mtxpool_sleep, cp); + mtxp = mtx_pool_find(mtxpool_sleep, pp); mtx_lock(mtxp); if (g_collectstats & G_STATS_PROVIDERS) devstat_end_transaction_bio_bt(pp->stat, bp, &now);