diff options
Diffstat (limited to 'recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.24/0073-dm-raid1-set-discard_zeroes_data_unsupported.patch')
-rw-r--r-- | recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.24/0073-dm-raid1-set-discard_zeroes_data_unsupported.patch | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.24/0073-dm-raid1-set-discard_zeroes_data_unsupported.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.24/0073-dm-raid1-set-discard_zeroes_data_unsupported.patch new file mode 100644 index 00000000..b5f81f28 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.24/0073-dm-raid1-set-discard_zeroes_data_unsupported.patch | |||
@@ -0,0 +1,41 @@ | |||
1 | From e8cf7231ce4f6464f8962ae6ef0421da40ddad15 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mikulas Patocka <mpatocka@redhat.com> | ||
3 | Date: Fri, 20 Jul 2012 14:25:07 +0100 | ||
4 | Subject: [PATCH 073/109] dm raid1: set discard_zeroes_data_unsupported | ||
5 | |||
6 | commit 7c8d3a42fe1c58a7e8fd3f6a013e7d7b474ff931 upstream. | ||
7 | |||
8 | We can't guarantee that REQ_DISCARD on dm-mirror zeroes the data even if | ||
9 | the underlying disks support zero on discard. So this patch sets | ||
10 | ti->discard_zeroes_data_unsupported. | ||
11 | |||
12 | For example, if the mirror is in the process of resynchronizing, it may | ||
13 | happen that kcopyd reads a piece of data, then discard is sent on the | ||
14 | same area and then kcopyd writes the piece of data to another leg. | ||
15 | Consequently, the data is not zeroed. | ||
16 | |||
17 | The flag was made available by commit 983c7db347db8ce2d8453fd1d89b7a4bb6920d56 | ||
18 | (dm crypt: always disable discard_zeroes_data). | ||
19 | |||
20 | Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> | ||
21 | Signed-off-by: Alasdair G Kergon <agk@redhat.com> | ||
22 | Signed-off-by: Ben Hutchings <ben@decadent.org.uk> | ||
23 | --- | ||
24 | drivers/md/dm-raid1.c | 1 + | ||
25 | 1 files changed, 1 insertions(+), 0 deletions(-) | ||
26 | |||
27 | diff --git a/drivers/md/dm-raid1.c b/drivers/md/dm-raid1.c | ||
28 | index 42ef54f..dae2b7a 100644 | ||
29 | --- a/drivers/md/dm-raid1.c | ||
30 | +++ b/drivers/md/dm-raid1.c | ||
31 | @@ -1080,6 +1080,7 @@ static int mirror_ctr(struct dm_target *ti, unsigned int argc, char **argv) | ||
32 | ti->split_io = dm_rh_get_region_size(ms->rh); | ||
33 | ti->num_flush_requests = 1; | ||
34 | ti->num_discard_requests = 1; | ||
35 | + ti->discard_zeroes_data_unsupported = 1; | ||
36 | |||
37 | ms->kmirrord_wq = alloc_workqueue("kmirrord", | ||
38 | WQ_NON_REENTRANT | WQ_MEM_RECLAIM, 0); | ||
39 | -- | ||
40 | 1.7.7.6 | ||
41 | |||