This is a note to let you know that I've just added the patch titled

    dm snapshot: flush disk cache when merging

to the 3.0-stable tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     dm-snapshot-flush-disk-cache-when-merging.patch
and it can be found in the queue-3.0 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <sta...@kernel.org> know about it.


>From 762a80d9fc9f690a3a35983f3b4619a220650808 Mon Sep 17 00:00:00 2001
From: Mikulas Patocka <mpato...@redhat.com>
Date: Tue, 2 Aug 2011 12:32:00 +0100
Subject: dm snapshot: flush disk cache when merging

From: Mikulas Patocka <mpato...@redhat.com>

commit 762a80d9fc9f690a3a35983f3b4619a220650808 upstream.

This patch makes dm-snapshot flush disk cache when writing metadata for
merging snapshot.

Without cache flushing the disk may reorder metadata write and other
data writes and there is a possibility of data corruption in case of
power fault.

Signed-off-by: Mikulas Patocka <mpato...@redhat.com>
Signed-off-by: Alasdair G Kergon <a...@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gre...@suse.de>

---
 drivers/md/dm-snap-persistent.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/md/dm-snap-persistent.c
+++ b/drivers/md/dm-snap-persistent.c
@@ -753,7 +753,7 @@ static int persistent_commit_merge(struc
        for (i = 0; i < nr_merged; i++)
                clear_exception(ps, ps->current_committed - 1 - i);
 
-       r = area_io(ps, WRITE);
+       r = area_io(ps, WRITE_FLUSH_FUA);
        if (r < 0)
                return r;
 


Patches currently in stable-queue which might be from mpato...@redhat.com are

queue-3.0/dm-snapshot-flush-disk-cache-when-merging.patch
queue-3.0/dm-io-flush-cpu-cache-with-vmapped-io.patch

_______________________________________________
stable mailing list
stable@linux.kernel.org
http://linux.kernel.org/mailman/listinfo/stable

Reply via email to