Don't allow to insert providers, which are too small.
Reported by: Michael Handler <handler@grendel.net>
This commit is contained in:
parent
6f96710c60
commit
16ebaa0793
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=134418
@ -390,6 +390,10 @@ g_raid3_ctl_insert(struct gctl_req *req, struct g_class *mp)
|
||||
gctl_error(req, "Invalid provider.");
|
||||
return;
|
||||
}
|
||||
if ((sc->sc_mediasize / (sc->sc_ndisks - 1)) > pp->mediasize) {
|
||||
gctl_error(req, "Provider %s too small.", pp->name);
|
||||
return;
|
||||
}
|
||||
if (((sc->sc_sectorsize / (sc->sc_ndisks - 1)) % pp->sectorsize) != 0) {
|
||||
gctl_error(req,
|
||||
"Cannot insert provider %s, because of its sector size.",
|
||||
|
Loading…
Reference in New Issue
Block a user