The patch titled dm snapshot: fix metadata writing when suspending has been added to the -mm tree. Its filename is dm-snapshot-fix-metadata-writing-when-suspending.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 writing when suspending From: Mark McLoughlin <markmc@xxxxxxxxxx> When suspending a device-mapper device, dm_suspend() sleeps until all necessary I/O is completed. This state is triggered by a callback from persistent_commit(). But some I/O can still be issued *after* the callback (to prepare the next metadata area for use if the current one is full). This patch delays the callback until after that I/O is complete. 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-exception-store.c | 20 ++++++++++---------- 1 files changed, 10 insertions(+), 10 deletions(-) diff -puN drivers/md/dm-exception-store.c~dm-snapshot-fix-metadata-writing-when-suspending drivers/md/dm-exception-store.c --- a/drivers/md/dm-exception-store.c~dm-snapshot-fix-metadata-writing-when-suspending +++ a/drivers/md/dm-exception-store.c @@ -536,6 +536,16 @@ static void persistent_commit(struct exc if (r) ps->valid = 0; + /* + * Have we completely filled the current area ? + */ + if (ps->current_committed == ps->exceptions_per_area) { + ps->current_committed = 0; + r = zero_area(ps, ps->current_area + 1); + if (r) + ps->valid = 0; + } + for (i = 0; i < ps->callback_count; i++) { cb = ps->callbacks + i; cb->callback(cb->context, r == 0 ? 1 : 0); @@ -543,16 +553,6 @@ static void persistent_commit(struct exc ps->callback_count = 0; } - - /* - * Have we completely filled the current area ? - */ - if (ps->current_committed == ps->exceptions_per_area) { - ps->current_committed = 0; - r = zero_area(ps, ps->current_area + 1); - if (r) - ps->valid = 0; - } } static void persistent_drop(struct exception_store *store) _ 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