From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MGcBI-0002LU-Bs for qemu-devel@nongnu.org; Tue, 16 Jun 2009 13:10:44 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MGcBF-0002Kg-0Q for qemu-devel@nongnu.org; Tue, 16 Jun 2009 13:10:44 -0400 Received: from [199.232.76.173] (port=41402 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MGcBE-0002Kd-Qn for qemu-devel@nongnu.org; Tue, 16 Jun 2009 13:10:40 -0400 Received: from smtp.citrix.com ([66.165.176.89]:48472) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MGcBE-0002qg-Cz for qemu-devel@nongnu.org; Tue, 16 Jun 2009 13:10:40 -0400 Message-ID: <4A37D30D.40003@eu.citrix.com> Date: Tue, 16 Jun 2009 18:14:53 +0100 From: Stefano Stabellini 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> <4A37C82B.5030805@codemonkey.ws> In-Reply-To: <4A37C82B.5030805@codemonkey.ws> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Christoph Hellwig , qemu-devel , Avi Kivity Anthony Liguori wrote: > 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. > Well, it could Just Work for cdrom.