Skip to content

nbd: merge block/nbd.c and block/nbd-client.c

Vladimir Sementsov-Ogievskiy qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 5 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3block/nbd-client: drop stale logoutblock/nbd-client.c block/nbd-client.h block/trace-events+5 -121 reply
2/3block/nbd: merge nbd-client.* to nbd.cblock/Makefile.objs block/nbd-client.c block/nbd-client.h +2 more+1255 -13231 reply
3/3block/nbd: merge NBDClientSession struct back to BDRVNBDStateblock/nbd.c+94 -1033 replies

Reviews trailers per patch

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

PatchEric Blake
1/3R-b
2/3R-b
3/3R-b

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

Read the v1 thread

Cover letter [Qemu-devel] [PATCH 0/3] nbd: merge block/nbd.c and block/nbd-client.c

Hi all!

I need some fields of BDRVNBDState to be available in nbd-client.c code for my nbd-reconnect series. This leads to the following idea:
It seems that there is no actual benefits in splitting NBDClientSession out of BDRVNBDState and nbd-client.c out of nbd.c It only increases confusion around nbd client architecture, and make it different from other formats. So, I propose to merge them back.

The only thing I doubt in:
NBD client block driver is called "nbd", so, seems logical to keep BDRVNBDState structure name and block/nbd.c filename. But I can't rename all nbd_client_* handlers to nbd_*, as they start conflicting with definitions in include/block/nbd.h (nbd_init for example). So, for now I've kept old names, so, some handlers are nbd_* and some nbd_client_*, which is definitely inconsistent.. So, maybe they all should become block_nbd_ or bdrv_nbd_ or nbddrv_ or something like this to stress that it is BlockDriver implementation, not nbd/client.c code (separated from generic block layer). Or keep them as is, a bit inconsistent. What do you think?

Vladimir Sementsov-Ogievskiy (3):
block/nbd-client: drop stale logout
block/nbd: merge nbd-client.* to nbd.c
block/nbd: merge NBDClientSession struct back to BDRVNBDState

 block/nbd-client.h  |   72 ---
 block/nbd-client.c  | 1226 -----------------------------------------
 block/nbd.c         | 1282 +++++++++++++++++++++++++++++++++++++++++--
 block/Makefile.objs |    2 +-
 block/trace-events  |    4 +-
 5 files changed, 1251 insertions(+), 1335 deletions(-)
 delete mode 100644 block/nbd-client.h
 delete mode 100644 block/nbd-client.c
Signature · 1 line
2.18.0