qemu-block
[Top][All Lists]
Advanced

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

Re: [Qemu-block] [PATCH for-4.0] qemu-img: Gracefully shutdown when map


From: John Snow
Subject: Re: [Qemu-block] [PATCH for-4.0] qemu-img: Gracefully shutdown when map can't finish
Date: Wed, 27 Mar 2019 16:43:44 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0


On 3/26/19 2:40 PM, Eric Blake wrote:
> Trying 'qemu-img map -f raw nbd://localhost:10809' causes the
> NBD server to output a scary message:
> 
> qemu-nbd: Disconnect client, due to: Failed to read request: Unexpected 
> end-of-file before all bytes were read
> 
> This is because the NBD client, being remote, has no way to expose a
> human-readable map (the --output=json data is fine, however). But
> because we exit(1) right after the message, causing the client to
> bypass all block cleanup, the server sees the abrupt exit and warns,
> whereas it would be silent had the client had a chance to send
> NBD_CMD_DISC. Other protocols may have similar cleanup issues, where
> failure to blk_unref() could cause unintended effects.
> 
> Signed-off-by: Eric Blake <address@hidden>

Seems good; taking it through the NBD tree helps me keep track of them :)

Reviewed-by: John Snow <address@hidden>



reply via email to

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