[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <FF7FC980937D6342B9D289F5F3C7C2625B56706B@SHSMSX103.ccr.corp.intel.com>
Date: Tue, 28 Mar 2017 01:52:02 +0000
From: "Liu, Changpeng" <changpeng.liu@...el.com>
To: Paolo Bonzini <pbonzini@...hat.com>,
"virtio-dev@...ts.oasis-open.org" <virtio-dev@...ts.oasis-open.org>,
"virtualization@...ts.linux-foundation.org"
<virtualization@...ts.linux-foundation.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"hch@....de" <hch@....de>
CC: "qemu-devel@...gnu.org" <qemu-devel@...gnu.org>
Subject: RE: [virtio-dev] [PATCH] virtio-blk: add DISCARD support to
virtio-blk driver
> -----Original Message-----
> From: virtio-dev@...ts.oasis-open.org [mailto:virtio-dev@...ts.oasis-open.org] On
> Behalf Of Paolo Bonzini
> Sent: Monday, March 27, 2017 7:34 PM
> To: Liu, Changpeng <changpeng.liu@...el.com>; virtio-dev@...ts.oasis-open.org;
> virtualization@...ts.linux-foundation.org; linux-kernel@...r.kernel.org; hch@....de
> Cc: qemu-devel@...gnu.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@...ts.oasis-open.org
> For additional commands, e-mail: virtio-dev-help@...ts.oasis-open.org
Powered by blists - more mailing lists