On 01/12/2018 03:47 AM, Vladimir Sementsov-Ogievskiy wrote: > 09.01.2018 22:52, Eric Blake wrote: >> On 12/07/2017 09:50 AM, Vladimir Sementsov-Ogievskiy wrote: >>> Add command for export removing. It is needed for cases when we >>> don't want to keep export after the operation on it was completed. >>> The other example is temporary node, created with blockdev-add. >>> If we want to delete it we should firstly remove corresponding >>> NBD export. >>> >>> Signed-off-by: Vladimir Sementsov-Ogievskiy <[email protected]> >>> ---
>> Do we want a third mode in the middle, where the server starts replying >> to all existing clients with ESHUTDOWN errors for all new requests >> rather than abruptly disconnecting (no new I/O, but no forced disconnect >> and pending in-flight transactions can still complete gracefully)? > > looks interesting. what about the following naming? > > @mode: possible values: > hide - just hide server from new clients, maintain > existing connections, > remove after all clients disconnected > soft - like hide, but answer with ESHUTDOWN for all > further requests from > existing connections > hard - hard disconnect all clients and remove server > (default: soft) Or even a fourth mode that causes an immediate error return without state change if there are any connected clients, but otherwise removes the server. > > new corresponding states of nbd export: > hidden, shutting_down > > and we allow transitions: > > normal_execution -> hidden > normal_execution -> shutting_down > normal_execution -> exit > hidden -> shutting_down > hidden -> exit > shutting_down -> exit Seems reasonable. Are you planning on tackling a respin of this series incorporating that idea? -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature
