aboutsummaryrefslogtreecommitdiff
path: root/drivers/md
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/dm-log.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/md/dm-log.c b/drivers/md/dm-log.c
index a60acf8d385..a66428d860f 100644
--- a/drivers/md/dm-log.c
+++ b/drivers/md/dm-log.c
@@ -478,7 +478,14 @@ static int disk_resume(struct dirty_log *log)
DMWARN("%s: Failed to read header on mirror log device",
lc->log_dev->name);
fail_log_device(lc);
- return r;
+ /*
+ * If the log device cannot be read, we must assume
+ * all regions are out-of-sync. If we simply return
+ * here, the state will be uninitialized and could
+ * lead us to return 'in-sync' status for regions
+ * that are actually 'out-of-sync'.
+ */
+ lc->header.nr_regions = 0;
}
/* set or clear any new bits -- device has grown */