]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
dm raid1: set discard_zeroes_data_unsupported
authorMikulas Patocka <mpatocka@redhat.com>
Fri, 20 Jul 2012 13:25:07 +0000 (14:25 +0100)
committerBen Hutchings <ben@decadent.org.uk>
Wed, 25 Jul 2012 03:11:32 +0000 (04:11 +0100)
commit9f1e3e0f9fae973747e113848f9a9d0a2e1867f9
treed4cf4ceb6a1547dbf9ea5733a171baf45b687e3b
parent0409d1635121277180269f8294ced70214cbd837
dm raid1: set discard_zeroes_data_unsupported

commit 7c8d3a42fe1c58a7e8fd3f6a013e7d7b474ff931 upstream.

We can't guarantee that REQ_DISCARD on dm-mirror zeroes the data even if
the underlying disks support zero on discard.  So this patch sets
ti->discard_zeroes_data_unsupported.

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.

The flag was made available by commit 983c7db347db8ce2d8453fd1d89b7a4bb6920d56
(dm crypt: always disable discard_zeroes_data).

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/md/dm-raid1.c