diff options
| author | Peter Maydell <peter.maydell@linaro.org> | 2021-06-20 21:20:13 +0100 |
|---|---|---|
| committer | Peter Maydell <peter.maydell@linaro.org> | 2021-06-20 21:20:13 +0100 |
| commit | e4bfa6cd68e0b19f42c0c4ef26c024d39ebab044 (patch) | |
| tree | 66eeefcbfadeda43b6946930d135edcd4d141643 /scripts | |
| parent | 8f521741e1280f0957ac1b873292c19219e1fb9a (diff) | |
| parent | bbfb7c2f350262f893642433dea66352fc168295 (diff) | |
| download | focaccia-qemu-e4bfa6cd68e0b19f42c0c4ef26c024d39ebab044.tar.gz focaccia-qemu-e4bfa6cd68e0b19f42c0c4ef26c024d39ebab044.zip | |
Merge remote-tracking branch 'remotes/ericb/tags/pull-nbd-2021-06-15-v2' into staging
nbd patches for 2021-06-15 - bug fixes in coroutine aio context handling - rework NBD client connection logic to perform more work in coroutine # gpg: Signature made Fri 18 Jun 2021 18:29:39 BST # gpg: using RSA key 71C2CC22B1C4602927D2F3AAA7A16B4A2527436A # gpg: Good signature from "Eric Blake <eblake@redhat.com>" [full] # gpg: aka "Eric Blake (Free Software Programmer) <ebb9@byu.net>" [full] # gpg: aka "[jpeg image of size 6874]" [full] # Primary key fingerprint: 71C2 CC22 B1C4 6029 27D2 F3AA A7A1 6B4A 2527 436A * remotes/ericb/tags/pull-nbd-2021-06-15-v2: (34 commits) block/nbd: safer transition to receiving request block/nbd: add nbd_client_connected() helper block/nbd: reuse nbd_co_do_establish_connection() in nbd_open() nbd/client-connection: add option for non-blocking connection attempt block/nbd: split nbd_co_do_establish_connection out of nbd_reconnect_attempt block-coroutine-wrapper: allow non bdrv_ prefix nbd/client-connection: return only one io channel block/nbd: drop BDRVNBDState::sioc block/nbd: don't touch s->sioc in nbd_teardown_connection() block/nbd: use negotiation of NBDClientConnection block/nbd: split nbd_handle_updated_info out of nbd_client_handshake() nbd/client-connection: shutdown connection on release nbd/client-connection: implement connection retry nbd/client-connection: add possibility of negotiation nbd/client-connection: use QEMU_LOCK_GUARD nbd: move connection code from block/nbd to nbd/client-connection block/nbd: introduce nbd_client_connection_release() block/nbd: introduce nbd_client_connection_new() block/nbd: rename NBDConnectThread to NBDClientConnection block/nbd: make nbd_co_establish_connection_cancel() bs-independent ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/block-coroutine-wrapper.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/block-coroutine-wrapper.py b/scripts/block-coroutine-wrapper.py index 0461fd1c45..85dbeb9ecf 100644 --- a/scripts/block-coroutine-wrapper.py +++ b/scripts/block-coroutine-wrapper.py @@ -98,12 +98,13 @@ def snake_to_camel(func_name: str) -> str: def gen_wrapper(func: FuncDecl) -> str: - assert func.name.startswith('bdrv_') - assert not func.name.startswith('bdrv_co_') + assert not '_co_' in func.name assert func.return_type == 'int' assert func.args[0].type in ['BlockDriverState *', 'BdrvChild *'] - name = 'bdrv_co_' + func.name[5:] + subsystem, subname = func.name.split('_', 1) + + name = f'{subsystem}_co_{subname}' bs = 'bs' if func.args[0].type == 'BlockDriverState *' else 'child->bs' struct_name = snake_to_camel(name) |