linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V2 0/3] block: fix discard merge for single max discard segment
@ 2020-08-11 23:44 Ming Lei
  2020-08-11 23:44 ` [PATCH V2 1/3] block: respect queue limit of " Ming Lei
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Ming Lei @ 2020-08-11 23:44 UTC (permalink / raw)
  To: Jens Axboe
  Cc: linux-block, Ming Lei, Christoph Hellwig, Changpeng Liu,
	Daniel Verkamp, Michael S . Tsirkin, Stefan Hajnoczi,
	Stefano Garzarella

Hello,

The 1st patch checks max discard segment limit in request merge code,
and one discard request failure is fixed for virtio_blk.

The 2nd patch fixes handling of single max discard segment for virtio_blk,
and potential memory corruption is fixed.

The 3rd patch renames the confusing blk_discard_mergable().

The biggest problem is that virtio_blk handles discard request in
multi-range style, however it(at least qemu) may claim that multi range
discard isn't supported by returning 1 for max discard segment.

V2:
	- add comment
	- warn on mismatched bios and discard segment number
	- rename blk_discard_mergable


Ming Lei (3):
  block: respect queue limit of max discard segment
  block: virtio_blk: fix handling single range discard request
  block: rename blk_discard_mergable as blk_discard_support_multi_range

 block/blk-merge.c          | 21 +++++++++++++++------
 drivers/block/virtio_blk.c | 31 +++++++++++++++++++++++--------
 2 files changed, 38 insertions(+), 14 deletions(-)

Cc: Christoph Hellwig <hch@lst.de>
Cc: Changpeng Liu <changpeng.liu@intel.com>
Cc: Daniel Verkamp <dverkamp@chromium.org>
Cc: Michael S. Tsirkin <mst@redhat.com>
Cc: Stefan Hajnoczi <stefanha@redhat.com>
Cc: Stefano Garzarella <sgarzare@redhat.com>
-- 
2.25.2


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-08-13 15:43 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-11 23:44 [PATCH V2 0/3] block: fix discard merge for single max discard segment Ming Lei
2020-08-11 23:44 ` [PATCH V2 1/3] block: respect queue limit of " Ming Lei
2020-08-13 15:41   ` Christoph Hellwig
2020-08-11 23:44 ` [PATCH V2 2/3] block: virtio_blk: fix handling single range discard request Ming Lei
2020-08-12  2:07   ` Baolin Wang
2020-08-12  2:52     ` Ming Lei
2020-08-12  6:38       ` Baolin Wang
2020-08-13 15:43   ` Christoph Hellwig
2020-08-11 23:44 ` [PATCH V2 3/3] block: rename blk_discard_mergable as blk_discard_support_multi_range Ming Lei

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).