Date: Wed, 23 Jul 2025 06:22:08 GMT From: Warner Losh <imp@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: b9210d1241ea - main - gconcat: Return EINVAL when the metadata is invalid for an added disk. Message-ID: <202507230622.56N6M8JV020343@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=b9210d1241ead536d27785ef2a034b8567b26b10 commit b9210d1241ead536d27785ef2a034b8567b26b10 Author: Wuyang Chung <wy-chung@outlook.com> AuthorDate: 2025-07-18 09:04:22 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2025-07-23 05:58:44 +0000 gconcat: Return EINVAL when the metadata is invalid for an added disk. We don't use the disk and stop using it right afterwards. The user should get an error indication, just like they would if there had been a disk read error. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1775 --- sys/geom/concat/g_concat.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/geom/concat/g_concat.c b/sys/geom/concat/g_concat.c index 2b1cb575cac8..2173a84c7acf 100644 --- a/sys/geom/concat/g_concat.c +++ b/sys/geom/concat/g_concat.c @@ -590,6 +590,7 @@ g_concat_add_disk(struct g_concat_softc *sc, struct g_provider *pp, u_int no) strcmp(md.md_name, sc->sc_name) != 0 || md.md_id != sc->sc_id) { G_CONCAT_DEBUG(0, "Metadata on %s changed.", pp->name); + error = EINVAL; goto fail; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202507230622.56N6M8JV020343>