At Mon, 14 Jan 2013 14:01:02 +0800,
Liu Yuan wrote:
> 
> @@ -964,7 +971,10 @@ static int coroutine_fn 
> add_aio_request(BDRVSheepdogState *s, AIOReq *aio_req,
>  
>      memset(&hdr, 0, sizeof(hdr));
>  
> -    if (aiocb_type == AIOCB_READ_UDATA) {
> +    if (aiocb_type == AIOCB_FLUSH_CACHE) {
> +        wlen = 0;
> +        hdr.opcode = SD_OP_FLUSH_VDI;
> +    } else if (aiocb_type == AIOCB_READ_UDATA) {
>          wlen = 0;
>          hdr.opcode = SD_OP_READ_OBJ;
>          hdr.flags = flags;

I think it's better to use a switch statement here.

The other parts look good to me.

Thanks,

Kazutaka

Reply via email to