From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43454) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ejzPR-0005lz-Rt for qemu-devel@nongnu.org; Thu, 08 Feb 2018 22:31:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ejzPQ-0001oc-U7 for qemu-devel@nongnu.org; Thu, 08 Feb 2018 22:31:33 -0500 Date: Fri, 9 Feb 2018 11:31:23 +0800 From: Fam Zheng Message-ID: <20180209033123.GN24289@lemon.usersys.redhat.com> References: <20180130063433.11605-1-famz@redhat.com> <20180130063433.11605-3-famz@redhat.com> <20180130163820.GC4503@localhost.localdomain> <20180131141247.GC23336@stefanha-x1.localdomain> <20180131142249.GB3598@localhost.localdomain> <20180201114425.GD5783@stefanha-x1.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180201114425.GD5783@stefanha-x1.localdomain> Subject: Re: [Qemu-devel] [PATCH v6 2/2] qemu-img: Document --force-share / -U List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Kevin Wolf , Eric Blake , qemu-devel@nongnu.org, qemu-block@nongnu.org, kchamart@redhat.com, Max Reitz On Thu, 02/01 11:44, Stefan Hajnoczi wrote: > On Wed, Jan 31, 2018 at 03:22:49PM +0100, Kevin Wolf wrote: > > Am 31.01.2018 um 15:12 hat Stefan Hajnoczi geschrieben: > > > There should be a separate paragraph in docs/qemu-block-drivers.texi > > > explaining that share-rw=on can be used safely with format=raw if the > > > guests are configured to safely access a shared disk. It should also > > > mention that share-rw=on is unsafe for image formats. > > > > share-rw=on is a -device option and only about the guest, not about the > > backend. It is never unsafe if the guest can cope with external writers. > > It just doesn't prevent qemu from locking the image file for image > > formats. > > Thanks for the explanation. Documentation on share-rw=on|off would be > nice. > > Maybe something like: > > By default the guest has exclusive write access to its disk image. > This is enforced by QEMU via file locking. If the guest can safely > share the disk image with other writers the -device ...,share-rw=on > parameter can be used. This is only safe if the guest is running > software, such as a cluster file system, that coordinates disk > accesses to avoid corruption. > > Note that share-rw=on only declares the guest's ability to share the > disk. Some QEMU features, such as image file formats, require > exclusive write access to the disk image and this is unaffected by the > share-rw=on option. I will add these paragraphs to the "image locking" seciton in docs/qemu-block-drivers.texi. Fam