Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 38088
b: refs/heads/master
c: f9cea4f
h: refs/heads/master
v: v3
  • Loading branch information
Mark McLoughlin authored and Linus Torvalds committed Oct 3, 2006
1 parent 6ea0a31 commit 114962c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4c7e3bf44d0ae227ea1ee87c2197212e65d043d7
refs/heads/master: f9cea4f70734f743e0beb55552a9794fa5032645
17 changes: 5 additions & 12 deletions trunk/drivers/md/dm-snap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
down_write(&s->lock);
s->valid = 0;
up_write(&s->lock);

dm_table_event(s->table);
}
}

static int set_chunk_size(struct dm_snapshot *s, const char *chunk_size_arg,
char **error)
{
Expand Down Expand Up @@ -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 */
read_snapshot_metadata(s);
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 */
Expand Down

0 comments on commit 114962c

Please sign in to comment.