From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49459) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XHZsF-0006It-N7 for qemu-devel@nongnu.org; Wed, 13 Aug 2014 10:50:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XHZs8-0000Fh-RI for qemu-devel@nongnu.org; Wed, 13 Aug 2014 10:49:59 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46245) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XHZs8-0000FQ-3P for qemu-devel@nongnu.org; Wed, 13 Aug 2014 10:49:52 -0400 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s7DEnpgE013057 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 13 Aug 2014 10:49:51 -0400 Date: Wed, 13 Aug 2014 15:49:49 +0100 From: Stefan Hajnoczi Message-ID: <20140813144949.GC27053@stefanha-thinkpad.redhat.com> References: <1407869049-29178-1-git-send-email-jsnow@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="xo44VMWPx7vlQ2+2" Content-Disposition: inline In-Reply-To: <1407869049-29178-1-git-send-email-jsnow@redhat.com> Subject: Re: [Qemu-devel] [PATCH] ide: Add resize callback to ide/core List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: John Snow Cc: kwolf@redhat.com, qemu-devel@nongnu.org --xo44VMWPx7vlQ2+2 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Aug 12, 2014 at 02:44:09PM -0400, John Snow wrote: > Currently, if the block device backing the IDE drive is resized, > the information about the device as cached inside of the IDEState > structure is not updated, thus when a guest OS re-queries the drive, > it is unable to see the expanded size. >=20 > This patch adds a resize callback to correct this, and marks the > identify buffer cache as being dirty to force ide_identify to > regenerate this information. This callback also attempts to update > the legacy CHS values, if only to maintain a sense of > informational consistency. >=20 > Lastly, a Linux guest as-is cannot resize a libata drive while in-use, > but it can see the expanded size as part of a bus rescan event. > This patch also allows guests such as Linux to see the new drive size > after a soft reboot event, without having to exit the QEMU process. >=20 > Signed-off-by: John Snow > --- > hw/ide/core.c | 29 +++++++++++++++++++++++++++++ > 1 file changed, 29 insertions(+) Dropped due to comments from Markus Armbruster. I'll wait until the discussion is finished before merging it. --xo44VMWPx7vlQ2+2 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJT63sNAAoJEJykq7OBq3PINUUIAInhmZuvntr7FAoFoJIyzW2J au4jHEGKoM9+Ox7MmfUr2Fi4/X/UdnwfKOW6V1vPKYf9dhoujjVDuG7hhNjMhICH HGinQLykOmPg7oad2wpDjmQPXsU3XY4XwsWDDv3HYNgM2QlgHmL9XvTcYSLSCkaW z67qn9xrhlx5Pi+zJPumm+uw/uE2Hlr13RbDeHZTFUfNInM2Trs5L9OabpSDCJRH UeONOTGP/7GXz+inDKvd5P4hHJXQthC8wMkIfke6mBfkNeMfMR4hVoqFF5/B3Nvc Ob2QsGd0ddj5vJ4Da1MNT4gegnaFr2SZX/TyF5bGMOMTfKM52X9K7sp7kvuamUs= =y2Tu -----END PGP SIGNATURE----- --xo44VMWPx7vlQ2+2--