nbd/server: Quiesce server on drained section
Status from this message: Thanks, applied to the block branch.
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest2 patches 5 repliesApplied
- v12 patches 8 repliesSuperseded
Changes in v2 from the cover letter
- Use a bool for the value returned by .drained_poll [Kevin]
- Change .drained_poll comment to reflect that the returned boolean value will be true if the device is still busy, or false otherwise
- Drop yield_co_list and use recv_coroutine and read_yielding [Kevin]
- Return "true" or "false" in nbd_drained_poll [Kevin]
- Fix grammar in the commit message of patch 2 [Eric]
Patches in v2 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | block-backend: add drained_pollblock/ include/ | +10 | 1 reply | |
| 2/2 | nbd/server: Use drained block ops to quiesce the servernbd/ | +61 | 3 replies |
Reviews trailers per patch
All 2 patches have a Reviewed-by or Acked-by.
| Patch | Kevin Wolf | Eric Blake | Vladimir Sementsov-Ogievskiy |
|---|---|---|---|
| 1/2 | R-b | R-b | R-b |
| 2/2 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.
Cover letter [PATCH v2 0/2] nbd/server: Quiesce server on drained section
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.
v2:
- Use a bool for the value returned by .drained_poll [Kevin]
- Change .drained_poll comment to reflect that the returned boolean value will be true if the device is still busy, or false otherwise
- Drop yield_co_list and use recv_coroutine and read_yielding [Kevin]
- Return "true" or "false" in nbd_drained_poll [Kevin]
- Fix grammar in the commit message of patch 2 [Eric]
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 | 82 +++++++++++++++++++++++++--------- 3 files changed, 71 insertions(+), 22 deletions(-)
Signature · 1 line
2.26.2