summaryrefslogtreecommitdiffstats
path: root/sbin/geom/class/raid3
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2004-08-30 22:08:00 +0000
committerpjd <pjd@FreeBSD.org>2004-08-30 22:08:00 +0000
commit5d5c60a5a5df72be519b696ae8824430d1560d72 (patch)
tree84a9b468e95d9ec6c153ee45314b889a6f925178 /sbin/geom/class/raid3
parenta11d331f8484593ef69103dd33ea9f9e74b38b64 (diff)
downloadFreeBSD-src-5d5c60a5a5df72be519b696ae8824430d1560d72.zip
FreeBSD-src-5d5c60a5a5df72be519b696ae8824430d1560d72.tar.gz
When configuring RAID3 with verification option, force synchronization
of parity component, because we can't return an EIO error for read of every sector which wasn't written first. Discussed with: phk
Diffstat (limited to 'sbin/geom/class/raid3')
-rw-r--r--sbin/geom/class/raid3/geom_raid3.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sbin/geom/class/raid3/geom_raid3.c b/sbin/geom/class/raid3/geom_raid3.c
index 1d948b4..00baa27 100644
--- a/sbin/geom/class/raid3/geom_raid3.c
+++ b/sbin/geom/class/raid3/geom_raid3.c
@@ -280,6 +280,13 @@ raid3_label(struct gctl_req *req)
str += strlen(_PATH_DEV);
strlcpy(md.md_provider, str, sizeof(md.md_provider));
}
+ if (*verify && md.md_no == md.md_all - 1) {
+ /*
+ * In "verify" mode, force synchronization of parity
+ * component on start.
+ */
+ md.md_syncid = 0;
+ }
raid3_metadata_encode(&md, sector);
error = g_metadata_store(str, sector, sizeof(sector));
if (error != 0) {
OpenPOWER on IntegriCloud