diff options
Diffstat (limited to 'drivers/md/dm-snap.c')
-rw-r--r-- | drivers/md/dm-snap.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/md/dm-snap.c b/drivers/md/dm-snap.c index 1da41229fbf2..854891d07b59 100644 --- a/drivers/md/dm-snap.c +++ b/drivers/md/dm-snap.c @@ -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 */ r = s->store.read_metadata(&s->store); - if (r) { + if (r < 0) { ti->error = "Failed to read snapshot metadata"; goto bad6; + } else if (r > 0) { + s->valid = 0; + DMWARN("Snapshot is marked invalid."); } bio_list_init(&s->queued_bios); |