[Top][All Lists]

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

Re: [Qemu-block] [PATCH 06/18] nbd/client: refactor drop_sync

From: Vladimir Sementsov-Ogievskiy
Subject: Re: [Qemu-block] [PATCH 06/18] nbd/client: refactor drop_sync
Date: Wed, 8 Feb 2017 10:55:59 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0

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.

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?

Best regards,

reply via email to

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