Date: Thu, 10 Feb 2022 13:46:50 GMT From: Mark Johnston <markj@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 7fbdc1e3d421 - stable/13 - geom: Assert that BIO_SPEEDUP BIOs have bio_data set to NULL Message-ID: <202202101346.21ADko6G049558@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=7fbdc1e3d421d4c2612933a5fe292541e9611aae commit 7fbdc1e3d421d4c2612933a5fe292541e9611aae Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2022-01-27 14:58:19 +0000 Commit: Mark Johnston <markj@FreeBSD.org> 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));
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202202101346.21ADko6G049558>