The patch titled dm snapshot: fix metadata error handling has been added to the -mm tree. Its filename is dm-snapshot-fix-metadata-error-handling.patch See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: dm snapshot: fix metadata error handling From: Mark McLoughlin <markmc@xxxxxxxxxx> Fix the error handling when store.read_metadata is called: the error should be returned immediately. Signed-off-by: Mark McLoughlin <markmc@xxxxxxxxxx> Signed-off-by: Alasdair G Kergon <agk@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- drivers/md/dm-snap.c | 17 +++++------------ 1 files changed, 5 insertions(+), 12 deletions(-) diff -puN drivers/md/dm-snap.c~dm-snapshot-fix-metadata-error-handling drivers/md/dm-snap.c --- a/drivers/md/dm-snap.c~dm-snapshot-fix-metadata-error-handling +++ a/drivers/md/dm-snap.c @@ -387,17 +387,6 @@ static inline ulong round_up(ulong n, ul 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) { @@ -528,7 +517,11 @@ static int snapshot_ctr(struct dm_target } /* 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 */ _ Patches currently in -mm which might be from markmc@xxxxxxxxxx are dm-snapshot-allow-zero-chunk_size.patch dm-snapshot-fix-metadata-error-handling.patch dm-snapshot-make-read-and-write-exception-functions-void.patch dm-snapshot-fix-metadata-writing-when-suspending.patch dm-snapshot-tidy-pending_complete.patch dm-snapshot-add-workqueue.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html