[PATCH 0/2] nbd/server: Quiesce server on drained section

Sergio Lopez posted 2 patches 2 years, 10 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/next-importer-push tags/patchew/20210601055728.90849-1-slp@redhat.com
Maintainers: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>, Max Reitz <mreitz@redhat.com>, Eric Blake <eblake@redhat.com>, Kevin Wolf <kwolf@redhat.com>
There is a newer version of this series
block/block-backend.c          |  7 ++-
include/sysemu/block-backend.h |  4 ++
nbd/server.c                   | 99 +++++++++++++++++++++++++---------
3 files changed, 85 insertions(+), 25 deletions(-)
[PATCH 0/2] nbd/server: Quiesce server on drained section
Posted by Sergio Lopez 2 years, 10 months ago
Before switching between AioContexts we need to make sure that we're
fully quiesced ("nb_requests == 0" for every client) when entering the
drained section. Otherwise, coroutines may be run in the wrong context
after the switch, leading to a number of critical issues.

To accomplish this, we add ".drained_poll" to BlockDevOps and use it
in the NBD server, along with ".drained_being" and "drained_end", to
coordinate the quiescing of the server while entering a drained
section.

Sergio Lopez (2):
  block-backend: add drained_poll
  nbd/server: Use drained block ops to quiesce the server

 block/block-backend.c          |  7 ++-
 include/sysemu/block-backend.h |  4 ++
 nbd/server.c                   | 99 +++++++++++++++++++++++++---------
 3 files changed, 85 insertions(+), 25 deletions(-)

-- 
2.26.2