From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40593) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a442S-00062M-7k for qemu-devel@nongnu.org; Wed, 02 Dec 2015 04:49:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a442N-0003Vy-9S for qemu-devel@nongnu.org; Wed, 02 Dec 2015 04:49:28 -0500 Received: from mx1.redhat.com ([209.132.183.28]:57708) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a442N-0003Vd-4p for qemu-devel@nongnu.org; Wed, 02 Dec 2015 04:49:23 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id 4EBDC8C1B2 for ; Wed, 2 Dec 2015 09:49:22 +0000 (UTC) Date: Wed, 2 Dec 2015 17:49:18 +0800 From: Fam Zheng Message-ID: <20151202094918.GA21121@ad.usersys.redhat.com> References: <1448976530-15984-1-git-send-email-peterx@redhat.com> <1448976530-15984-10-git-send-email-peterx@redhat.com> <20151202013257.GF9399@ad.usersys.redhat.com> <20151202084919.GD19485@pxdev.xzpeter.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151202084919.GD19485@pxdev.xzpeter.org> Subject: Re: [Qemu-devel] [PATCH v4 09/11] DumpState: adding total_size and written_size fields List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Xu Cc: drjones@redhat.com, lersek@redhat.com, armbru@redhat.com, qemu-devel@nongnu.org, pbonzini@redhat.com, lcapitulino@redhat.com On Wed, 12/02 16:49, Peter Xu wrote: > On Wed, Dec 02, 2015 at 09:32:57AM +0800, Fam Zheng wrote: > > > @@ -1301,6 +1303,7 @@ static void write_dump_pages(DumpState *s, Error **errp) > > > goto out; > > > } > > > } > > > + s->written_size += TARGET_PAGE_SIZE; > > > > The same question applies here. > > For kdump case, it is using "goto out" when error happens. So it > seems to have no problem here? write_cache can fail after you increment it here, no? Fam