All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] nbd/server: Quiesce server on drained section
@ 2021-06-01  5:57 Sergio Lopez
  2021-06-01  5:57 ` [PATCH 1/2] block-backend: add drained_poll Sergio Lopez
  2021-06-01  5:57 ` [PATCH 2/2] nbd/server: Use drained block ops to quiesce the server Sergio Lopez
  0 siblings, 2 replies; 11+ messages in thread
From: Sergio Lopez @ 2021-06-01  5:57 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, Vladimir Sementsov-Ogievskiy, Sergio Lopez,
	qemu-block, Max Reitz, Nir Soffer

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




^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2021-06-02  5:53 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-01  5:57 [PATCH 0/2] nbd/server: Quiesce server on drained section Sergio Lopez
2021-06-01  5:57 ` [PATCH 1/2] block-backend: add drained_poll Sergio Lopez
2021-06-01 15:59   ` Kevin Wolf
2021-06-01 16:32     ` Sergio Lopez
2021-06-01 21:24     ` Eric Blake
2021-06-01  5:57 ` [PATCH 2/2] nbd/server: Use drained block ops to quiesce the server Sergio Lopez
2021-06-01 16:08   ` Kevin Wolf
2021-06-01 16:31     ` Sergio Lopez
2021-06-01 21:31       ` Eric Blake
2021-06-01 21:29   ` Eric Blake
2021-06-02  5:52     ` Sergio Lopez

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.