|
From: | Vladimir Sementsov-Ogievskiy |
Subject: | Re: [Qemu-block] [PATCH 6/9] nbd: BLOCK_STATUS for standard get_block_status function: client part |
Date: | Mon, 12 Mar 2018 16:13:49 +0300 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 |
16.02.2018 23:40, Eric Blake wrote:
On 02/15/2018 07:51 AM, Vladimir Sementsov-Ogievskiy wrote: [...] Instead of doing a memcpy() and then in-place bit-swizzling, you could do the swapping as part of assignment, for one less function call (and make the code a bit easier to extend, if we later drop our REQ_ONE limitation on only having one extent, because you'll advance payload as needed): related question: what server should reply on zero-length request? I'll add + if (!bytes) { + *pnum = 0; + return 0; + } to nbd_client_co_block_status, to prevent such situation, but looks like spec lacks the information. -- Best regards, Vladimir |
[Prev in Thread] | Current Thread | [Next in Thread] |