From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LPERt-0007oQ-K3 for qemu-devel@nongnu.org; Tue, 20 Jan 2009 06:07:13 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LPERs-0007o0-QZ for qemu-devel@nongnu.org; Tue, 20 Jan 2009 06:07:13 -0500 Received: from [199.232.76.173] (port=47593 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LPERs-0007nq-Fr for qemu-devel@nongnu.org; Tue, 20 Jan 2009 06:07:12 -0500 Received: from mx2.redhat.com ([66.187.237.31]:37968) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LPERr-0000SA-Tl for qemu-devel@nongnu.org; Tue, 20 Jan 2009 06:07:12 -0500 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n0KB7BZR012693 for ; Tue, 20 Jan 2009 06:07:11 -0500 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n0KB7Bqs031416 for ; Tue, 20 Jan 2009 06:07:12 -0500 Received: from dhcp-1-237.tlv.redhat.com (dhcp-1-237.tlv.redhat.com [10.35.1.237]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n0KB7B8J002932 for ; Tue, 20 Jan 2009 06:07:11 -0500 Date: Tue, 20 Jan 2009 13:05:25 +0200 From: Gleb Natapov Subject: Re: [Qemu-devel] [PATCH v3] Stop VM on ENOSPC error. Message-ID: <20090120110525.GC27675@redhat.com> References: <20090118110509.GG11299@redhat.com> <18804.27240.886522.337700@mariner.uk.xensource.com> <4974A704.3070605@codemonkey.ws> <18804.46780.936806.748045@mariner.uk.xensource.com> <49759870.3050305@redhat.com> <20090120093540.GA27675@redhat.com> <4975AB29.40909@gmx.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4975AB29.40909@gmx.net> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org On Tue, Jan 20, 2009 at 11:44:57AM +0100, Carl-Daniel Hailfinger wrote: > On 20.01.2009 10:35, Gleb Natapov wrote: > > On Tue, Jan 20, 2009 at 10:25:04AM +0100, Gerd Hoffmann wrote: > > > >> Ian Jackson wrote: > >> > >>> Anthony Liguori writes ("Re: [Qemu-devel] [PATCH v3] Stop VM on ENOSPC error."): > >>> > >>>> Ian Jackson wrote: > >>>> > >>>>> Once again, this feature should be optional. > >>>>> > >>>> Why? > >>>> > >>> Well, three reasons, one general and theoretical, and two practical > >>> and rather Xen-specific. > >>> > >>> The theoretical reason is that a guest is in a better postion to deal > >>> with the situation because it knows its access patterns. Often the > >>> response to a failing write in a mission-critical system will be some > >>> kind a fallback behaviour, which is likely to work. Stopping the VM > >>> unconditionally is not something that the guest can cope with. > >>> > >> The fundamental issue is that you can't signal ENOSPC to the guest via > >> IDE protocol because that is an error condition which simply can't > >> happen on real hardware. You can only signal EIO, which is something > >> very different, and the OS likely goes into "Oops, disk broken" mode. > >> Which probably isn't what you want here ... > >> > >> > > Windows using IDE retries DMA 3 times and then moves to PIO mode. And it > > stays in PIO mode even after reboot. The only way to return to DMA mode > > again is to reinstall the driver. > > > > You can fix this in the registry without any reinstallation by setting > the bitmask of allowed IDE modes back to 0xffffffff. It's a single value > that needs to be changed. http://winhlp.com/node/10 has more info and a > script to reset the bitmask. Doesn't really matter how you re-enable DMA mode again, the fact is it needs admin attention. Reinstalling the driver also not so hard. One mouse click. > There's also an alternative for automatically resetting the mode after a > successful access: http://support.microsoft.com/kb/817472 > After 3 _consecutive_ errors IDE will still move to PIO mode and stay there till admin intervention. And with ENOSPC you can be sure you'll get 3 consecutive errors. -- Gleb.