|
From: | Vladimir Sementsov-Ogievskiy |
Subject: | Re: [Qemu-block] [PATCH 5/5] block/nbd-client: don't check ioc |
Date: | Tue, 8 May 2018 09:36:53 +0300 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 |
07.05.2018 21:08, Eric Blake wrote:
On 05/07/2018 10:44 AM, Vladimir Sementsov-Ogievskiy wrote:We have several paranoiac checks for ioc != NULL. But ioc may become NULL only on close, which should not happen during requests handling. Also, we check ioc only sometimes, not after each yield, which is inconsistent. Let's drop these checks.Can (or even should) any of these be replaced by asserts that ioc is not NULL?Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden> --- block/nbd-client.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-)
No problem, I can add them. Actually in most of cases we will crash very soon on
next QIO_CHANNEL_GET_CLASS(ioc). The exclusions (looked through) are: - "if (!s->ioc || s->quit) {" case, if reply is not simple. - zero-length io requests in other cases, if they are possible -- Best regards, Vladimir
[Prev in Thread] | Current Thread | [Next in Thread] |