From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MGbWj-00034T-5R for qemu-devel@nongnu.org; Tue, 16 Jun 2009 12:28:49 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MGbWd-00032S-Tr for qemu-devel@nongnu.org; Tue, 16 Jun 2009 12:28:48 -0400 Received: from [199.232.76.173] (port=45284 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MGbWd-00032P-Nx for qemu-devel@nongnu.org; Tue, 16 Jun 2009 12:28:43 -0400 Received: from mail-qy0-f191.google.com ([209.85.221.191]:44870) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MGbWd-0001ti-Dq for qemu-devel@nongnu.org; Tue, 16 Jun 2009 12:28:43 -0400 Received: by qyk29 with SMTP id 29so5640697qyk.4 for ; Tue, 16 Jun 2009 09:28:42 -0700 (PDT) Message-ID: <4A37C82B.5030805@codemonkey.ws> Date: Tue, 16 Jun 2009 11:28:27 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] Regression opening read-only cdroms References: <4A37896C.8050208@redhat.com> <20090616143259.GA29040@shareable.org> <4A37B23F.6040604@eu.citrix.com> <20090616145421.GD29040@shareable.org> In-Reply-To: <20090616145421.GD29040@shareable.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jamie Lokier Cc: Avi Kivity , Christoph Hellwig , qemu-devel , Stefano Stabellini Jamie Lokier wrote: >> Indeed. >> I have a patch that adds bdrv_set_read_only that set bs->read_only = 1 >> so that bdrv_open2 can check if the flag is set and act accordingly. >> The problem is that in xen we read whether the device should be opened >> read only in the VM config file, I don't think the user can specify to >> open a drive read-only in qemu. >> > > What's missing is a "ro" sub-option to "-drive". > It only is useful if we can expose that read-only attribute to the guest. You can't do that consistently with all block devices so the result would be that you'll fail write operations causing a guest to crash. This is not friendly to a user who expects that ro would Just Work. Regards, Anthony Liguori > -- Jamie > > >