[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH v2 0/4] nbd/server: Quiesce coroutines on context switch
This series allows the NBD server to properly switch between AIO contexts, having quiesced recv_coroutine and send_coroutine before doing the transition. We need this because we send back devices running in IO Thread owned contexts to the main context when stopping the data plane, something that can happen multiple times during the lifetime of a VM (usually during the boot sequence or on a reboot), and we drag the NBD server of the correspoing export with it. While there, fix also a problem caused by a cross-dependency between closing the export's client connections and draining the block layer. The visible effect of this problem was QEMU getting hung when the guest request a power off while there's an active NBD client. v2: - Replace "virtio-blk: Acquire context while switching them on dataplane start" with "block: Honor blk_set_aio_context() context requirements" (Kevin Wolf) - Add "block: Avoid processing BDS twice in bdrv_set_aio_context_ignore()" - Add "block: Close block exports in two steps" - Rename nbd_read_eof() to nbd_server_read_eof() (Eric Blake) - Fix double space and typo in comment. (Eric Blake) Sergio Lopez (4): block: Honor blk_set_aio_context() context requirements block: Avoid processing BDS twice in bdrv_set_aio_context_ignore() nbd/server: Quiesce coroutines on context switch block: Close block exports in two steps block.c | 27 ++++++- block/export/export.c | 10 +-- blockdev-nbd.c | 2 +- hw/block/dataplane/virtio-blk.c | 4 ++ hw/block/dataplane/xen-block.c | 7 +- hw/scsi/virtio-scsi.c | 6 +- include/block/export.h | 4 +- nbd/server.c | 120 ++++++++++++++++++++++++++++---- qemu-nbd.c | 2 +- stubs/blk-exp-close-all.c | 2 +- 10 files changed, 156 insertions(+), 28 deletions(-) -- 2.26.2
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |