From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KOy52-0003hj-T4 for qemu-devel@nongnu.org; Fri, 01 Aug 2008 13:06:16 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KOy51-0003eZ-4z for qemu-devel@nongnu.org; Fri, 01 Aug 2008 13:06:16 -0400 Received: from [199.232.76.173] (port=54525 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KOy50-0003e0-Mb for qemu-devel@nongnu.org; Fri, 01 Aug 2008 13:06:14 -0400 Received: from mail2.shareable.org ([80.68.89.115]:54452) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KOy50-0000xZ-Ei for qemu-devel@nongnu.org; Fri, 01 Aug 2008 13:06:14 -0400 Date: Fri, 1 Aug 2008 18:06:10 +0100 From: Jamie Lokier Subject: Re: [Qemu-devel] PATCH: v3 Allow control over drive file open mode Message-ID: <20080801170610.GA25063@shareable.org> References: <20080801102949.GN23993@redhat.com> <48932751.5040303@codemonkey.ws> <20080801161529.GA4966@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080801161529.GA4966@redhat.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" , qemu-devel@nongnu.org Daniel P. Berrange wrote: > On Fri, Aug 01, 2008 at 10:10:09AM -0500, Anthony Liguori wrote: > > Daniel P. Berrange wrote: > > >This is version 3 of the patch. > > > > > > > Allowing the user to specify what mode we use to open a file is IMHO not > > a good interface for a user. A user should only be concerned with how > > we expose a disk to the guest, not the underlying implementation of how > > we support this. It has subtle side-effects that a user is not going to > > expect unless they are intimately familiar with how QEMU is implemented > > (like snapshotting breaking). > > So if I'm understanding you correctly, you'd be OK with a mode=ro, which > would make the emulated drive itself read-only - independant of what > open() flags we use for opening the file on the host ? > > So my next question would be, what IDE / SCSI / USB drives have a > concept of 'read only' ? A CDROM clearly is clearly readonly, and > floppy disks probably be to but can you mark general disks as read > only ? Many USB drives do have a little switch. USB drives use the SCSI protocol, so SCSI is sort of covered. They aren't as common but there are read-only IDE interfaces out there, for phorensic disk reading. -- Jamie