From: "Liu, Changpeng" <changpeng.liu@intel.com>
To: Paolo Bonzini <pbonzini@redhat.com>,
"virtio-dev@lists.oasis-open.org"
<virtio-dev@lists.oasis-open.org>,
"virtualization@lists.linux-foundation.org"
<virtualization@lists.linux-foundation.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"hch@lst.de" <hch@lst.de>
Cc: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: RE: [virtio-dev] [PATCH] virtio-blk: add DISCARD support to virtio-blk driver
Date: Tue, 28 Mar 2017 01:52:02 +0000 [thread overview]
Message-ID: <FF7FC980937D6342B9D289F5F3C7C2625B56706B@SHSMSX103.ccr.corp.intel.com> (raw)
In-Reply-To: <00d28fcc-446b-eff6-a5a3-6675216802b9@redhat.com>
> -----Original Message-----
> From: virtio-dev@lists.oasis-open.org [mailto:virtio-dev@lists.oasis-open.org] On
> Behalf Of Paolo Bonzini
> Sent: Monday, March 27, 2017 7:34 PM
> To: Liu, Changpeng <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: [virtio-dev] [PATCH] virtio-blk: add DISCARD support to virtio-blk driver
>
>
>
> 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
>
Sounds good to me, Christoph Hellwig mentioned this field will be removed in next release, just removed this line makes clear.
> > + 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);
> > + }
> > +
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org
> For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org
next prev parent reply other threads:[~2017-03-28 1:52 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-28 8:39 [PATCH] virtio-blk: add DISCARD support to virtio-blk driver Changpeng Liu
2017-03-27 11:34 ` [virtio-dev] " Paolo Bonzini
2017-03-28 1:52 ` Liu, Changpeng [this message]
2017-03-27 14:56 ` 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=FF7FC980937D6342B9D289F5F3C7C2625B56706B@SHSMSX103.ccr.corp.intel.com \
--to=changpeng.liu@intel.com \
--cc=hch@lst.de \
--cc=linux-kernel@vger.kernel.org \
--cc=pbonzini@redhat.com \
--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).