diff options
author | pjd <pjd@FreeBSD.org> | 2006-03-10 07:41:31 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2006-03-10 07:41:31 +0000 |
commit | f0925fcaf9fbd89ecf68fe9b69dbb567fa60d1eb (patch) | |
tree | 60e62df16102bf90cb7aba40c06143412dc430b8 | |
parent | b1c2c5a706ed9562e4dbb9ba7aa1cdef0e642123 (diff) | |
download | FreeBSD-src-f0925fcaf9fbd89ecf68fe9b69dbb567fa60d1eb.zip FreeBSD-src-f0925fcaf9fbd89ecf68fe9b69dbb567fa60d1eb.tar.gz |
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
-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 529fff8..b9318e0 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 5a4a07b..b83b933 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(); |