From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:36867) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RamQb-0004Iw-It for qemu-devel@nongnu.org; Wed, 14 Dec 2011 05:51:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RamQN-0002L9-2G for qemu-devel@nongnu.org; Wed, 14 Dec 2011 05:51:13 -0500 Received: from mail-gy0-f173.google.com ([209.85.160.173]:33666) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RamQM-0002KB-NV for qemu-devel@nongnu.org; Wed, 14 Dec 2011 05:50:58 -0500 Received: by ghbg19 with SMTP id g19so599056ghb.4 for ; Wed, 14 Dec 2011 02:50:58 -0800 (PST) MIME-Version: 1.0 In-Reply-To: References: <1323784351-25531-1-git-send-email-stefanha@linux.vnet.ibm.com> Date: Wed, 14 Dec 2011 10:50:57 +0000 Message-ID: From: Stefan Hajnoczi Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v3 0/9] block: generic image streaming List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Yibin Shen Cc: Kevin Wolf , Luiz Capitulino , Marcelo Tosatti , qemu-devel@nongnu.org, Stefan Hajnoczi On Wed, Dec 14, 2011 at 1:42 AM, Yibin Shen wrote: > On Tue, Dec 13, 2011 at 11:18 PM, Stefan Hajnoczi wr= ote: >> On Tue, Dec 13, 2011 at 2:12 PM, Yibin Shen wrote: >>> all these patches looks good to me except one thing, >>> when I run a "qemu-img commit" command, >>> seems entire image(from start to end sector) will be write to the backi= ng file, >>> I think what we really need is to commit only dirty sectors. >>> also maybe we can use a writeback mechanism alternaively. >> >> This series does not affect the behavior of "qemu-img commit". >> >> Are you suggesting a new feature? =A0Please explain a little more. > yes , I suggest a new feature, > > in some situation, we need to commit data in qed image to backing file. > in old days ,people without copy-on-read, they only have copy-on-write, > so 'qemu-img commit' commit all exsits data to backing file is rational. > > but with copy-on-read or image streaming, > which means most data in the image may be identical with backing file, > so commit entire image is a redundant operation. > > can we record the dirty bitmap for data differ from backing file, > then in a commit operation, we only need to handle minimum data. This operation is needed as a dual to the blockdev-snapshot-sync QMP command. It merges changes back into the base image while the VM is running (it's basically an online version of qemu-img commit and only copies changed data). I agree that it's a useful operation and perhaps someone will work on it in the future. Stefan