RE: [PATCH v4] virtio_blk: add DISCARD and WRIET ZEROES commands support

2018-06-04 Thread Liu, Changpeng
; 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

Re: [PATCH v4] virtio_blk: add DISCARD and WRIET ZEROES commands support

2018-06-04 Thread Paolo Bonzini
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: >> >> >>

RE: [PATCH v4] virtio_blk: add DISCARD and WRIET ZEROES commands support

2018-06-03 Thread Liu, Changpeng
> > 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

Re: [PATCH v4] virtio_blk: add DISCARD and WRIET ZEROES commands support

2018-06-01 Thread Stefan Hajnoczi
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:

RE: [PATCH v4] virtio_blk: add DISCARD and WRIET ZEROES commands support

2018-05-31 Thread Liu, Changpeng
; 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

Re: [PATCH v4] virtio_blk: add DISCARD and WRIET ZEROES commands support

2018-05-31 Thread Stefan Hajnoczi
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 ==

[PATCH v4] virtio_blk: add DISCARD and WRIET ZEROES commands support

2018-05-28 Thread Changpeng Liu
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