git: 916a91bd5ec9 - stable/13 - GEOM: Switch g_io_deliver() locking from cp to pp.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 08 Dec 2021 04:06:43 UTC
The branch stable/13 has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=916a91bd5ec9bfa7ca3d17d21cd45289f65082e4 commit 916a91bd5ec9bfa7ca3d17d21cd45289f65082e4 Author: Alexander Motin <mav@FreeBSD.org> AuthorDate: 2021-11-21 23:50:59 +0000 Commit: Alexander Motin <mav@FreeBSD.org> 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 <arka.sw1988@gmail.com> 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);