qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/3] nbd: merge block/nbd.c and block/nbd-client.c
@ 2019-06-11 10:27 Vladimir Sementsov-Ogievskiy
  2019-06-11 10:27 ` [Qemu-devel] [PATCH 1/3] block/nbd-client: drop stale logout Vladimir Sementsov-Ogievskiy
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Vladimir Sementsov-Ogievskiy @ 2019-06-11 10:27 UTC (permalink / raw)
  To: qemu-devel, qemu-block; +Cc: kwolf, vsementsov, mreitz

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

-- 
2.18.0



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

end of thread, other threads:[~2019-06-13 18:06 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-11 10:27 [Qemu-devel] [PATCH 0/3] nbd: merge block/nbd.c and block/nbd-client.c Vladimir Sementsov-Ogievskiy
2019-06-11 10:27 ` [Qemu-devel] [PATCH 1/3] block/nbd-client: drop stale logout Vladimir Sementsov-Ogievskiy
2019-06-13 14:28   ` Eric Blake
2019-06-11 10:27 ` [Qemu-devel] [PATCH 2/3] block/nbd: merge nbd-client.* to nbd.c Vladimir Sementsov-Ogievskiy
2019-06-13 14:53   ` Eric Blake
2019-06-11 10:27 ` [Qemu-devel] [PATCH 3/3] block/nbd: merge NBDClientSession struct back to BDRVNBDState Vladimir Sementsov-Ogievskiy
2019-06-13 15:16   ` Eric Blake
2019-06-13 15:20     ` Vladimir Sementsov-Ogievskiy
2019-06-13 16:06     ` Max Reitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).