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. > > 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. > > 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. > > Signed-off-by: John Snow <js...@redhat.com> > --- > 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.
pgp25RIQA1OUo.pgp
Description: PGP signature