From: Paolo Bonzini <pbonzini@redhat.com>
To: Changpeng Liu <changpeng.liu@intel.com>,
virtio-dev@lists.oasis-open.org,
virtualization@lists.linux-foundation.org,
linux-kernel@vger.kernel.org, hch@lst.de
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [virtio-dev] [PATCH] virtio-blk: add DISCARD support to virtio-blk driver
Date: Mon, 27 Mar 2017 13:34:17 +0200 [thread overview]
Message-ID: <00d28fcc-446b-eff6-a5a3-6675216802b9@redhat.com> (raw)
In-Reply-To: <1490690365-21109-1-git-send-email-changpeng.liu@intel.com>
On 28/03/2017 10:39, Changpeng Liu wrote:
> + if (virtio_has_feature(vdev, VIRTIO_BLK_F_DISCARD)) {
> + q->limits.discard_zeroes_data = 0;
Maybe you could use another feature bit to populate discard_zeroes_data.
Paolo
> + q->limits.discard_alignment = blk_size;
> + q->limits.discard_granularity = blk_size;
> + blk_queue_max_discard_sectors(q, UINT_MAX);
> + blk_queue_max_discard_segments(q, 1);
> + queue_flag_set_unlocked(QUEUE_FLAG_DISCARD, q);
> + }
> +
next prev parent reply other threads:[~2017-03-27 11:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-28 8:39 [Qemu-devel] [PATCH] virtio-blk: add DISCARD support to virtio-blk driver Changpeng Liu
2017-03-27 11:34 ` Paolo Bonzini [this message]
2017-03-28 1:52 ` [Qemu-devel] [virtio-dev] " Liu, Changpeng
2017-03-27 14:56 ` [Qemu-devel] " Christoph Hellwig
2017-03-28 1:43 ` Liu, Changpeng
2017-03-27 20:20 ` Stefan Hajnoczi
2017-03-28 2:15 ` Liu, Changpeng
2017-03-28 8:37 ` Stefan Hajnoczi
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=00d28fcc-446b-eff6-a5a3-6675216802b9@redhat.com \
--to=pbonzini@redhat.com \
--cc=changpeng.liu@intel.com \
--cc=hch@lst.de \
--cc=linux-kernel@vger.kernel.org \
--cc=qemu-devel@nongnu.org \
--cc=virtio-dev@lists.oasis-open.org \
--cc=virtualization@lists.linux-foundation.org \
/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 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).