Received: from eggs.gnu.org ([2001:4830:134:3::10]:50639) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y8WHh-0003Jy-V9 for qemu-devel@nongnu.org; Tue, 06 Jan 2015 10:43:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y8WHb-0002lj-1q for qemu-devel@nongnu.org; Tue, 06 Jan 2015 10:43:05 -0500 Received: from mail-we0-x233.google.com ([2a00:1450:400c:c03::233]:43984) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y8WHa-0002lU-Qv for qemu-devel@nongnu.org; Tue, 06 Jan 2015 10:42:58 -0500 Received: by mail-we0-f179.google.com with SMTP id q59so9862945wes.10 for ; Tue, 06 Jan 2015 07:42:58 -0800 (PST) Date: Tue, 6 Jan 2015 15:42:54 +0000 From: Stefan Hajnoczi Message-ID: <20150106154254.GB23051@stefanha-thinkpad.redhat.com> References: <1420457389-16332-1-git-send-email-pl@kamp.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="7ZAtKRhVyVSsbBD2" Content-Disposition: inline In-Reply-To: <1420457389-16332-1-git-send-email-pl@kamp.de> Subject: Re: [Qemu-devel] [PATCH] block: limited request size in write zeroes unsupported path List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Lieven Cc: kwolf@redhat.com, famz@redhat.com, qemu-devel@nongnu.org, mreitz@redhat.com, stefanha@redhat.com, den@openvz.org --7ZAtKRhVyVSsbBD2 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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. >=20 > Fix this by limiting the request by the minimum of the reported > maximum transfer size or 16MB (32768 sectors). >=20 > Reported-by: Denis V. Lunev > Signed-off-by: Peter Lieven > --- > block.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) Thanks, applied to my block tree: https://github.com/stefanha/qemu/commits/block Stefan --7ZAtKRhVyVSsbBD2 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJUrAJ+AAoJEJykq7OBq3PIaUIIALvwZQXPY6qoTG7ROpQuQ0o2 icnFHzSriLGsxY/0+O7nbyJqUNctZzGK9IIUgGmls/HYCn1oQMAwWpF8At/B5NVR 4vsLYtKaDhXRR2TawPAzNaRK4Q5/FX7Ws4U9lA33Dt+jxxOdxzUfZqBvPhb7+Iwc j8NvRC0k+hM8jJOcx7URBvqr3IU0UPNCSDNGiYb0s2fYWO4w9M7toc6jKj3eih+F L8++V8jz8x5bu4GuNTTu1VKWEcsoiyUdGxoetmGaudMq2HgUra0Hrj7NfNqmztNX cUyuBZWWNsAdkoLLpKC6hBGgdgtZQ5F1eiSqTXJrwh4RwzG7sI85cunmJApB9OI= =ofHg -----END PGP SIGNATURE----- --7ZAtKRhVyVSsbBD2--