From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MyN2Z-0003nY-9n for qemu-devel@nongnu.org; Thu, 15 Oct 2009 05:54:35 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MyN2U-0003hK-Go for qemu-devel@nongnu.org; Thu, 15 Oct 2009 05:54:34 -0400 Received: from [199.232.76.173] (port=35883 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MyN2U-0003hB-34 for qemu-devel@nongnu.org; Thu, 15 Oct 2009 05:54:30 -0400 Received: from mx1.redhat.com ([209.132.183.28]:6178) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MyN2T-0006cq-IP for qemu-devel@nongnu.org; Thu, 15 Oct 2009 05:54:29 -0400 Received: from int-mx05.intmail.prod.int.phx2.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.18]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n9F9sSoB021360 for ; Thu, 15 Oct 2009 05:54:28 -0400 Date: Thu, 15 Oct 2009 11:54:26 +0200 From: Gleb Natapov Subject: Re: [Qemu-devel] [PATCH] Pass the drive's readonly attribute to the guest OS Message-ID: <20091015095426.GF30889@redhat.com> References: <4AD5F3BD.2040402@redhat.com> <4AD5FEF2.2000308@redhat.com> <4AD6ED3B.1030902@redhat.com> <20091015094331.GE30889@redhat.com> <4AD6F06F.7060209@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4AD6F06F.7060209@redhat.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: Naphtali Sprei , qemu-devel@nongnu.org On Thu, Oct 15, 2009 at 11:50:39AM +0200, Kevin Wolf wrote: > Am 15.10.2009 11:43, schrieb Gleb Natapov: > > On Thu, Oct 15, 2009 at 11:36:59AM +0200, Kevin Wolf wrote: > >> Am 14.10.2009 18:40, schrieb Naphtali Sprei: > >>> Naphtali Sprei wrote: > >>> > >>>> I'm planning to investigate where qemu should check the read only attribute before exeuting any write command > >>>> to drives, would be sent in a different patch. > >>> > >>> revisiting it, if guest OS knows it's a read only device and tries to modify it, anyhow, we don't really care about error reporting, > >>> as long as qemu doesn't crash (or modify the drive). > >> > >> If the right response to a write on a read-only device is defined in the > >> specification (and it most probably is), we should still give the right > >> response, even though the OS is doing something wrong. > >> > > And since our response to write error may be pausing a VM we shouldn't > > allow this to be triggered by a guest OS. > > I thought we only pause the VM if we get an host IO error? But if you do > want to stop it for all errors, you shouldn't start suppressing errors > so that it doesn't stop. > We pause only on host IO errors, but if we open underlying file as read only (do we?) and try to write into it we will get an IO error in the host. -- Gleb.