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
This commit is contained in:
Pawel Jakub Dawidek 2004-08-30 22:08:00 +00:00
parent f489bf21ec
commit edcf2d2891

View File

@ -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) {