From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50648) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b0PtJ-00035k-Bo for qemu-devel@nongnu.org; Wed, 11 May 2016 04:53:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b0PtG-0002hJ-UP for qemu-devel@nongnu.org; Wed, 11 May 2016 04:53:12 -0400 Date: Wed, 11 May 2016 09:52:58 +0100 From: "Daniel P. Berrange" Message-ID: <20160511085258.GC20333@redhat.com> Reply-To: "Daniel P. Berrange" References: <20160510093514.GH4921@noname.str.redhat.com> <20160510094310.GH13377@redhat.com> <20160510100706.GJ4921@noname.str.redhat.com> <20160510101612.GY1683@redhat.com> <20160510110849.GK4921@noname.str.redhat.com> <20160510114615.GZ1683@redhat.com> <20160510120102.GM4921@noname.str.redhat.com> <20160510121130.GA1683@redhat.com> <20160510122209.GJ13377@redhat.com> <87mvnxhvgj.fsf@dusky.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <87mvnxhvgj.fsf@dusky.pond.sub.org> Subject: Re: [Qemu-devel] [PATCH v4 00/27] block: Lock images when opening List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: "Richard W.M. Jones" , Kevin Wolf , Fam Zheng , qemu-block@nongnu.org, Jeff Cody , qemu-devel@nongnu.org, stefanha@redhat.com, den@openvz.org, pbonzini@redhat.com, Max Reitz , John Snow On Wed, May 11, 2016 at 10:04:12AM +0200, Markus Armbruster wrote: > "Daniel P. Berrange" writes: > > > On Tue, May 10, 2016 at 01:11:30PM +0100, Richard W.M. Jones wrote: > >> At no point did I say that it was safe to use libguestfs on live VMs > >> or that you would always get consistent data out. > >> > >> But the fact that it can fail is understood, the chance of failure is > >> really tiny (it has literally only happened twice that I've read > >> corrupted data, in years of daily use), and the operation is very > >> useful. > >> > >> So I think this patch series should either not lock r/o VMs, or should > >> add a nolock flag to override the locking (which libguestfs will > >> always use). > > > > If QEMU locks r/o disks, then libvirt would likely end up setting the > > "nolock" flag unconditionally too, in order to avoid breaking libguestfs > > and other application usage of libvirt. > > Could a QEMU + libvirt together provide both safe and unsafe read-only > access? Safe means you get consistent data. Unsafe means you're taking > your chances. > > Libguestfs could then use unsafe if the user asks for it. Or even by > default; that's really libguesfs's business. > > Backward compatibility may complicate things, but getting into a > reasonable state is sometimes worth a lengthy and somewhat messy > transition. We would have to use 'nolock' by default, and provide apps an opt-in config flag to request locking of r/o images if they wanted it. Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|