From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:39681) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RPs2a-0008Ki-Jt for qemu-devel@nongnu.org; Mon, 14 Nov 2011 03:37:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RPs2Z-0007kH-HJ for qemu-devel@nongnu.org; Mon, 14 Nov 2011 03:37:20 -0500 Received: from mx1.redhat.com ([209.132.183.28]:13332) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RPs2Z-0007jq-9e for qemu-devel@nongnu.org; Mon, 14 Nov 2011 03:37:19 -0500 Message-ID: <4EC0D33A.4020705@redhat.com> Date: Mon, 14 Nov 2011 09:37:14 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1321030042-20446-1-git-send-email-stefanha@linux.vnet.ibm.com> <1321030042-20446-3-git-send-email-stefanha@linux.vnet.ibm.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 02/10] block: add .bdrv_co_is_allocated() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Zhi Yong Wu Cc: qemu-devel@nongnu.org On 11/14/2011 09:10 AM, Zhi Yong Wu wrote: >> > No, they are necessary. They are executed when bdrv_is_allocated_co_entry >> > calls qemu_coroutine_yield. > Right, But i don't think that they are necessary. > > after bdrv_is_allocated_co_entry has basically completed all main > task, it call qemu_coroutine_yield to wake up this current process; At > that point, it is equal to the setting of data.done. Why need you > still the three lines of codes below? Any function _called_ by the driver's is_allocated member could call qemu_coroutine_yield, for example bdrv_read. Paolo