[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH for-4.0] qemu-img: Gracefully shutdown when map
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH for-4.0] qemu-img: Gracefully shutdown when map can't finish |
Date: |
Thu, 28 Mar 2019 12:33:31 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.0 |
On 3/28/19 7:14 AM, Kevin Wolf wrote:
> Am 26.03.2019 um 19:40 hat Eric Blake geschrieben:
>> 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>
>
> Reviewed-by: Kevin Wolf <address@hidden>
Thanks; queued on my NBD tree for -rc2
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature