When inserting a new component md_provsize metadata field wasn't set, which
means that old problem was triggered (when two providers end at the same offset, eg. ad0 and ad0s1 and the wrong was is picked up by gmirror/graid3). Reported by: Michal Suszko <dry@dry.pl> MFC after: 3 days
This commit is contained in:
parent
ad26242724
commit
9d793bdd46
@ -413,6 +413,7 @@ g_mirror_ctl_insert(struct gctl_req *req, struct g_class *mp)
|
||||
} else {
|
||||
bzero(md.md_provider, sizeof(md.md_provider));
|
||||
}
|
||||
md.md_provsize = pp->mediasize;
|
||||
sector = g_malloc(pp->sectorsize, M_WAITOK);
|
||||
mirror_metadata_encode(&md, sector);
|
||||
error = g_write_data(disks[i].consumer,
|
||||
|
@ -449,6 +449,7 @@ g_raid3_ctl_insert(struct gctl_req *req, struct g_class *mp)
|
||||
strlcpy(md.md_provider, pp->name, sizeof(md.md_provider));
|
||||
else
|
||||
bzero(md.md_provider, sizeof(md.md_provider));
|
||||
md.md_provsize = pp->mediasize;
|
||||
sector = g_malloc(pp->sectorsize, M_WAITOK);
|
||||
raid3_metadata_encode(&md, sector);
|
||||
g_topology_unlock();
|
||||
|
Loading…
Reference in New Issue
Block a user