Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 176531
b: refs/heads/master
c: f5acc83
h: refs/heads/master
i:
  176529: d95e33a
  176527: d993c06
v: v3
  • Loading branch information
Jon Brassow authored and Alasdair G Kergon committed Dec 10, 2009
1 parent df08ac3 commit f0e9ef4
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 26 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: a518b86d0b1b6a474f154697dc6f33e0a317ae72
refs/heads/master: f5acc834287dd4f6cf712093ce0e779e38caad70
46 changes: 21 additions & 25 deletions trunk/drivers/md/dm-snap-persistent.c
Original file line number Diff line number Diff line change
Expand Up @@ -552,35 +552,31 @@ static int persistent_read_metadata(struct dm_exception_store *store,
ps->current_area = 0;
zero_memory_area(ps);
r = zero_disk_area(ps, 0);
if (r) {
if (r)
DMWARN("zero_disk_area(0) failed");
return r;
}
} else {
/*
* Sanity checks.
*/
if (ps->version != SNAPSHOT_DISK_VERSION) {
DMWARN("unable to handle snapshot disk version %d",
ps->version);
return -EINVAL;
}
return r;
}
/*
* Sanity checks.
*/
if (ps->version != SNAPSHOT_DISK_VERSION) {
DMWARN("unable to handle snapshot disk version %d",
ps->version);
return -EINVAL;
}

/*
* Metadata are valid, but snapshot is invalidated
*/
if (!ps->valid)
return 1;
/*
* Metadata are valid, but snapshot is invalidated
*/
if (!ps->valid)
return 1;

/*
* Read the metadata.
*/
r = read_exceptions(ps, callback, callback_context);
if (r)
return r;
}
/*
* Read the metadata.
*/
r = read_exceptions(ps, callback, callback_context);

return 0;
return r;
}

static int persistent_prepare_exception(struct dm_exception_store *store,
Expand Down

0 comments on commit f0e9ef4

Please sign in to comment.