Skip to content

nbd errors and traces refactoring

Vladimir Sementsov-Ogievskiy qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest19 patches 32 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/19nbd/server: get rid of nbd_negotiate_read and friendsnbd/client.c nbd/common.c nbd/nbd-internal.h +1 more+50 -1115 replies
2/19nbd/server: get rid of ssize_tnbd/server.c+8 -101 reply
3/19nbd/server: refactor nbd_co_send_replynbd/server.c+4 -41 reply
4/19nbd/server: get rid of EAGAIN dead codenbd/server.c+7 -111 reply
5/19nbd/server: refactor nbd_co_receive_requestnbd/server.c+13 -281 reply
6/19nbd/server: remove NBDClientNewDatanbd/server.c+7 -181 reply
7/19nbd/server: nbd_negotiate: fix error pathnbd/server.c+2 -11 reply
8/19nbd/server: get rid of fail: return rcnbd/server.c+12 -161 reply
9/19nbd/server: rename rc to retnbd/server.c+19 -191 reply
10/19nbd/server: refactor nbd_tripnbd/server.c+20 -331 reply
11/19io/channel-socket: qio_channel_socket_writev handle EPIPEinclude/io/channel.h io/channel-socket.c+2 -13 replies
12/19nbd/common: nbd_wr_syncv handle QIO_CHANNEL_ERR_EPIPEnbd/common.c+1 -11 reply
13/19nbd/server: return original error codesnbd/server.c+77 -472 replies
14/19nbd/server: nbd_negotiate: return 1 on NBD_OPT_ABORTnbd/server.c+15 -53 replies
15/19nbd/server: use errp instead of LOGnbd/server.c+150 -1072 replies
16/19nbd/server: add errp to nbd_send_reply()nbd/server.c+9 -81 reply
17/19nbd/common: nbd_tls_handshake: use error_reportf_err instead of TRACEnbd/common.c+1 -11 reply
18/19nbd/client: refactor TRACE of NBD_MAGICnbd/client.c+17 -92 replies
19/19nbd: use generic trace subsystem instead of TRACE macroMakefile.objs nbd/client.c nbd/nbd-internal.h +2 more+141 -1023 replies

Reviews trailers per patch

10 of 19 patches have a Reviewed-by or Acked-by.

PatchEric Blake
1/19
2/19R-b
3/19R-b
4/19R-b
5/19R-b
6/19R-b
7/19R-b
8/19R-b
9/19R-b
10/19R-b
11/19
12/19
13/19R-b
14/19
15/19
16/19
17/19
18/19
19/19

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 00/19] nbd errors and traces refactoring

This is based on my "nbd: error path refactoring" series.

These series bring errp instead of LOG to the server too, making some related refactorings.

nbd_negotiate_read and friends a dropped as was discussed in "nbd: error path refactoring" thread.

finally - refactor traces to modern way too, to get rid of LOG() macro at all.

Patches subgroup 01-x, where x <= 10 may be pushed as separate series, as they are general enough.

11-14 needed to not create error-output on non-error disconnects in 15 16 is good addition for 15
17 is addition for 15 and in the same time prerequisite for 19

patches 18-19 may be pushed separately (but of course after 01-17 and 19 after 18)

Vladimir Sementsov-Ogievskiy (19):
nbd/server: get rid of nbd_negotiate_read and friends nbd/server: get rid of ssize_t
nbd/server: refactor nbd_co_send_reply
nbd/server: get rid of EAGAIN dead code
nbd/server: refactor nbd_co_receive_request
nbd/server: remove NBDClientNewData
nbd/server: nbd_negotiate: fix error path
nbd/server: get rid of fail: return rc
nbd/server: rename rc to ret
nbd/server: refactor nbd_trip
io/channel-socket: qio_channel_socket_writev handle EPIPE nbd/common: nbd_wr_syncv handle QIO_CHANNEL_ERR_EPIPE nbd/server: return original error codes
nbd/server: nbd_negotiate: return 1 on NBD_OPT_ABORT nbd/server: use errp instead of LOG
nbd/server: add errp to nbd_send_reply()
nbd/common: nbd_tls_handshake: use error_reportf_err instead of TRACE nbd/client: refactor TRACE of NBD_MAGIC
nbd: use generic trace subsystem instead of TRACE macro

 Makefile.objs        |   1 +
 include/io/channel.h |   1 +
 io/channel-socket.c  |   2 +-
 nbd/client.c         | 127 ++++------
 nbd/common.c         |  30 ++-
 nbd/nbd-internal.h   |  21 +-
 nbd/server.c         | 670 ++++++++++++++++++++++++---------------------------
 nbd/trace-events     |  67 ++++++
 8 files changed, 471 insertions(+), 448 deletions(-)
 create mode 100644 nbd/trace-events
Signature · 1 line
2.11.1