From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IPlNl-00018E-Np for qemu-devel@nongnu.org; Mon, 27 Aug 2007 16:40:21 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IPlNk-00017L-C2 for qemu-devel@nongnu.org; Mon, 27 Aug 2007 16:40:20 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IPlNk-00017B-86 for qemu-devel@nongnu.org; Mon, 27 Aug 2007 16:40:20 -0400 Received: from il.qumranet.com ([82.166.9.18]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IPlNj-0005qN-Qr for qemu-devel@nongnu.org; Mon, 27 Aug 2007 16:40:20 -0400 Message-ID: <46D3361C.7010909@qumranet.com> Date: Mon, 27 Aug 2007 23:37:48 +0300 From: Avi Kivity MIME-Version: 1.0 Subject: Re: [Qemu-devel] Re: [et-mgmt-tools] Image Corruption Possible with qemu and qemu-kvm References: <46D2EC13.8020005@bppiac.hu> <1188232650.25884.100.camel@localhost.localdomain> <20070827202748.GK9043@redhat.com> In-Reply-To: <20070827202748.GK9043@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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 Cc: Fedora/Linux Management Tools Daniel P. Berrange wrote: > On Mon, Aug 27, 2007 at 10:19:42PM +0200, Sven Oehme wrote: > >> i thought it might be good to post this on qemu-devel as well, as i see >> this as a general qemu / kvm / xen /whatevercomesnext issue . >> >> are there any plans to implement a default in qemu to prevent accessing >> the same image multiple times ? >> > > Each QEMU instance is unware of each other so can't directly check this. One > possiblity would be for QEMU to use fcntl() to take a lock on a disk image > when opening it. With raw disk images at least, it is, however, safe to let > multiple QEMU instances use it at once *provided* you have a clustered > filesystem installed, rather than regular FAT or ext2/3, so one wouldn't want > to exclude this use case. > Yes, taking an advisory lock is a good idea, provided there is an option to override it. I've killed a few images myself... -- Any sufficiently difficult bug is indistinguishable from a feature.