[PATCH v8 0/7] coroutines: generate wrapper code

Vladimir Sementsov-Ogievskiy posted 7 patches 3 years, 6 months ago
Failed in applying to current master (apply log)
There is a newer version of this series
docs/devel/block-coroutine-wrapper.rst |  54 ++++
block/block-gen.h                      |  49 ++++
block/coroutines.h                     |  65 +++++
include/block/block.h                  |  34 ++-
block.c                                |  97 ++-----
block/io.c                             | 336 ++++---------------------
tests/test-bdrv-drain.c                |   2 +-
block/meson.build                      |   8 +
scripts/block-coroutine-wrapper.py     | 187 ++++++++++++++
9 files changed, 451 insertions(+), 381 deletions(-)
create mode 100644 docs/devel/block-coroutine-wrapper.rst
create mode 100644 block/block-gen.h
create mode 100644 block/coroutines.h
create mode 100755 scripts/block-coroutine-wrapper.py
[PATCH v8 0/7] coroutines: generate wrapper code
Posted by Vladimir Sementsov-Ogievskiy 3 years, 6 months ago
Hi all!

The aim of the series is to reduce code-duplication and writing
parameters structure-packing by hand around coroutine function wrappers.

Benefits:
 - no code duplication
 - less indirection

v8:
04: - rebase on meson build
        - script interface is changed to satisfy meson custom_target
    - rename script s/coroutine-wrapper.py/block-coroutine-wrapper.py/
    - add docs/devel/block-coroutine-wrapper.rst

Vladimir Sementsov-Ogievskiy (7):
  block: return error-code from bdrv_invalidate_cache
  block/io: refactor coroutine wrappers
  block: declare some coroutine functions in block/coroutines.h
  scripts: add block-coroutine-wrapper.py
  block: generate coroutine-wrapper code
  block: drop bdrv_prwv
  block/io: refactor save/load vmstate

 docs/devel/block-coroutine-wrapper.rst |  54 ++++
 block/block-gen.h                      |  49 ++++
 block/coroutines.h                     |  65 +++++
 include/block/block.h                  |  34 ++-
 block.c                                |  97 ++-----
 block/io.c                             | 336 ++++---------------------
 tests/test-bdrv-drain.c                |   2 +-
 block/meson.build                      |   8 +
 scripts/block-coroutine-wrapper.py     | 187 ++++++++++++++
 9 files changed, 451 insertions(+), 381 deletions(-)
 create mode 100644 docs/devel/block-coroutine-wrapper.rst
 create mode 100644 block/block-gen.h
 create mode 100644 block/coroutines.h
 create mode 100755 scripts/block-coroutine-wrapper.py

-- 
2.21.3


Re: [PATCH v8 0/7] coroutines: generate wrapper code
Posted by Stefan Hajnoczi 3 years, 6 months ago
On Tue, Sep 15, 2020 at 07:44:04PM +0300, Vladimir Sementsov-Ogievskiy wrote:
> Hi all!
> 
> The aim of the series is to reduce code-duplication and writing
> parameters structure-packing by hand around coroutine function wrappers.
> 
> Benefits:
>  - no code duplication
>  - less indirection
> 
> v8:
> 04: - rebase on meson build
>         - script interface is changed to satisfy meson custom_target
>     - rename script s/coroutine-wrapper.py/block-coroutine-wrapper.py/
>     - add docs/devel/block-coroutine-wrapper.rst
> 
> Vladimir Sementsov-Ogievskiy (7):
>   block: return error-code from bdrv_invalidate_cache
>   block/io: refactor coroutine wrappers
>   block: declare some coroutine functions in block/coroutines.h
>   scripts: add block-coroutine-wrapper.py
>   block: generate coroutine-wrapper code
>   block: drop bdrv_prwv
>   block/io: refactor save/load vmstate
> 
>  docs/devel/block-coroutine-wrapper.rst |  54 ++++
>  block/block-gen.h                      |  49 ++++
>  block/coroutines.h                     |  65 +++++
>  include/block/block.h                  |  34 ++-
>  block.c                                |  97 ++-----
>  block/io.c                             | 336 ++++---------------------
>  tests/test-bdrv-drain.c                |   2 +-
>  block/meson.build                      |   8 +
>  scripts/block-coroutine-wrapper.py     | 187 ++++++++++++++
>  9 files changed, 451 insertions(+), 381 deletions(-)
>  create mode 100644 docs/devel/block-coroutine-wrapper.rst
>  create mode 100644 block/block-gen.h
>  create mode 100644 block/coroutines.h
>  create mode 100755 scripts/block-coroutine-wrapper.py

Please send a v9 and I'll merge it.

Stefan