mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-28 19:52:44 +00:00
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
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=156527
@ -413,6 +413,7 @@ again:
|
||||
} 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