summaryrefslogtreecommitdiff
path: root/drivers/md/dm.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2022-02-09 11:28:27 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2022-02-23 05:11:08 +0300
commita773187e37fa5c3bcd92ffda9085707df34f903a (patch)
tree71389a9211836c9b3c3c32b74ffca93285f1450b /drivers/md/dm.c
parent10fa225c33a97385f2843e60b8e86b0ce0cd1e5f (diff)
downloadlinux-a773187e37fa5c3bcd92ffda9085707df34f903a.tar.xz
scsi: dm: Remove WRITE_SAME support
There are no more end-users of REQ_OP_WRITE_SAME left, so we can start deleting it. Link: https://lore.kernel.org/r/20220209082828.2629273-7-hch@lst.de Reviewed-by: Mike Snitzer <snitzer@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/md/dm.c')
-rw-r--r--drivers/md/dm.c15
1 files changed, 0 insertions, 15 deletions
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index c0ae8087c602..79e273924afd 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -855,14 +855,6 @@ void disable_discard(struct mapped_device *md)
blk_queue_flag_clear(QUEUE_FLAG_DISCARD, md->queue);
}
-void disable_write_same(struct mapped_device *md)
-{
- struct queue_limits *limits = dm_get_queue_limits(md);
-
- /* device doesn't really support WRITE SAME, disable it */
- limits->max_write_same_sectors = 0;
-}
-
void disable_write_zeroes(struct mapped_device *md)
{
struct queue_limits *limits = dm_get_queue_limits(md);
@@ -889,9 +881,6 @@ static void clone_endio(struct bio *bio)
if (bio_op(bio) == REQ_OP_DISCARD &&
!q->limits.max_discard_sectors)
disable_discard(md);
- else if (bio_op(bio) == REQ_OP_WRITE_SAME &&
- !q->limits.max_write_same_sectors)
- disable_write_same(md);
else if (bio_op(bio) == REQ_OP_WRITE_ZEROES &&
!q->limits.max_write_zeroes_sectors)
disable_write_zeroes(md);
@@ -1370,7 +1359,6 @@ static bool is_abnormal_io(struct bio *bio)
switch (bio_op(bio)) {
case REQ_OP_DISCARD:
case REQ_OP_SECURE_ERASE:
- case REQ_OP_WRITE_SAME:
case REQ_OP_WRITE_ZEROES:
r = true;
break;
@@ -1392,9 +1380,6 @@ static bool __process_abnormal_io(struct clone_info *ci, struct dm_target *ti,
case REQ_OP_SECURE_ERASE:
num_bios = ti->num_secure_erase_bios;
break;
- case REQ_OP_WRITE_SAME:
- num_bios = ti->num_write_same_bios;
- break;
case REQ_OP_WRITE_ZEROES:
num_bios = ti->num_write_zeroes_bios;
break;