[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH 06/18] nbd/client: refactor drop_sync
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-block] [PATCH 06/18] nbd/client: refactor drop_sync |
Date: |
Wed, 15 Feb 2017 17:52:32 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 |
On 08/02/2017 08:55, Vladimir Sementsov-Ogievskiy wrote:
> 07.02.2017 02:19, Eric Blake wrote:
>> On 02/03/2017 09:47 AM, Vladimir Sementsov-Ogievskiy wrote:
>>> Return 0 on success to simplify success checking.
>>>
>>> Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
>>> ---
>>> nbd/client.c | 35 +++++++++++++++++++----------------
>>> 1 file changed, 19 insertions(+), 16 deletions(-)
>> I'm not sure that this simplifies anything. You have a net addition in
>> lines of code, so unless some later patch is improved because of this,
>> I'm inclined to say this is needless churn.
>>
>
> I just dislike duplicating information like "drop_sync(ioc, 124) !=
> 124". In the code there is no place where positive and not equal to size
> return value actually handled. But it is not so important, if you are
> against i'll drop this, no problem.
I think I agree with Vladimir.
> One note: I don't have good understanding of the following: actually
> read can return positive value < queried size, which means that we
> should read again. But it is not handled in the code (handled, but just
> as an error), except drop_sync.. (With drop_sync it is side effect of
> using limited buffer size, yes?). Is it all ok?
It is handled in nbd_wr_syncv.
Paolo
- [Qemu-block] [PATCH 02/18] nbd-server: refactor simple reply sending, (continued)
- [Qemu-block] [PATCH 02/18] nbd-server: refactor simple reply sending, Vladimir Sementsov-Ogievskiy, 2017/02/03
- [Qemu-block] [PATCH 13/18] nbd: add nbd_dirty_bitmap_load, Vladimir Sementsov-Ogievskiy, 2017/02/03
- [Qemu-block] [PATCH 10/18] block/dirty-bitmap: add bdrv_load_dirty_bitmap, Vladimir Sementsov-Ogievskiy, 2017/02/03
- [Qemu-block] [PATCH 16/18] iotests: add test for nbd dirty bitmap export, Vladimir Sementsov-Ogievskiy, 2017/02/03
- [Qemu-block] [PATCH 06/18] nbd/client: refactor drop_sync, Vladimir Sementsov-Ogievskiy, 2017/02/03
- [Qemu-block] [PATCH 18/18] nbd: BLOCK_STATUS for standard get_block_status function: client part, Vladimir Sementsov-Ogievskiy, 2017/02/03
- [Qemu-block] [PATCH 01/18] nbd: rename NBD_REPLY_MAGIC to NBD_SIMPLE_REPLY_MAGIC, Vladimir Sementsov-Ogievskiy, 2017/02/03
- [Qemu-block] [PATCH 04/18] nbd/client: refactor nbd_receive_starttls, Vladimir Sementsov-Ogievskiy, 2017/02/03