From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39691) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aBe8i-0004KJ-Cd for qemu-devel@nongnu.org; Wed, 23 Dec 2015 02:47:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aBe8f-0006ko-5t for qemu-devel@nongnu.org; Wed, 23 Dec 2015 02:47:16 -0500 Received: from mailhub.sw.ru ([195.214.232.25]:38019 helo=relay.sw.ru) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aBe8e-0006k7-H9 for qemu-devel@nongnu.org; Wed, 23 Dec 2015 02:47:12 -0500 From: "Denis V. Lunev" Date: Wed, 23 Dec 2015 10:46:51 +0300 Message-Id: <1450856816-9816-1-git-send-email-den@openvz.org> In-Reply-To: <567A4EB0.1040807@parallels.com> References: <567A4EB0.1040807@parallels.com> Subject: [Qemu-devel] [PATCH RFC 0/5] generic image locking and crash recovery List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Fam Zheng , qemu-devel@nongnu.org, Max Reitz , Olga Krishtal , "Denis V. Lunev" 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. Signed-off-by: Olga Krishtal Signed-off-by: Denis V. Lunev CC: Kevin Wolf CC: Max Reitz CC: Eric Blake CC: Fam Zheng Olga Krishtal (5): block: added lock image option and callback block: implemented bdrv_lock_image for raw file block: added check image option and callback bdrv_is_opened_unclean qcow2: implemented bdrv_is_opened_unclean block/paralels: added paralles implementation for bdrv_is_opened_unclean block.c | 73 +++++++++++++++++++++++++++++++++++++++++++++++ block/parallels.c | 7 ++++- block/qcow2.c | 11 ++++++- block/qcow2.h | 1 + block/raw-posix.c | 15 ++++++++++ block/raw-win32.c | 19 ++++++++++++ include/block/block.h | 2 ++ include/block/block_int.h | 2 ++ qapi/block-core.json | 9 ++++++ 9 files changed, 137 insertions(+), 2 deletions(-) -- 2.1.4