Skip to content

block/nbd: move connection code to separate file

Vladimir Sementsov-Ogievskiy qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest10 patches 14 repliesIn review

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10block/nbd: introduce NBDConnectThread reference counterblock/nbd.c+20 -421 reply
2/10block/nbd: BDRVNBDState: drop unused connect_err and connect_statusblock/nbd.c+2 -101 reply
3/10util/async: aio_co_enter(): do aio_co_schedule in general caseutil/async.c+2 -92 replies
4/10block/nbd: simplify waking of nbd_co_establish_connection()block/nbd.c+9 -401 reply
5/10block/nbd: drop thr->stateblock/nbd.c+27 -761 reply
6/10block/nbd: bs-independent interface for nbd_co_establish_connection()block/nbd.c+31 -181 reply
7/10block/nbd: make nbd_co_establish_connection_cancel() bs-independentblock/nbd.c+7 -91 reply
8/10block/nbd: rename NBDConnectThread to NBDClientConnectionblock/nbd.c+63 -641 reply
9/10block/nbd: introduce nbd_client_connection_new()block/nbd.c+9 -61 reply
10/10nbd: move connection code from block/nbd to nbd/client-connectionblock/nbd.c include/block/nbd.h nbd/client-connection.c +1 more+204 -1673 replies

Reviews trailers per patch

All 10 patches have a Reviewed-by or Acked-by.

PatchRoman Kagan
1/10R-b
2/10R-b
3/10R-b
4/10R-b
5/10R-b
6/10R-b
7/10R-b
8/10R-b
9/10R-b
10/10R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 00/10] block/nbd: move connection code to separate file

Hi all!

This substitutes "[PATCH 00/14] nbd: move reconnect-thread to separate file"
Supersedes: <[email protected]>

I want to simplify block/nbd.c which is overcomplicated now. First step is splitting out what could be split.

These series creates new file nbd/client-connection.c and part of block/nbd.c is refactored and moved.

v2 is mostly rewritten. I decided move larger part, otherwise it doesn't make real sense.

Note also that v2 is based on master. Patch 01 actually solves same problem as
"[PATCH for-6.0] block/nbd: fix possible use after free of s->connect_thread" [*] in a smarter way. So, if [*] goes first, this will be rebased to undo [*].

Vladimir Sementsov-Ogievskiy (10):
block/nbd: introduce NBDConnectThread reference counter block/nbd: BDRVNBDState: drop unused connect_err and connect_status util/async: aio_co_enter(): do aio_co_schedule in general case block/nbd: simplify waking of nbd_co_establish_connection() block/nbd: drop thr->state
block/nbd: bs-independent interface for nbd_co_establish_connection() block/nbd: make nbd_co_establish_connection_cancel() bs-independent block/nbd: rename NBDConnectThread to NBDClientConnection block/nbd: introduce nbd_client_connection_new()
nbd: move connection code from block/nbd to nbd/client-connection

 include/block/nbd.h     |  11 ++
 block/nbd.c             | 288 ++--------------------------------------
 nbd/client-connection.c | 192 +++++++++++++++++++++++++++
 util/async.c            |  11 +-
 nbd/meson.build         |   1 +
 5 files changed, 218 insertions(+), 285 deletions(-)
 create mode 100644 nbd/client-connection.c
Signature · 1 line
2.29.2