From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56930) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aBevC-0000LY-VL for qemu-devel@nongnu.org; Wed, 23 Dec 2015 03:37:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aBev5-0004eK-48 for qemu-devel@nongnu.org; Wed, 23 Dec 2015 03:37:22 -0500 Received: from relay.parallels.com ([195.214.232.42]:36179) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aBev4-0004Vz-SC for qemu-devel@nongnu.org; Wed, 23 Dec 2015 03:37:15 -0500 References: <567A4EB0.1040807@parallels.com> <1450856816-9816-1-git-send-email-den@openvz.org> <20151223080914.GI14423@ad.usersys.redhat.com> From: "Denis V. Lunev" Message-ID: <567A5D24.7000208@openvz.org> Date: Wed, 23 Dec 2015 11:36:52 +0300 MIME-Version: 1.0 In-Reply-To: <20151223080914.GI14423@ad.usersys.redhat.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH RFC 0/5] generic image locking and crash recovery List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng Cc: Kevin Wolf , Olga Krishtal , qemu-devel@nongnu.org, Max Reitz On 12/23/2015 11:09 AM, Fam Zheng wrote: > On Wed, 12/23 10:46, Denis V. Lunev wrote: >> This series of patches is aimed to prevent usage of image >> file by different qemu instances. In case we are the first >> instance, and option lock is lockfile, - we lock the image file, >> and if check option is on, we check the file and fix it if >> nessecary. If one of this two ops fails - the image is closed >> with the error. >> >> Patchset is not polished at all! Sent for a discussion as an alternative >> approach. > I like this approach. The first two patches match what I was thinking of. > > Patch 5 is okay, the unclean flag reflects HEADER_INUSE_MAGIC in parallels > header; unfortunately patch 4 is wrong because qcow2 lacks a counterpart flag > in the format, and the patch only modified an in memory variable. we have to > add this as a compatible_features bit in order to support this operation. yep :) this could be done, no problem. > Didn't review very closely because at least one patch doesn't seem to compile. > :) > > Fam > which compile error do you have? I have double checked that it is compiled OK on commit 5dc42c186d63b7b338594fc071cf290805dcc5a5 Merge: c595b21 7236975 Author: Peter Maydell Date: Tue Dec 22 14:21:42 2015 +0000 Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging # gpg: Signature made Tue 22 Dec 2015 08:52:55 GMT using RSA key ID 81AB73C8 # gpg: Good signature from "Stefan Hajnoczi " # gpg: aka "Stefan Hajnoczi " * remotes/stefanha/tags/block-pull-request: sdhci: add optional quirk property to disable card insertion/removal interrupts sdhci: don't raise a command index error for an unexpected response sd: sdhci: Delete over-zealous power check scripts/gdb: Fix a python exception in mtree.py parallels: add format spec block/mirror: replace IOV_MAX with blk_get_max_iov() block: replace IOV_MAX with BlockLimits.max_iov block-backend: add blk_get_max_iov() block: add BlockLimits.max_iov field virtio-blk: trivial code optimization Signed-off-by: Peter Maydell Den