Files
kernel_arpi/include/linux
Ming Lei 87aa69aa10 block: return ELEVATOR_DISCARD_MERGE if possible
[ Upstream commit 866663b7b5 ]

When merging one bio to request, if they are discard IO and the queue
supports multi-range discard, we need to return ELEVATOR_DISCARD_MERGE
because both block core and related drivers(nvme, virtio-blk) doesn't
handle mixed discard io merge(traditional IO merge together with
discard merge) well.

Fix the issue by returning ELEVATOR_DISCARD_MERGE in this situation,
so both blk-mq and drivers just need to handle multi-range discard.

Reported-by: Oleksandr Natalenko <oleksandr@natalenko.name>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Tested-by: Oleksandr Natalenko <oleksandr@natalenko.name>
Fixes: 2705dfb209 ("block: fix discard request merge")
Link: https://lore.kernel.org/r/20210729034226.1591070-1-ming.lei@redhat.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-09-15 09:50:28 +02:00
..
2020-12-11 14:02:14 -08:00
2021-09-08 08:49:01 +02:00
2020-11-19 22:38:29 -05:00
2021-03-04 11:37:59 +01:00
2021-02-07 15:37:17 +01:00
2021-06-30 08:47:26 -04:00
2021-09-03 10:09:21 +02:00
2021-03-30 14:32:05 +02:00
2020-11-06 10:05:18 -08:00
2021-08-04 12:46:44 +02:00
2021-05-07 11:04:32 +02:00
2021-05-14 09:50:18 +02:00
2021-05-14 09:50:18 +02:00
2021-05-14 09:50:31 +02:00
2021-08-26 08:35:41 -04:00