From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39386) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e02z1-0006Ae-Lg for qemu-devel@nongnu.org; Thu, 05 Oct 2017 06:02:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e02yx-0006sf-43 for qemu-devel@nongnu.org; Thu, 05 Oct 2017 06:02:23 -0400 Received: from mailhub.sw.ru ([195.214.232.25]:32623 helo=relay.sw.ru) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1e02yw-0006pm-Og for qemu-devel@nongnu.org; Thu, 05 Oct 2017 06:02:19 -0400 References: <20170925135801.144261-1-vsementsov@virtuozzo.com> <20170925135801.144261-9-vsementsov@virtuozzo.com> From: Vladimir Sementsov-Ogievskiy Message-ID: <9c3e29b4-3ec9-4fd7-3d80-122f908d059f@virtuozzo.com> Date: Thu, 5 Oct 2017 13:02:12 +0300 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [Qemu-block] [PATCH 8/8] nbd: Minimal structured read for client List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , Eric Blake , qemu-devel@nongnu.org, qemu-block@nongnu.org Cc: kwolf@redhat.com, den@openvz.org, mreitz@redhat.com 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.=C2=A0 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=20 we will have separate loop for BLOCK_STATUS and for all future commands=20 with specific replies? --=20 Best regards, Vladimir