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 07-16-2012, 11:58 PM
Mikulas Patocka
 
Default dm-mirror: set discard_zeroes_data_unsupported

dm-mirror: set discard_zeroes_data_unsupported

We can't guarantee that REQ_DISCARD on dm-mirror zeroes the data even if
the underlying disks support zero on discard.

For example, if the mirror is in the process of resynchronizing, it may
happen that kcopyd reads a piece of data, then discard is sent on the
same area and then kcopyd writes the piece of data to another leg.
Consequently, the data is not zeroed.

So this patch sets ti->discard_zeroes_data_unsupported.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Cc: stable@kernel.org

---
drivers/md/dm-raid1.c | 1 +
1 file changed, 1 insertion(+)

Index: linux-3.5-rc6-fast/drivers/md/dm-raid1.c
================================================== =================
--- linux-3.5-rc6-fast.orig/drivers/md/dm-raid1.c 2012-07-17 00:45:34.000000000 +0200
+++ linux-3.5-rc6-fast/drivers/md/dm-raid1.c 2012-07-17 00:45:39.000000000 +0200
@@ -1091,6 +1091,7 @@ static int mirror_ctr(struct dm_target *

ti->num_flush_requests = 1;
ti->num_discard_requests = 1;
+ ti->discard_zeroes_data_unsupported = 1;

ms->kmirrord_wq = alloc_workqueue("kmirrord",
WQ_NON_REENTRANT | WQ_MEM_RECLAIM, 0);

--
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 07:47 AM.

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