aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md
diff options
context:
space:
mode:
authorMike Snitzer <snitzer@redhat.com>2012-12-21 15:23:30 -0500
committerAlasdair G Kergon <agk@redhat.com>2012-12-21 15:23:30 -0500
commitc1a94672a830e01d58c7c7e8de530c3f136d6ff2 (patch)
tree00f9fa087a3bbae3fe55bda80f6b222512eea51a /drivers/md
parente910d7ebecd1aac43125944a8641b6cb1a0dfabe (diff)
dm: disable WRITE SAME
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: stable@vger.kernel.org Cc: Milan Broz <mbroz@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/dm-table.c2
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,
1445 else 1445 else
1446 queue_flag_clear_unlocked(QUEUE_FLAG_NONROT, q); 1446 queue_flag_clear_unlocked(QUEUE_FLAG_NONROT, q);
1447 1447
1448 q->limits.max_write_same_sectors = 0;
1449
1448 dm_table_set_integrity(t); 1450 dm_table_set_integrity(t);
1449 1451
1450 /* 1452 /*