; Subject: Re: [PATCH v4] virtio_blk: add DISCARD and WRIET ZEROES commands
> support
>
> On 04/06/2018 06:14, Liu, Changpeng wrote:
> >>> But I believe the specification says VIRTIO_BLK_T_OUT means direction, so
> >>> OR the two bits together should compliance with the sp
On 04/06/2018 06:14, Liu, Changpeng wrote:
>>> But I believe the specification says VIRTIO_BLK_T_OUT means direction, so
>>> OR the two bits together should compliance with the specification.
>> I cannot find that in the specification:
>>
>>
>> http://docs.oasis-open.org/virtio/virtio/v1.0/cs04/
> > Sent: Thursday, May 31, 2018 6:31 PM
> > > To: Liu, Changpeng
> > > Cc: virtualization@lists.linux-foundation.org; cav...@redhat.com;
> > > jasow...@redhat.com; pbonz...@redhat.com; Wang, Wei W
> > >
> > > Subject: Re: [PATCH v4] virtio_blk: ad
ux-foundation.org; cav...@redhat.com;
> > jasow...@redhat.com; pbonz...@redhat.com; Wang, Wei W
> >
> > Subject: Re: [PATCH v4] virtio_blk: add DISCARD and WRIET ZEROES commands
> > support
> >
> > On Tue, May 29, 2018 at 09:42:24AM +0800, Changpeng Liu wrote:
; Subject: Re: [PATCH v4] virtio_blk: add DISCARD and WRIET ZEROES commands
> support
>
> On Tue, May 29, 2018 at 09:42:24AM +0800, Changpeng Liu wrote:
> > num = blk_rq_map_sg(hctx->queue, req, vbr->sg);
> > if (num) {
> > - if (rq_data_dir(req
On Tue, May 29, 2018 at 09:42:24AM +0800, Changpeng Liu wrote:
> num = blk_rq_map_sg(hctx->queue, req, vbr->sg);
> if (num) {
> - if (rq_data_dir(req) == WRITE)
> + if (rq_data_dir(req) == WRITE || type == VIRTIO_BLK_T_DISCARD ||
> + type == VIRTI
Existing virtio-blk protocol doesn't have DISCARD/WRITE ZEROES commands
support, this will impact the performance when using SSD backend over
file systems.
Commit 88c85538 "virtio-blk: add discard and write zeroes features to
specification"(see https://github.com/oasis-tcs/virtio-spec) extended
ex