Re: [PATCH v8] virtio_blk: add discard and write zeroes support

2018-11-02 Thread Daniel Verkamp
On Thu, Nov 1, 2018 at 2:25 PM Michael S. Tsirkin wrote: > > On Mon, Oct 29, 2018 at 05:05:21AM +, Stefan Hajnoczi wrote: > > On Fri, Oct 26, 2018 at 10:47:16AM -0400, Michael S. Tsirkin wrote: > > > On Fri, Oct 26, 2018 at 09:08:38AM +0100, Stefan Hajnoczi wrote: > > > > On Fri, Oct 12, 2018

Re: [PATCH v8] virtio_blk: add discard and write zeroes support

2018-11-02 Thread Michael S. Tsirkin
On Mon, Oct 29, 2018 at 05:05:21AM +, Stefan Hajnoczi wrote: > On Fri, Oct 26, 2018 at 10:47:16AM -0400, Michael S. Tsirkin wrote: > > On Fri, Oct 26, 2018 at 09:08:38AM +0100, Stefan Hajnoczi wrote: > > > On Fri, Oct 12, 2018 at 02:06:28PM -0700, Daniel Verkamp wrote: > > > > + r

Re: [PATCH v8] virtio_blk: add discard and write zeroes support

2018-10-29 Thread Paolo Bonzini
On 26/10/2018 10:26, Christoph Hellwig wrote: > On Fri, Oct 26, 2018 at 01:28:54AM +0200, Paolo Bonzini wrote: >> On 15/10/2018 11:27, Christoph Hellwig wrote: >>> There is some issues in this spec. For one using the multiple ranges >>> also for write zeroes is rather inefficient. Write zeroes re

Re: [PATCH v8] virtio_blk: add discard and write zeroes support

2018-10-28 Thread Stefan Hajnoczi
On Fri, Oct 26, 2018 at 10:47:16AM -0400, Michael S. Tsirkin wrote: > On Fri, Oct 26, 2018 at 09:08:38AM +0100, Stefan Hajnoczi wrote: > > On Fri, Oct 12, 2018 at 02:06:28PM -0700, Daniel Verkamp wrote: > > > + range[n].flags = cpu_to_le32(flags); > > > + range[n].num_sectors = cpu_

RE: [PATCH v8] virtio_blk: add discard and write zeroes support

2018-10-28 Thread Liu, Changpeng
tion.org; linux- > bl...@vger.kernel.org; Stefan Hajnoczi ; Liu, Changpeng > > Subject: Re: [PATCH v8] virtio_blk: add discard and write zeroes support > > On Fri, Oct 26, 2018 at 01:28:54AM +0200, Paolo Bonzini wrote: > > On 15/10/2018 11:27, Christoph Hellwig wrote: > > > Th

Re: [PATCH v8] virtio_blk: add discard and write zeroes support

2018-10-26 Thread Michael S. Tsirkin
On Fri, Oct 26, 2018 at 09:08:38AM +0100, Stefan Hajnoczi wrote: > On Fri, Oct 12, 2018 at 02:06:28PM -0700, Daniel Verkamp wrote: > > + range[n].flags = cpu_to_le32(flags); > > + range[n].num_sectors = cpu_to_le32(num_sectors); > > + range[n].sector = cpu_to_le64(sect

Re: [PATCH v8] virtio_blk: add discard and write zeroes support

2018-10-26 Thread Christoph Hellwig
On Fri, Oct 26, 2018 at 01:28:54AM +0200, Paolo Bonzini wrote: > On 15/10/2018 11:27, Christoph Hellwig wrote: > > There is some issues in this spec. For one using the multiple ranges > > also for write zeroes is rather inefficient. Write zeroes really should > > use the same format as read and w

Re: [PATCH v8] virtio_blk: add discard and write zeroes support

2018-10-26 Thread Stefan Hajnoczi
On Fri, Oct 12, 2018 at 02:06:28PM -0700, Daniel Verkamp wrote: > + range[n].flags = cpu_to_le32(flags); > + range[n].num_sectors = cpu_to_le32(num_sectors); > + range[n].sector = cpu_to_le64(sector); ... > +/* Discard/write zeroes range for each request. */ > +s

Re: [PATCH v8] virtio_blk: add discard and write zeroes support

2018-10-25 Thread Paolo Bonzini
On 15/10/2018 11:27, Christoph Hellwig wrote: > There is some issues in this spec. For one using the multiple ranges > also for write zeroes is rather inefficient. Write zeroes really should > use the same format as read and write. What makes it inefficient? > Second the unmap flag isn't proper

RE: [PATCH v8] virtio_blk: add discard and write zeroes support

2018-10-15 Thread Liu, Changpeng
kernel.dk; > stefa...@redhat.com; Liu, Changpeng > Subject: Re: [PATCH v8] virtio_blk: add discard and write zeroes support > > On Mon, Oct 15, 2018 at 2:27 AM Christoph Hellwig wrote: > > On Fri, Oct 12, 2018 at 02:06:28PM -0700, Daniel Verkamp wrote: > > > From: Changpeng

RE: [PATCH v8] virtio_blk: add discard and write zeroes support

2018-10-15 Thread Liu, Changpeng
Stefan Hajnoczi ; Liu, > Changpeng > Subject: Re: [PATCH v8] virtio_blk: add discard and write zeroes support > > On Fri, Oct 12, 2018 at 02:06:28PM -0700, Daniel Verkamp wrote: > > From: Changpeng Liu > > > > In commit 88c85538, "virtio-blk: add discar

Re: [PATCH v8] virtio_blk: add discard and write zeroes support

2018-10-15 Thread Daniel Verkamp
On Mon, Oct 15, 2018 at 2:27 AM Christoph Hellwig wrote: > On Fri, Oct 12, 2018 at 02:06:28PM -0700, Daniel Verkamp wrote: > > From: Changpeng Liu > > > > In commit 88c85538, "virtio-blk: add discard and write zeroes features > > to specification" (https://github.com/oasis-tcs/virtio-spec), the v

Re: [PATCH v8] virtio_blk: add discard and write zeroes support

2018-10-15 Thread Christoph Hellwig
On Fri, Oct 12, 2018 at 02:06:28PM -0700, Daniel Verkamp wrote: > From: Changpeng Liu > > In commit 88c85538, "virtio-blk: add discard and write zeroes features > to specification" (https://github.com/oasis-tcs/virtio-spec), the virtio There is some issues in this spec. For one using the multip

Re: [PATCH v8] virtio_blk: add discard and write zeroes support

2018-10-14 Thread Michael S. Tsirkin
On Fri, Oct 12, 2018 at 02:06:28PM -0700, Daniel Verkamp wrote: > From: Changpeng Liu > > In commit 88c85538, "virtio-blk: add discard and write zeroes features > to specification" (https://github.com/oasis-tcs/virtio-spec), the virtio > block specification has been extended to add VIRTIO_BLK_T_D

[PATCH v8] virtio_blk: add discard and write zeroes support

2018-10-12 Thread Daniel Verkamp
From: Changpeng Liu In commit 88c85538, "virtio-blk: add discard and write zeroes features to specification" (https://github.com/oasis-tcs/virtio-spec), the virtio block specification has been extended to add VIRTIO_BLK_T_DISCARD and VIRTIO_BLK_T_WRITE_ZEROES commands. This patch enables support