]> git.baikalelectronics.ru Git - kernel.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)
committerAlasdair G Kergon <agk@redhat.com>
Fri, 20 Jul 2012 13:25:07 +0000 (14:25 +0100)
commit3e2a65ffaddd2a2b2ab7dbf91c32e536b2b71779
tree876e2084849a853ef55b2636b61408c4d138fea7
parent9305b05ecef1eb3b4fa45e840c0e86a0b40d478a
dm raid1: 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.  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 a30899430a8d5f2b03db927f440b0626fb555140
(dm crypt: always disable discard_zeroes_data).

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Cc: stable@kernel.org
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
drivers/md/dm-raid1.c