diff options
| author | Eric Blake <eblake@redhat.com> | 2018-04-24 14:25:01 -0500 |
|---|---|---|
| committer | Kevin Wolf <kwolf@redhat.com> | 2018-05-15 16:11:41 +0200 |
| commit | e31f6864a6d6fa072a5d02e7679d0db6d0c22311 (patch) | |
| tree | fe0b54e73ca4a39f4f49884db18392a9867476dd /scripts/qapi/types.py | |
| parent | 7803696d8557e02441a2781a19d4008b2f50925c (diff) | |
| download | focaccia-qemu-e31f6864a6d6fa072a5d02e7679d0db6d0c22311.tar.gz focaccia-qemu-e31f6864a6d6fa072a5d02e7679d0db6d0c22311.zip | |
block: Support byte-based aio callbacks
We are gradually moving away from sector-based interfaces, towards byte-based. Add new sector-based aio callbacks for read and write, to match the fact that bdrv_aio_pdiscard is already byte-based. Ideally, drivers should be converted to use coroutine callbacks rather than aio; but that is not quite as trivial (and if we were to do that conversion, the null-aio driver would disappear), so for the short term, converting the signature but keeping things with aio is easier. However, we CAN declare that a driver that uses the byte-based aio interfaces now defaults to byte-based operations, and must explicitly provide a refresh_limits override to stick with larger alignments (making the alignment issues more obvious directly in the drivers touched in the next few patches). Once all drivers are converted, the sector-based aio callbacks will be removed; in the meantime, a FIXME comment is added due to a slight inefficiency that will be touched up as part of that later cleanup. Simplify some instances of 'bs->drv' into 'drv' while touching this, since the local variable already exists to reduce typing. Signed-off-by: Eric Blake <eblake@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'scripts/qapi/types.py')
0 files changed, 0 insertions, 0 deletions