Date: Tue, 12 Dec 2006 17:58:55 GMT From: Matt Jacob <mjacob@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 111564 for review Message-ID: <200612121758.kBCHwtbU008774@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=111564 Change 111564 by mjacob@mjexp on 2006/12/12 17:58:31 More baby steps. Now have something that doesn't crash right away. Affected files ... .. //depot/projects/mjexp/sys/geom/multipath/g_multipath.c#2 edit Differences ... ==== //depot/projects/mjexp/sys/geom/multipath/g_multipath.c#2 (text+ko) ==== @@ -126,10 +126,27 @@ g_topology_assert(); + /* + * Check to make sure parameters from the two providers are the same + */ + if (pp0->mediasize != pp1->mediasize) { + gctl_error(req, "Provider %s has mediasize %zx; Provider %s " + "has mediasize %zx", pp0->name, (intmax_t) pp0->mediasize, + pp1->name, (intmax_t) pp1->mediasize); + return (EINVAL); + } + if (pp0->sectorsize != pp1->sectorsize) { + gctl_error(req, "Provider %s has sectorsize %u; Provider %s " + "has sectorsize %u", pp0->name, pp0->sectorsize, + pp1->name, pp1->sectorsize); + return (EINVAL); + } + gp = NULL; newpp = NULL; cp0 = cp1 = NULL; + LIST_FOREACH(gp, &mp->geom, geom) { if (strcmp(gp->name, mpname) == 0) { gctl_error(req, "Provider %s already exists", mpname); @@ -155,6 +172,8 @@ error = ENOMEM; goto fail; } + newpp->mediasize = pp0->mediasize; + newpp->sectorsize = pp0->sectorsize; cp0 = g_new_consumer(gp); if (cp0 == NULL) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200612121758.kBCHwtbU008774>