From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58284) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W2nyM-0002wz-5i for qemu-devel@nongnu.org; Mon, 13 Jan 2014 15:19:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W2nyF-00039h-Er for qemu-devel@nongnu.org; Mon, 13 Jan 2014 15:18:58 -0500 Received: from mx1.redhat.com ([209.132.183.28]:37488) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W2nyF-000397-6N for qemu-devel@nongnu.org; Mon, 13 Jan 2014 15:18:51 -0500 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s0DKIm6I019544 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 13 Jan 2014 15:18:49 -0500 From: Jeff Cody Date: Mon, 13 Jan 2014 15:18:44 -0500 Message-Id: Subject: [Qemu-devel] [PATCH 0/2] block: commits of snapshots larger than backing files List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, famz@redhat.com, stefanha@redhat.com If a snapshot is larger than a backing file, then the offline bdrv_commit and the live active layer commit will fail with an i/o error (usually). A live commit of a non-active layer will complete successfully, as it runs bdrv_truncate() on the backing image to resize it to the larger size. For both bdrv_commit() and commit_active_start(), this series will resize the underlying base image if needed. If the resize fails, an error will be returned. Jeff Cody (2): block: resize backing file image during offline commit, if necessary block: resize backing image during active layer commit, if needed block.c | 18 +++++++++++++++--- block/mirror.c | 13 +++++++++++++ 2 files changed, 28 insertions(+), 3 deletions(-) -- 1.8.3.1