From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NKDFF-0000HC-Ud for qemu-devel@nongnu.org; Mon, 14 Dec 2009 10:53:58 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NKDFB-0000Eq-BT for qemu-devel@nongnu.org; Mon, 14 Dec 2009 10:53:57 -0500 Received: from [199.232.76.173] (port=45937 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NKDFB-0000El-5k for qemu-devel@nongnu.org; Mon, 14 Dec 2009 10:53:53 -0500 Received: from moutng.kundenserver.de ([212.227.126.171]:58657) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NKDFA-0005zc-9p for qemu-devel@nongnu.org; Mon, 14 Dec 2009 10:53:52 -0500 Message-ID: <4B265F7D.1010109@mail.berlios.de> Date: Mon, 14 Dec 2009 16:53:33 +0100 From: Stefan Weil MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] A different way to ask for readonly drive References: <4B263F0B.90408@redhat.com> In-Reply-To: <4B263F0B.90408@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Naphtali Sprei Cc: qemu-devel@nongnu.org Naphtali Sprei schrieb: > Hi, > After feedback from Red Hat guys, I've decided to slightly modify the approach to drive's readonly. > The new approach also addresses the silent fall-back to open the drives' file as read-only when read-write fails > (permission denied) that causes unexpected behavior. > Instead of the 'readonly' boolean flag, another flag introduced (a replacement), 'read_write' with three values [on|off|try]: > read_write=on : open with read and write permission, no fall-back to read-only > read_write=off: open with read-only permission > read_write=try: open with read and write permission and if fails, fall-back to read-only (the default if nothing specified) > > Suggestions for better naming for flag/values welcomed. > > I've tried to explicitly pass the required flags for the bdrv_open function in callers, but probably missed some. > > Naphtali > > ... > Instead of on/off, I'd prefer the common shortcuts rw/ro. "try" is ok, but maybe "rw-ro" is better. So here are my suggestions: read_write=rw read_write=ro read_write=rw-ro or access=rw access=ro access=rw-ro Regards, Stefan