From: Aurelien Jarno <aurelien@aurel32.net>
To: carsteno@de.ibm.com
Cc: "kvm-devel@lists.sourceforge.net"
<kvm-devel@lists.sourceforge.net>,
Linux-kernel@vger.kernel.org
Subject: Re: [kvm-devel] severe bug in 2.6.23+ kvm.git
Date: Fri, 19 Oct 2007 13:31:17 +0200 [thread overview]
Message-ID: <47189585.5010901@aurel32.net> (raw)
In-Reply-To: <47189371.7080104@de.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 1614 bytes --]
Carsten Otte a écrit :
> Hi list,
>
> we've experienced a severe bug in current kvm.git, that may have been
> introduced to the git tree quite recently around last weekend. 2.6.23
> is broken, 2.6.23-rc8 works for us. The symptom is, that our operon
> kvm test machine shredders its hard disk content to a state that is
> not correctably by the file system checker. We use raid1 md mirrored
> ext3 file systems on 4 sata hard disks on it, and we've verified
> correct operation of the hardware via badblocks and memtest86.
> The problem occurs even without kvm modules loaded, so the cause seems
> to be something that Avi pulled elsewhere. Did anyone else experience
> similar problems with the 2.6.23 based kvm tree? Does anyone have an
> idea about a possible cause, which would help us debugging it?
>
Could you please precise what is corrupted? The guest disk image?
If that's the case, I experienced the same problem since
kvm-userspace.git has been updated to the latest qemu CVS, and I can
reproduce it with plain QEMU. I am able to reproduce it easily by
booting FreeBSD.
The problem is actually in QEMU, it has been broken by this commit:
http://cvs.savannah.nongnu.org/viewvc/qemu/hw/ide.c?root=qemu&r1=1.64&r2=1.65
You can try to apply the attached patch, it reverts this commit and can
be applied to the latest QEMU CVS and to the latest KVM versions.
--
.''`. Aurelien Jarno | GPG: 1024D/F1BCDB73
: :' : Debian developer | Electrical Engineer
`. `' aurel32@debian.org | aurelien@aurel32.net
`- people.debian.org/~aurel32 | www.aurel32.net
[-- Attachment #2: qemu-ide-corruption.diff --]
[-- Type: text/x-patch, Size: 2586 bytes --]
Index: hw/ide.c
===================================================================
RCS file: /sources/qemu/qemu/hw/ide.c,v
retrieving revision 1.69
diff -u -r1.69 ide.c
--- hw/ide.c 17 Sep 2007 08:09:47 -0000 1.69
+++ hw/ide.c 10 Oct 2007 17:55:33 -0000
@@ -865,44 +865,10 @@
ide_set_irq(s);
}
-static void ide_sector_write_aio_cb(void *opaque, int ret)
-{
- BMDMAState *bm = opaque;
- IDEState *s = bm->ide_if;
-
-#ifdef TARGET_I386
- if (win2k_install_hack && ((++s->irq_count % 16) == 0)) {
- /* It seems there is a bug in the Windows 2000 installer HDD
- IDE driver which fills the disk with empty logs when the
- IDE write IRQ comes too early. This hack tries to correct
- that at the expense of slower write performances. Use this
- option _only_ to install Windows 2000. You must disable it
- for normal use. */
- qemu_mod_timer(s->sector_write_timer,
- qemu_get_clock(vm_clock) + (ticks_per_sec / 1000));
- } else
-#endif
- {
- ide_set_irq(s);
- }
- bm->aiocb = NULL;
-}
-
static void ide_sector_write(IDEState *s)
{
- BMDMAState *bm;
int64_t sector_num;
- int n, n1;
-
- s->io_buffer_index = 0;
- s->io_buffer_size = 0;
- bm = s->bmdma;
- if(bm == NULL) {
- bm = qemu_mallocz(sizeof(BMDMAState));
- s->bmdma = bm;
- }
- bm->ide_if = s;
- bm->dma_cb = ide_sector_write_aio_cb;
+ int ret, n, n1;
s->status = READY_STAT | SEEK_STAT;
sector_num = ide_get_sector(s);
@@ -912,6 +878,7 @@
n = s->nsector;
if (n > s->req_nb_sectors)
n = s->req_nb_sectors;
+ ret = bdrv_write(s->bs, sector_num, s->io_buffer, n);
s->nsector -= n;
if (s->nsector == 0) {
/* no more sectors to write */
@@ -924,8 +891,21 @@
}
ide_set_sector(s, sector_num + n);
- bm->aiocb = bdrv_aio_write(s->bs, sector_num, s->io_buffer, n,
- ide_sector_write_aio_cb, bm);
+#ifdef TARGET_I386
+ if (win2k_install_hack && ((++s->irq_count % 16) == 0)) {
+ /* It seems there is a bug in the Windows 2000 installer HDD
+ IDE driver which fills the disk with empty logs when the
+ IDE write IRQ comes too early. This hack tries to correct
+ that at the expense of slower write performances. Use this
+ option _only_ to install Windows 2000. You must disable it
+ for normal use. */
+ qemu_mod_timer(s->sector_write_timer,
+ qemu_get_clock(vm_clock) + (ticks_per_sec / 1000));
+ } else
+#endif
+ {
+ ide_set_irq(s);
+ }
}
/* XXX: handle errors */
next prev parent reply other threads:[~2007-10-19 11:31 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-19 11:22 severe bug in 2.6.23+ kvm.git Carsten Otte
2007-10-19 11:31 ` Aurelien Jarno [this message]
2007-10-19 11:37 ` [kvm-devel] " Carsten Otte
[not found] ` <47189706.1040809-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org>
2007-10-19 11:42 ` Laurent Vivier
[not found] ` <4718982D.4020500-6ktuUTfB/bM@public.gmane.org>
2007-10-19 11:49 ` Carsten Otte
[not found] ` <471899CA.8060206-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org>
2007-10-19 11:53 ` Laurent Vivier
[not found] ` <47189AD3.8010301-6ktuUTfB/bM@public.gmane.org>
2007-10-19 11:58 ` Christian Borntraeger
2007-10-19 11:57 ` Mike Lampard
[not found] ` <200710192127.17584.mike-pBbpZId3k0Zx3z9c7Zyw2w@public.gmane.org>
2007-10-19 12:21 ` Carsten Otte
[not found] ` <4718A14B.4060008-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org>
2007-10-19 13:44 ` Carsten Otte
[not found] ` <4718B4DB.1000202-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org>
2007-10-19 14:18 ` Jan Engelhardt
[not found] ` <Pine.LNX.4.64.0710191618450.1997-vVwEwcwQeYFPkBl3ERsXe1l1cybopEuJUBSOeVevoDU@public.gmane.org>
2007-10-19 14:48 ` Christian Borntraeger
2007-10-19 14:57 ` [kvm-devel] " Laurent Vivier
2007-10-19 15:23 ` Christian Borntraeger
[not found] ` <200710191723.48104.borntraeger-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org>
2007-10-19 15:43 ` Luca Tettamanti
2007-10-19 18:49 ` [kvm-devel] " Christian Borntraeger
[not found] ` <47189371.7080104-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org>
2007-10-19 11:55 ` Carsten Otte
2007-10-19 15:13 ` [kvm-devel] " Avi Kivity
[not found] ` <4718C9A1.3010703-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-10-22 10:57 ` Carsten Otte
2007-10-22 11:48 ` [kvm-devel] " Avi Kivity
[not found] ` <471C8E28.9020707-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-10-22 13:14 ` Carsten Otte
2007-10-22 14:00 ` Carsten Otte
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=47189585.5010901@aurel32.net \
--to=aurelien@aurel32.net \
--cc=Linux-kernel@vger.kernel.org \
--cc=carsteno@de.ibm.com \
--cc=kvm-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox