Skip to content

nbd: Use common read/write-all qio functions

Eric Blake qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3io: Yield rather than wait when already in coroutineio/channel.c+10 -23 replies
2/3io: Add new qio_channel_read{, v}_all_eof functionsinclude/io/channel.h io/channel.c+93 -81 reply
3/3nbd: Use new qio_channel_*_all() functionsblock/nbd-client.c include/block/nbd.h nbd/common.c +2 more+18 -931 reply

Reviews trailers per patch

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

PatchDaniel P. Berrange
1/3A-b A-b
2/3A-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: Use common read/write-all qio functions

Now that Daniel just added convenience qio channel looping functions, we might as well use it in NBD instead of open-coding our own. In doing so, fix a couple of short-falls noticed in the qio code.

If Dan is happy with this, I can take the series through the NBD queue.

[The diffstat is slightly misleading - it's a net reduction in lines of code, but the added comments hide that fact]

Eric Blake (3):
io: Yield rather than wait when already in coroutine
io: Add new qio_channel_read{,v}_all_eof functions
nbd: Use new qio_channel_*_all() functions

 include/block/nbd.h        |  2 --
 include/io/channel.h       | 53 ++++++++++++++++++++++++++++++++++++++++
 nbd/nbd-internal.h         | 41 ++++++-------------------------
 block/nbd-client.c         | 15 ++++++------
 io/channel.c               | 60 ++++++++++++++++++++++++++++++++++++++--------
 nbd/common.c               | 45 ----------------------------------
 tests/qemu-iotests/083.out |  8 +++----
 7 files changed, 121 insertions(+), 103 deletions(-)
Signature · 1 line
2.13.5