diff options
author | Mike Snitzer <snitzer@redhat.com> | 2012-12-21 20:23:30 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-01-17 08:46:12 -0800 |
commit | eb3b5cd16ff171d5a0f98feee8f4d088107c6334 (patch) | |
tree | e2e21c071c80eda4d0f1b017b0d2bd672e741dd8 /drivers | |
parent | 4f06f4b94023d3d1ec3a953db293d59878ac67b2 (diff) |
dm: disable WRITE SAME
commit c1a94672a830e01d58c7c7e8de530c3f136d6ff2 upstream.
WRITE SAME bios are not yet handled correctly by device-mapper so
disable their use on device-mapper devices by setting
max_write_same_sectors to zero.
As an example, a ciphertext device is incompatible because the data
gets changed according to the location at which it written and so the
dm crypt target cannot support it.
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Cc: Milan Broz <mbroz@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/md/dm-table.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c index 100368eb7991..fa2955790031 100644 --- a/drivers/md/dm-table.c +++ b/drivers/md/dm-table.c @@ -1445,6 +1445,8 @@ void dm_table_set_restrictions(struct dm_table *t, struct request_queue *q, else queue_flag_clear_unlocked(QUEUE_FLAG_NONROT, q); + q->limits.max_write_same_sectors = 0; + dm_table_set_integrity(t); /* |