From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55680) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VMkcF-0006of-QX for qemu-devel@nongnu.org; Thu, 19 Sep 2013 16:14:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VMkcB-0001Td-EQ for qemu-devel@nongnu.org; Thu, 19 Sep 2013 16:14:19 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51470) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VMkcB-0001TL-5q for qemu-devel@nongnu.org; Thu, 19 Sep 2013 16:14:15 -0400 Message-ID: <523B5B10.3030505@redhat.com> Date: Thu, 19 Sep 2013 14:14:08 -0600 From: Eric Blake MIME-Version: 1.0 References: <1379425736-11326-1-git-send-email-pl@kamp.de> <1379425736-11326-11-git-send-email-pl@kamp.de> In-Reply-To: <1379425736-11326-11-git-send-email-pl@kamp.de> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Gfr8xe7nMqvSe5PlBKo14oANxtfP1Ir4J" Subject: Re: [Qemu-devel] [PATCHv2 10/20] iscsi: set limits in BlockDriverState List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Lieven Cc: kwolf@redhat.com, ronniesahlberg@gmail.com, stefanha@redhat.com, qemu-devel@nongnu.org, anthony@codemonkey.ws, pbonzini@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --Gfr8xe7nMqvSe5PlBKo14oANxtfP1Ir4J Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 09/17/2013 07:48 AM, Peter Lieven wrote: > Signed-off-by: Peter Lieven > --- > block/iscsi.c | 10 ++++++++++ > 1 file changed, 10 insertions(+) Reviewed-by: Eric Blake >=20 > diff --git a/block/iscsi.c b/block/iscsi.c > index aabcddb..21b1ecf 100644 > --- a/block/iscsi.c > +++ b/block/iscsi.c > @@ -1362,6 +1362,16 @@ static int iscsi_open(BlockDriverState *bs, QDic= t *options, int flags) > sizeof(struct scsi_inquiry_block_limits)); > scsi_free_scsi_task(task); > task =3D NULL; > + =20 > + if (iscsilun->bl.max_unmap < 0xffffffff) { > + bs->max_discard =3D sector_lun2qemu(iscsilun->bl.max_unmap= , iscsilun); > + } > + bs->discard_alignment =3D sector_lun2qemu(iscsilun->bl.opt_unm= ap_gran, iscsilun); > + =20 > + if (iscsilun->bl.max_ws_len < 0xffffffff) { > + bs->max_write_zeroes =3D sector_lun2qemu(iscsilun->bl.max_= ws_len, iscsilun); > + } > + bs->write_zeroes_alignment =3D sector_lun2qemu(iscsilun->bl.op= t_unmap_gran, iscsilun); > } > =20 > #if defined(LIBISCSI_FEATURE_NOP_COUNTER) >=20 --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --Gfr8xe7nMqvSe5PlBKo14oANxtfP1Ir4J Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.14 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJSO1sQAAoJEKeha0olJ0NqaCAH/0ljdPhDK0Ms2alfYcav9Yjx pg3wJ5kFQh6lfuaB2ZpDUeBSnTtdUFf1ndI83Mgo4mR6htt1/dMOdpEfzVnqxS3x tyI4jLlszBhZCQEtQhOuH17VvVSeNNwMMUBUYgh2A5T+lEwNj0LuPUmdtur3CUns kOf2wBwaU7lGGE93+6zfp3Mk+6CMti0jR0rhtEDcj8SmyS3UjpYxYQ/uSMOUcdPH AZW9A2bfQcJpUyzvQNySw+vFAyf+pWH0L1HmycagV4vK8pxz7NdiHbbspxlQ8yNj fDF0c7/9Ujaj73AUHk8IZDYKmeDZzKjBa9SUMedcbnEjfz7FZmzKF87MjfE+jRY= =rsx+ -----END PGP SIGNATURE----- --Gfr8xe7nMqvSe5PlBKo14oANxtfP1Ir4J--