Red Hat Bugzilla – Bug 994374
boot up guest failed, hung in "booting from hard disk"
Last modified: 2015-03-16 05:11:57 EDT
I'm proposing diff --git a/blockdev.c b/blockdev.c index e4db09f..e99af4a 100644 --- a/blockdev.c +++ b/blockdev.c @@ -347,7 +347,7 @@ DriveInfo *drive_init(QemuOpts *opts, int default_to_scsi) const char *devaddr; DriveInfo *dinfo; int is_extboot = 0; - BlockIOLimit io_limits; + BlockIOLimit io_limits = { 0 }; int snapshot = 0; bool copy_on_read;
cc1: warnings being treated as errors /builddir/build/BUILD/qemu-kvm-0.12.1.2/blockdev.c: In function 'drive_init': /builddir/build/BUILD/qemu-kvm-0.12.1.2/blockdev.c:350: error: missing braces around initializer /builddir/build/BUILD/qemu-kvm-0.12.1.2/blockdev.c:350: error: (near initialization for 'io_limits.bps') I don't know how much more RETARDED our build configuration can get. x = { 0 } is a PERFECTLY VALID AND UNIVERSAL initializer, for EVERYTHING.
Laszlo, I think this is as simple to have: diff --git a/blockdev.c b/blockdev.c index a4c6c37..3af695f 100644 --- a/blockdev.c +++ b/blockdev.c @@ -618,8 +618,10 @@ DriveInfo *drive_init(QemuOpts *opts, int default_to_scsi) bdrv_set_on_error(dinfo->bdrv, on_read_error, on_write_error); +#if CONFIG_BLOCK_IO_THROTTLING /* disk I/O throttling */ bdrv_set_io_limits(dinfo->bdrv, &io_limits); +#endif switch(type) { case IF_IDE:
Are you sure the BlockDriverState fields "io_limits" and "io_limits_enabled" will default to the same values as bdrv_set_io_limits() would set, for an all-zero io_limits? The RHEV code would be better matched by --- a/blockdev.c +++ b/blockdev.c @@ -506,6 +506,8 @@ DriveInfo *drive_init(QemuOpts *opts, int default_to_scsi) "cannot be used at the same time"); return NULL; } +#else + memset(&io_limits, '\0', sizeof io_limits); #endif on_write_error = BLOCK_ERR_STOP_ENOSPC; In any case, please feel free to take the bug (if we get confirmation that the bug is caused by RHEL-6 commit 6b1eb15c, anyway). I just wanted to give QE a quick Brew build so they can confirm.
(In reply to Laszlo Ersek from comment #7) > Are you sure the BlockDriverState fields "io_limits" and "io_limits_enabled" > will default to the same values as bdrv_set_io_limits() would set, for an > all-zero io_limits? > > The RHEV code would be better matched by > > --- a/blockdev.c > +++ b/blockdev.c > @@ -506,6 +506,8 @@ DriveInfo *drive_init(QemuOpts *opts, int > default_to_scsi) > "cannot be used at the same time"); > return NULL; > } > +#else > + memset(&io_limits, '\0', sizeof io_limits); > #endif > > on_write_error = BLOCK_ERR_STOP_ENOSPC; > > In any case, please feel free to take the bug (if we get confirmation that > the bug is caused by RHEL-6 commit 6b1eb15c, anyway). I just wanted to give > QE a quick Brew build so they can confirm. OK, thanks. I'm taking it. mazhang, would you please test Laszlo's above build? If it works, I can post the patch to rhvirt-patches.
OK,I'll test it asap
Just do a quick test with comment 8 provide build, all interface of virtio-blk virtio-scsi ide works well, boot up guest successfully.
(In reply to mazhang from comment #11) > Just do a quick test with comment 8 provide build, all interface of > virtio-blk virtio-scsi ide works well, boot up guest successfully. Good, thanks for quick response.
1.Reproduce this bug on qemu-kvm-0.12.1.2-2.384.el6.x86_64. steps please refer comment #c0. Actual results: guest hung in "Booting from Hard Disk... " Expected results: boot up guest 2.Verify this bug on qemu-kvm-0.12.1.2-2.394.el6.x86_64. steps please refer comment #c0. Actual results: boot guest successfully, all kinds of disk interface works well.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHSA-2013-1553.html