From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43438) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WzIHu-0005qJ-Uf for qemu-devel@nongnu.org; Tue, 24 Jun 2014 00:25:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WzIHo-0002nN-PV for qemu-devel@nongnu.org; Tue, 24 Jun 2014 00:24:54 -0400 Received: from mx1.redhat.com ([209.132.183.28]:30727) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WzIHo-0002n8-HV for qemu-devel@nongnu.org; Tue, 24 Jun 2014 00:24:48 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s5O4Oksu024324 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 24 Jun 2014 00:24:47 -0400 Date: Tue, 24 Jun 2014 12:25:03 +0800 From: Fam Zheng Message-ID: <20140624042503.GA1865@T430.redhat.com> References: <1402282583-19707-1-git-send-email-famz@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1402282583-19707-1-git-send-email-famz@redhat.com> Subject: Re: [Qemu-devel] [PATCH v2 0/4] mirror: Fix behavior for zero byte image List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Kevin Wolf , Stefan Hajnoczi On Mon, 06/09 10:56, Fam Zheng wrote: > The current behavior of mirroring zero byte image is slightly different from > non-zero image: the BLOCK_JOB_READY event is skipped and job is completed > immediately. This is not a big problem for human user but only makes management > software harder to write. Since we are focusing on an good API instead of UI, > let's make the behavior more consistent and predictable. > > The first patch fixes the behavior. The following two patches add test case for > the involved code path. > > Thanks for Eric Blake to report this! Ping. Shall we merge this before it rots? Thanks, Fam > > > v2: Address Stefan's comments. > > - Added patch 01: block_job_yield. > - Use block_job_yield in 02. > - Fix test case updates. > > Thanks to Stefan, Paolo and Eric for reviewing! > > Fam > > > Fam Zheng (4): > blockjob: Add block_job_yield() > mirror: Go through ready -> complete process for 0 len image > qemu-iotests: Test BLOCK_JOB_READY event for 0Kb image active commit > qemu-iotests: Test 0-length image for mirror > > block/mirror.c | 11 ++++++++++- > blockjob.c | 14 ++++++++++++++ > include/block/blockjob.h | 8 ++++++++ > tests/qemu-iotests/040 | 12 +++++++++--- > tests/qemu-iotests/040.out | 4 ++-- > tests/qemu-iotests/041 | 9 ++++++--- > tests/qemu-iotests/041.out | 4 ++-- > 7 files changed, 51 insertions(+), 11 deletions(-) > > -- > 2.0.0 >