All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Ming Lei <ming.lei@redhat.com>
Cc: Jens Axboe <axboe@kernel.dk>,
	linux-block@vger.kernel.org, Christoph Hellwig <hch@lst.de>,
	Changpeng Liu <changpeng.liu@intel.com>,
	Daniel Verkamp <dverkamp@chromium.org>,
	"Michael S . Tsirkin" <mst@redhat.com>,
	Stefan Hajnoczi <stefanha@redhat.com>,
	Stefano Garzarella <sgarzare@redhat.com>
Subject: Re: [PATCH V2 2/3] block: virtio_blk: fix handling single range discard request
Date: Thu, 13 Aug 2020 17:43:40 +0200	[thread overview]
Message-ID: <20200813154340.GB14200@lst.de> (raw)
In-Reply-To: <20200811234420.2297137-3-ming.lei@redhat.com>

On Wed, Aug 12, 2020 at 07:44:19AM +0800, Ming Lei wrote:
> 1f23816b8eb8 ("virtio_blk: add discard and write zeroes support") starts
> to support multi-range discard for virtio-blk. However, the virtio-blk
> disk may report max discard segment as 1, at least that is exactly what
> qemu is doing.
> 
> So far, block layer switches to normal request merge if max discard segment
> limit is 1, and multiple bios can be merged to single segment. This way may
> cause memory corruption in virtblk_setup_discard_write_zeroes().
> 
> Fix the issue by handling single max discard segment in straightforward
> way.

Looks good,

Reviewed-by: Christoph Hellwig <hch@lst.de>

  parent reply	other threads:[~2020-08-13 15:43 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2020-08-11 23:44 ` [PATCH V2 3/3] block: rename blk_discard_mergable as blk_discard_support_multi_range Ming Lei

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200813154340.GB14200@lst.de \
    --to=hch@lst.de \
    --cc=axboe@kernel.dk \
    --cc=changpeng.liu@intel.com \
    --cc=dverkamp@chromium.org \
    --cc=linux-block@vger.kernel.org \
    --cc=ming.lei@redhat.com \
    --cc=mst@redhat.com \
    --cc=sgarzare@redhat.com \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.