diff options
author | Pawel Jakub Dawidek <pjd@FreeBSD.org> | 2006-03-10 07:41:31 +0000 |
---|---|---|
committer | Pawel Jakub Dawidek <pjd@FreeBSD.org> | 2006-03-10 07:41:31 +0000 |
commit | 9d793bdd466d547dfc1b7c0b9fb119c3e4c3b997 (patch) | |
tree | 60e62df16102bf90cb7aba40c06143412dc430b8 /sys/geom | |
parent | ad26242724444f3ca1dc100e15938a3f89d57dc4 (diff) | |
download | src-9d793bdd466d547dfc1b7c0b9fb119c3e4c3b997.tar.gz src-9d793bdd466d547dfc1b7c0b9fb119c3e4c3b997.zip |
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
Notes
Notes:
svn path=/head/; revision=156527
Diffstat (limited to 'sys/geom')
-rw-r--r-- | sys/geom/mirror/g_mirror_ctl.c | 1 | ||||
-rw-r--r-- | sys/geom/raid3/g_raid3_ctl.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/sys/geom/mirror/g_mirror_ctl.c b/sys/geom/mirror/g_mirror_ctl.c index 529fff86b4d8..b9318e0faf94 100644 --- a/sys/geom/mirror/g_mirror_ctl.c +++ b/sys/geom/mirror/g_mirror_ctl.c @@ -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, diff --git a/sys/geom/raid3/g_raid3_ctl.c b/sys/geom/raid3/g_raid3_ctl.c index 5a4a07bd2e6f..b83b933460d6 100644 --- a/sys/geom/raid3/g_raid3_ctl.c +++ b/sys/geom/raid3/g_raid3_ctl.c @@ -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(); |