qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] qed: adjust the way to get nb_sectors


From: Zhi Yong Wu
Subject: Re: [Qemu-devel] [PATCH] qed: adjust the way to get nb_sectors
Date: Tue, 1 Nov 2011 09:54:31 +0800
User-agent: Mutt/1.5.21 (2010-09-15)

On Mon, Oct 31, 2011 at 02:11:00PM +0000, Stefan Hajnoczi wrote:
>From: Stefan Hajnoczi <address@hidden>
>To: Zhi Yong Wu <address@hidden>
>Cc: Kevin Wolf <address@hidden>, Zhi Yong Wu <address@hidden>,
> address@hidden, address@hidden
>Content-Type: text/plain; charset=ISO-8859-1
>x-cbid: 11103114-6148-0000-0000-000000CC1760
>X-IBM-ISS-SpamDetectors: Score=0; BY=0; FL=0; FP=0; FZ=0; HX=0; KW=0; PH=0;
> SC=0; ST=0; TS=0; UL=0; ISC=
>X-IBM-ISS-DetailInfo: BY=3.00000227; HX=3.00000175; KW=3.00000007;
> PH=3.00000001; SC=3.00000001; SDB=6.00083535; UDB=6.00022970;
> UTC=2011-10-31 14:11:03
>X-Xagent-From: address@hidden
>X-Xagent-To: address@hidden
>X-Xagent-Gateway: vmsdvma.vnet.ibm.com (XAGENTU6 at VMSDVMA)
>
>On Mon, Oct 31, 2011 at 8:25 AM, Zhi Yong Wu <address@hidden> wrote:
>> On Mon, Oct 31, 2011 at 4:10 PM, Kevin Wolf <address@hidden> wrote:
>>> Am 31.10.2011 04:01, schrieb Zhi Yong Wu:
>>>> It is better to use qiov.size in qed-table.c to get nb_sectors than 
>>>> iov.iov_len.
>>>>
>>>> Signed-off-by: Zhi Yong Wu <address@hidden>
>>>
>>> The commit message should probably say why it's better. Not saying
>>> otherwise, but I can't see the different at the first sight.
>> They are equal, but if the number of iov isn't ONE, they will be not
>> equal. qiov.size contains the sum of all iov's size while iov.iov_len
>> is only the size of one iov. Although in current scenario, they are
>> equal, but i think that it is better if qiov.size is used.
>
>I see your reasoning.  Especially in qed_read_table_cb() it's nice to
>use qiov->size because that function doesn't obviously use a single
>struct iovec.
>
>If you want to change it I agree but please send a patch with a proper
>explanation that mentions that this is purely a refactoring (does not
>change behavior) and why.
OK.
>
>Stefan
>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]