qemu-block
[Top][All Lists]
Advanced

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

Re: [Qemu-block] [PATCH 8/8] nbd: Minimal structured read for client


From: Paolo Bonzini
Subject: Re: [Qemu-block] [PATCH 8/8] nbd: Minimal structured read for client
Date: Thu, 5 Oct 2017 12:36:36 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0

On 05/10/2017 12:02, Vladimir Sementsov-Ogievskiy wrote:
> 03.10.2017 17:06, Paolo Bonzini wrote:
>> On 03/10/2017 15:35, Vladimir Sementsov-Ogievskiy wrote:
>>>>> In the end this probably means that you have a read_chunk_header
>>>>> function and a read_chunk function.  READ has a loop that calls
>>>>> read_chunk_header followed by direct reading into the QEMUIOVector,
>>>>> while everyone else calls read_chunk.
>>>> accordingly to spec, we can receive several error reply chunks to any
>>>> request,
>>>> so loop, receiving them should be common for all requests I think
>>> as well as handling error chunks should be common..
>> Yes, reading error chunks should be part of read_chunk_header.
>>
>> Paolo
> 
> So, you want a loop in READ, and separate loop for other commands? Then
> we will have separate loop for BLOCK_STATUS and for all future commands
> with specific replies?

There should be a separate loop for each command.

The only difference between READ and other commands is that READ
receives directly in QEMUIOVector, while other commands can use a common
function to to receive each structured reply chunk into malloc-ed memory.

Paolo



reply via email to

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