Fix provider's size check for 'insert' command.
Before this fix one was able to insert one sector too small provider. MFC after: 3 days
This commit is contained in:
parent
cd218c4d5b
commit
93f62be898
@ -367,7 +367,8 @@ g_mirror_ctl_insert(struct gctl_req *req, struct g_class *mp)
|
||||
gctl_error(req, "Unknown provider %s.", name);
|
||||
continue;
|
||||
}
|
||||
if (sc->sc_provider->mediasize > pp->mediasize) {
|
||||
if (sc->sc_provider->mediasize >
|
||||
pp->mediasize - pp->sectorsize) {
|
||||
gctl_error(req, "Provider %s too small.", name);
|
||||
continue;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user