summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorae <ae@FreeBSD.org>2012-02-01 09:28:16 +0000
committerae <ae@FreeBSD.org>2012-02-01 09:28:16 +0000
commitcc4809fb9a69c33de24df97e2bf4ed5fa9c9d770 (patch)
tree5c694a79b6da0a969732c77092a77601f99a91e3
parent9a35f3265769f4b6cd68e56d5866a8dcc9d54481 (diff)
downloadFreeBSD-src-cc4809fb9a69c33de24df97e2bf4ed5fa9c9d770.zip
FreeBSD-src-cc4809fb9a69c33de24df97e2bf4ed5fa9c9d770.tar.gz
The scheme code may not know about some inconsistency in the metadata.
So, add an integrity check after recovery attempt. MFC after: 1 week
-rw-r--r--sys/geom/part/g_part.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/geom/part/g_part.c b/sys/geom/part/g_part.c
index 4cc1ed5..8ea5bb6 100644
--- a/sys/geom/part/g_part.c
+++ b/sys/geom/part/g_part.c
@@ -1216,6 +1216,9 @@ g_part_ctl_recover(struct gctl_req *req, struct g_part_parms *gpp)
if (table->gpt_corrupt) {
error = G_PART_RECOVER(table);
+ if (error == 0)
+ error = g_part_check_integrity(table,
+ LIST_FIRST(&gp->consumer));
if (error) {
gctl_error(req, "%d recovering '%s' failed",
error, gp->name);
OpenPOWER on IntegriCloud