From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40975) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yddr5-00036x-8s for qemu-devel@nongnu.org; Thu, 02 Apr 2015 08:04:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yddr1-0002Bn-B5 for qemu-devel@nongnu.org; Thu, 02 Apr 2015 08:04:15 -0400 Message-ID: <551D3032.5080307@msgid.tls.msk.ru> Date: Thu, 02 Apr 2015 15:04:02 +0300 From: Michael Tokarev MIME-Version: 1.0 References: <55151DB7.3090200@msgid.tls.msk.ru> <55156DE0.4050209@redhat.com> <551578F4.9010400@msgid.tls.msk.ru> <55158F8B.9090607@redhat.com> <20150330153634.GC4305@noname.redhat.com> <551BB9DA.7030309@msgid.tls.msk.ru> <551BC040.9000806@msgid.tls.msk.ru> <20150401123417.GF3593@noname.str.redhat.com> <551D20EB.8060800@msgid.tls.msk.ru> <20150402112402.GG6541@noname.str.redhat.com> In-Reply-To: <20150402112402.GG6541@noname.str.redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] block-commit & dropping privs List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: jcody@redhat.com, qemu-devel , qemu-block@nongnu.org 02.04.2015 14:24, Kevin Wolf wrote: [] >> But overall, I think qemu-system should not modify backing >> file name in this case. > > So you would leave the backing file with the data that you just > committed down one level in your backing file chain? Wouldn't that > defeat the whole purpose of committing? Um. I don't think we understood each other. I experimented with the "non-live" HMP commit command. This one effectively empties everything in the overlay file, propagating it to the backing file, but keeps the (now empty) overlay. So from the stacking perspective nothing has changed. Yet, together with with propagation, it also modifies the overlay file headers and writes a new name of the backing file -- the one it currently uses, which, in my case, is virtual /dev/fdset/foo. It should keep the original file name in there, such as win.raw, unless explicitly asked to write a different name there. If the stack chain were to be modified by commit command, yes, the new name should be recorded ofcourse, such as after rebase. But since stack chain is not modified, filename should not be modified either. >> When performing commit, does qemu mark the areas in the >> overlay file as free after writing contents to the backing >> file, or will these areas be written again by a subsequent >> commit? Somehow it smells like each next commit writes >> more and more data and completes in more and more time. > > With qcow2 and qcow, the committed data is discarded with HMP 'commit'. > Other image formats keep the copy. Hm. It is discarded, but the file isn't shrinked. With "non-live" commit I don't see a reason why it can't be shrinked too? Thanks, /mjt