Commit f9cea4f7 authored by Mark McLoughlin's avatar Mark McLoughlin Committed by Linus Torvalds
Browse files

[PATCH] dm snapshot: fix metadata error handling

Fix the error handling when store.read_metadata is called: the error should be
returned immediately.
Signed-off-by: default avatarMark McLoughlin <>
Signed-off-by: default avatarAlasdair G Kergon <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 4c7e3bf4
......@@ -387,17 +387,6 @@ static inline ulong round_up(ulong n, ulong size)
return (n + size) & ~size;
static void read_snapshot_metadata(struct dm_snapshot *s)
if (s->store.read_metadata(&s->store)) {
s->valid = 0;
static int set_chunk_size(struct dm_snapshot *s, const char *chunk_size_arg,
char **error)
......@@ -528,7 +517,11 @@ 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) {
ti->error = "Failed to read snapshot metadata";
goto bad6;
/* Add snapshot to the list of snapshots for this origin */
/* Exceptions aren't triggered till snapshot_resume() is called */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment