Re: [Qemu-devel] [PATCH] block: limited request size in write zeroes unsupported path

2015-01-06 Thread Denis V. Lunev
On 06/01/15 18:43, Stefan Hajnoczi wrote: On Mon, Jan 05, 2015 at 03:34:07PM +0300, Denis V. Lunev wrote: Though pls consider my patch v3, it avoids allocation of 16 Mb here and uses only 1 Mb of memory. Once your patch has Reviewed-by: it will show up on my radar for merge. If you and Peter

Re: [Qemu-devel] [PATCH] block: limited request size in write zeroes unsupported path

2015-01-06 Thread Stefan Hajnoczi
On Mon, Jan 05, 2015 at 03:34:07PM +0300, Denis V. Lunev wrote: > Though pls consider my patch v3, it avoids allocation of 16 Mb here and > uses only 1 Mb of memory. Once your patch has Reviewed-by: it will show up on my radar for merge. If you and Peter need a 2nd opinion in your discussions abo

Re: [Qemu-devel] [PATCH] block: limited request size in write zeroes unsupported path

2015-01-06 Thread Stefan Hajnoczi
On Mon, Jan 05, 2015 at 12:29:49PM +0100, Peter Lieven wrote: > If bs->bl.max_write_zeroes is large and we end up in the unsupported > path we might allocate a lot of memory for the iovector and/or even > generate an oversized requests. > > Fix this by limiting the request by the minimum of the re

Re: [Qemu-devel] [PATCH] block: limited request size in write zeroes unsupported path

2015-01-05 Thread Denis V. Lunev
On 05/01/15 14:29, Peter Lieven wrote: If bs->bl.max_write_zeroes is large and we end up in the unsupported path we might allocate a lot of memory for the iovector and/or even generate an oversized requests. Fix this by limiting the request by the minimum of the reported maximum transfer size or

Re: [Qemu-devel] [PATCH] block: limited request size in write zeroes unsupported path

2015-01-05 Thread Denis V. Lunev
On 05/01/15 15:14, Peter Lieven wrote: On 05.01.2015 12:51, Denis V. Lunev wrote: On 05/01/15 14:29, Peter Lieven wrote: If bs->bl.max_write_zeroes is large and we end up in the unsupported path we might allocate a lot of memory for the iovector and/or even generate an oversized requests. Fix

Re: [Qemu-devel] [PATCH] block: limited request size in write zeroes unsupported path

2015-01-05 Thread Peter Lieven
On 05.01.2015 12:51, Denis V. Lunev wrote: On 05/01/15 14:29, Peter Lieven wrote: If bs->bl.max_write_zeroes is large and we end up in the unsupported path we might allocate a lot of memory for the iovector and/or even generate an oversized requests. Fix this by limiting the request by the mini

Re: [Qemu-devel] [PATCH] block: limited request size in write zeroes unsupported path

2015-01-05 Thread Denis V. Lunev
On 05/01/15 14:29, Peter Lieven wrote: If bs->bl.max_write_zeroes is large and we end up in the unsupported path we might allocate a lot of memory for the iovector and/or even generate an oversized requests. Fix this by limiting the request by the minimum of the reported maximum transfer size or

[Qemu-devel] [PATCH] block: limited request size in write zeroes unsupported path

2015-01-05 Thread Peter Lieven
If bs->bl.max_write_zeroes is large and we end up in the unsupported path we might allocate a lot of memory for the iovector and/or even generate an oversized requests. Fix this by limiting the request by the minimum of the reported maximum transfer size or 16MB (32768 sectors). Reported-by: Deni