FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Device-mapper Development

 
 
LinkBack Thread Tools
 
Old 06-08-2011, 10:02 PM
Mikulas Patocka
 
Default dm-snapshot: flush disk cache when merging

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.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>

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

Index: linux-2.6.39-fast/drivers/md/dm-snap-persistent.c
================================================== =================
--- linux-2.6.39-fast.orig/drivers/md/dm-snap-persistent.c 2011-06-08 23:56:49.000000000 +0200
+++ linux-2.6.39-fast/drivers/md/dm-snap-persistent.c 2011-06-08 23:59:05.000000000 +0200
@@ -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;


--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 

Thread Tools




All times are GMT. The time now is 09:50 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org