aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md
diff options
context:
space:
mode:
authorMikulas Patocka <mpatocka@redhat.com>2011-08-02 07:32:00 -0400
committerAlasdair G Kergon <agk@redhat.com>2011-08-02 07:32:00 -0400
commit762a80d9fc9f690a3a35983f3b4619a220650808 (patch)
tree807d9cfcd1c2395cd1cf62a95ebd6676ee2a6a4d /drivers/md
parent6140333d3656f62ac7e6a5af87e7fe92cfb8d655 (diff)
dm snapshot: flush disk cache when merging
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. Cc: stable@kernel.org Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/dm-snap-persistent.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/dm-snap-persistent.c b/drivers/md/dm-snap-persistent.c
index 135c2f1fdbfc..e4ecadf0548a 100644
--- a/drivers/md/dm-snap-persistent.c
+++ b/drivers/md/dm-snap-persistent.c
@@ -753,7 +753,7 @@ static int persistent_commit_merge(struct dm_exception_store *store,
753 for (i = 0; i < nr_merged; i++) 753 for (i = 0; i < nr_merged; i++)
754 clear_exception(ps, ps->current_committed - 1 - i); 754 clear_exception(ps, ps->current_committed - 1 - i);
755 755
756 r = area_io(ps, WRITE); 756 r = area_io(ps, WRITE_FLUSH_FUA);
757 if (r < 0) 757 if (r < 0)
758 return r; 758 return r;
759 759