From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42187) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XHZNu-0004Bk-PS for qemu-devel@nongnu.org; Wed, 13 Aug 2014 10:18:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XHZNp-0005te-UQ for qemu-devel@nongnu.org; Wed, 13 Aug 2014 10:18:38 -0400 Received: from mx1.redhat.com ([209.132.183.28]:64799) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XHZNp-0005ta-Mi for qemu-devel@nongnu.org; Wed, 13 Aug 2014 10:18:33 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s7DEIXMB026849 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 13 Aug 2014 10:18:33 -0400 Date: Wed, 13 Aug 2014 15:18:31 +0100 From: Stefan Hajnoczi Message-ID: <20140813141831.GC4750@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="7qSK/uQB79J36Y4o" 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 --7qSK/uQB79J36Y4o 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(+) Thanks, applied to my block tree: https://github.com/stefanha/qemu/commits/block Stefan --7qSK/uQB79J36Y4o Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJT63O3AAoJEJykq7OBq3PIH9cIAJMxWE9LvssQEsFLn1BwCQrt iFOdfsoCXbR99evMOYyN1KgSx3Kh3rWw2Zblhw2D+4XHx47q8AvMDWvJshlk6s4z hIN7hJPO5iNqH0H2xQ+ZMfqUC3BnUsjPS6Rex7b0SA7Fw2r6RbrAzHI2TZPHU81B LciBOyEhL6dKVzKOoLK6umUaNvjChN/hrOwPKbEJsoKUFXIaNbrFeMVJjdNzxqoW 9x1+e0qe0t8ggHnaIGKiQiM+QIbcXHkZJa+XsxoyQnWWAx+HLYJRbBTQl55q3Fb7 86TFDdEX5Ik3lQAZLO3QLJkd5FstoqWg4/XF/CkpaRjJ803jhETPfBIBREHyaAk= =+tgz -----END PGP SIGNATURE----- --7qSK/uQB79J36Y4o--