mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 04:43:53 +00:00
Round GNOP provider's mediasize to its sectorsize. This prevents KASSERT
in g_io_request when geom classes doing tasting. PR: kern/147852 MFC after: 1 week
This commit is contained in:
parent
610803e3f5
commit
f2b3e9e870
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=217262
|
@ -176,6 +176,8 @@ g_nop_create(struct gctl_req *req, struct g_class *mp, struct g_provider *pp,
|
|||
gctl_error(req, "Invalid secsize for provider %s.", pp->name);
|
||||
return (EINVAL);
|
||||
}
|
||||
if (size % secsize != 0)
|
||||
size -= size % secsize;
|
||||
snprintf(name, sizeof(name), "%s%s", pp->name, G_NOP_SUFFIX);
|
||||
LIST_FOREACH(gp, &mp->geom, geom) {
|
||||
if (strcmp(gp->name, name) == 0) {
|
||||
|
|
Loading…
Reference in a new issue