From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:52074) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RLYiy-0006Nc-1i for qemu-devel@nongnu.org; Wed, 02 Nov 2011 07:11:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RLYix-0005WF-A9 for qemu-devel@nongnu.org; Wed, 02 Nov 2011 07:11:16 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43189) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RLYix-0005W4-2Z for qemu-devel@nongnu.org; Wed, 02 Nov 2011 07:11:15 -0400 Message-ID: <4EB125D3.9000000@redhat.com> Date: Wed, 02 Nov 2011 12:13:23 +0100 From: Kevin Wolf MIME-Version: 1.0 References: <1320134672-14310-1-git-send-email-wuzhy@linux.vnet.ibm.com> In-Reply-To: <1320134672-14310-1-git-send-email-wuzhy@linux.vnet.ibm.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2] qed: adjust the way to get nb_sectors List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Zhi Yong Wu Cc: zwu.kernel@gmail.com, qemu-devel@nongnu.org, stefanha@linux.vnet.ibm.com Am 01.11.2011 09:04, schrieb Zhi Yong Wu: > This patch is only to refactor some lines of codes to get better and more robust codes. > > As you have seen, in qed_read_table_cb() it's nice to > use qiov->size because that function doesn't obviously use a single > struct iovec. > > In other two functions, if qiov use more than one struct iovec, the existing way will get wrong nb_sectors. > To make the code more robust, it will be nicer to refactor the existing way as below. > > > Signed-off-by: Zhi Yong Wu Thanks, applied to the block branch. Kevin