|
@@ -523,9 +523,12 @@ static int snapshot_ctr(struct dm_target *ti, unsigned int argc, char **argv)
|
|
|
|
|
|
/* Metadata must only be loaded into one table at once */
|
|
/* Metadata must only be loaded into one table at once */
|
|
r = s->store.read_metadata(&s->store);
|
|
r = s->store.read_metadata(&s->store);
|
|
- if (r) {
|
|
|
|
|
|
+ if (r < 0) {
|
|
ti->error = "Failed to read snapshot metadata";
|
|
ti->error = "Failed to read snapshot metadata";
|
|
goto bad6;
|
|
goto bad6;
|
|
|
|
+ } else if (r > 0) {
|
|
|
|
+ s->valid = 0;
|
|
|
|
+ DMWARN("Snapshot is marked invalid.");
|
|
}
|
|
}
|
|
|
|
|
|
bio_list_init(&s->queued_bios);
|
|
bio_list_init(&s->queued_bios);
|