[PATCH 0/7] Implement bdrv_{pread, pwrite, pwrite_sync, pwrite_zeroes}() using generated_co_wrapper

Alberto Faria posted 7 patches 1 week ago
block/blklogwrites.c             |  6 +--
block/bochs.c                    | 10 ++---
block/cloop.c                    | 12 +++---
block/coroutines.h               |  4 +-
block/crypto.c                   |  8 ++--
block/dmg.c                      | 36 ++++++++--------
block/io.c                       | 53 ++----------------------
block/parallels-ext.c            |  6 +--
block/parallels.c                | 12 +++---
block/qcow.c                     | 41 +++++++++----------
block/qcow2-bitmap.c             | 14 +++----
block/qcow2-cache.c              |  9 ++--
block/qcow2-cluster.c            | 19 +++++----
block/qcow2-refcount.c           | 58 +++++++++++++-------------
block/qcow2-snapshot.c           | 51 +++++++++++------------
block/qcow2.c                    | 53 ++++++++++++------------
block/qed.c                      | 13 ++----
block/vdi.c                      | 14 +++----
block/vhdx-log.c                 | 26 ++++++------
block/vhdx.c                     | 36 ++++++++--------
block/vmdk.c                     | 70 ++++++++++++++------------------
block/vpc.c                      | 23 ++++++-----
block/vvfat.c                    | 11 ++---
include/block/block-io.h         | 22 ++++++----
include/block/block_int-io.h     |  4 +-
tests/unit/test-block-iothread.c | 12 +++---
26 files changed, 292 insertions(+), 331 deletions(-)
[PATCH 0/7] Implement bdrv_{pread, pwrite, pwrite_sync, pwrite_zeroes}() using generated_co_wrapper
Posted by Alberto Faria 1 week ago
Start by making the interfaces of analogous non-coroutine and coroutine
functions consistent with each other, then implement the non-coroutine
ones using generated_co_wrapper.

For the bdrv_pwrite_sync() case, also add the missing
bdrv_co_pwrite_sync() function.

Alberto Faria (7):
  block: Add a 'flags' param to bdrv_{pread,pwrite,pwrite_sync}()
  block: Change bdrv_{pread,pwrite,pwrite_sync}() param order
  block: Make bdrv_{pread,pwrite}() return 0 on success
  block: Make bdrv_co_pwrite() take a const buffer
  block: Make 'bytes' param of bdrv_co_{pread,pwrite,preadv,pwritev}()
    an int64_t
  block: Implement bdrv_{pread,pwrite,pwrite_zeroes}() using
    generated_co_wrapper
  block: Add bdrv_co_pwrite_sync()

 block/blklogwrites.c             |  6 +--
 block/bochs.c                    | 10 ++---
 block/cloop.c                    | 12 +++---
 block/coroutines.h               |  4 +-
 block/crypto.c                   |  8 ++--
 block/dmg.c                      | 36 ++++++++--------
 block/io.c                       | 53 ++----------------------
 block/parallels-ext.c            |  6 +--
 block/parallels.c                | 12 +++---
 block/qcow.c                     | 41 +++++++++----------
 block/qcow2-bitmap.c             | 14 +++----
 block/qcow2-cache.c              |  9 ++--
 block/qcow2-cluster.c            | 19 +++++----
 block/qcow2-refcount.c           | 58 +++++++++++++-------------
 block/qcow2-snapshot.c           | 51 +++++++++++------------
 block/qcow2.c                    | 53 ++++++++++++------------
 block/qed.c                      | 13 ++----
 block/vdi.c                      | 14 +++----
 block/vhdx-log.c                 | 26 ++++++------
 block/vhdx.c                     | 36 ++++++++--------
 block/vmdk.c                     | 70 ++++++++++++++------------------
 block/vpc.c                      | 23 ++++++-----
 block/vvfat.c                    | 11 ++---
 include/block/block-io.h         | 22 ++++++----
 include/block/block_int-io.h     |  4 +-
 tests/unit/test-block-iothread.c | 12 +++---
 26 files changed, 292 insertions(+), 331 deletions(-)

-- 
2.35.3