Home
last modified time | relevance | path

Searched hist:"23 e9a39e" (Results 1 – 1 of 1) sorted by relevance

/qemu/block/
H A Dqed-table.c23e9a39e Tue Nov 01 08:04:32 GMT 2011 Zhi Yong Wu <wuzhy@linux.vnet.ibm.com> qed: adjust the way to get nb_sectors

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 <wuzhy@linux.vnet.ibm.com>
Acked-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>