qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 1/2] sheepdog: multiplex the rw FD to flush cach


From: MORITA Kazutaka
Subject: Re: [Qemu-devel] [PATCH 1/2] sheepdog: multiplex the rw FD to flush cache
Date: Tue, 15 Jan 2013 17:15:16 +0900
User-agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/23.2 Mule/6.0 (HANACHIRUSATO)

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

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