The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=b9210d1241ead536d27785ef2a034b8567b26b10
commit b9210d1241ead536d27785ef2a034b8567b26b10 Author: Wuyang Chung <wy-ch...@outlook.com> AuthorDate: 2025-07-18 09:04:22 +0000 Commit: Warner Losh <i...@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; }