X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=drivers%2Fmd%2Fdm-log.c;h=072ee4353eab329620995aceee14b468a49584a4;hb=39e823e35b791b905e0d8eba62e8b3a0b3351936;hp=a60acf8d385a3541123ff514e9c7902aa2456ce2;hpb=5d234d1e03d0a4cef4da32177be6657b45cc513f;p=powerpc.git diff --git a/drivers/md/dm-log.c b/drivers/md/dm-log.c index a60acf8d38..072ee4353e 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 */ @@ -689,7 +696,7 @@ static struct dirty_log_type _disk_type = { .module = THIS_MODULE, .ctr = disk_ctr, .dtr = disk_dtr, - .suspend = disk_flush, + .postsuspend = disk_flush, .resume = disk_resume, .get_region_size = core_get_region_size, .is_clean = core_is_clean,