[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2] qed: adjust the way to get nb_sectors
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH v2] qed: adjust the way to get nb_sectors |
Date: |
Tue, 1 Nov 2011 09:10:50 +0000 |
On Tue, Nov 1, 2011 at 8:04 AM, Zhi Yong Wu <address@hidden> wrote:
> 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 <address@hidden>
> ---
> block/qed-table.c | 6 +++---
> 1 files changed, 3 insertions(+), 3 deletions(-)
Acked-by: Stefan Hajnoczi <address@hidden>