[Qemu-devel] [PATCH 0/3] nbd: Use common read/write-all qio functions

Eric Blake posted 3 patches 6 years, 7 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20170905191114.5959-1-eblake@redhat.com
Test checkpatch passed
Test docker passed
Test s390x passed
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(-)
[Qemu-devel] [PATCH 0/3] nbd: Use common read/write-all qio functions
Posted by Eric Blake 6 years, 7 months ago
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(-)

-- 
2.13.5


Re: [Qemu-devel] [PATCH 0/3] nbd: Use common read/write-all qio functions
Posted by Eric Blake 6 years, 7 months ago
On 09/05/2017 02:11 PM, Eric Blake wrote:
> 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

Thanks; queued on my NBD tree (after amending the commit message of 1/3,
per Dan's review):
git://repo.or.cz/qemu/ericb.git nbd

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org