On 11/22/2016 06:39 AM, Kevin Wolf wrote: > This enables byte granularity requests for blkdebug, and at the same > time gets us rid of another user of the BDS-level AIO emulation. > > Note that unless align=512 is specified, this can behave subtly > different from the old behaviour because bdrv_co_preadv/pwritev don't > have to perform alignment adjustments any more.
I'm a little bit surprised that you didn't have to adjust any of the qemu-iotests to add in align=512. > > Signed-off-by: Kevin Wolf <kw...@redhat.com> > --- > block/blkdebug.c | 82 > +++++++++++++++++++++++++++----------------------------- > 1 file changed, 40 insertions(+), 42 deletions(-) > @@ -426,81 +426,79 @@ static BlockAIOCB *inject_error(BlockDriverState *bs, > remove_rule(rule); > } > > - if (immediately) { > - return NULL; > + if (!immediately) { > + aio_bh_schedule_oneshot(bdrv_get_aio_context(bs), error_callback_bh, > + qemu_coroutine_self()); > + qemu_coroutine_yield(); > } > > - acb = qemu_aio_get(&blkdebug_aiocb_info, bs, cb, opaque); Squash this in to silence gcc's warning about a now-unused variable: diff --git a/block/blkdebug.c b/block/blkdebug.c index 0703ec7..acccf85 100644 --- a/block/blkdebug.c +++ b/block/blkdebug.c @@ -58,10 +58,6 @@ typedef struct BlkdebugSuspendedReq { QLIST_ENTRY(BlkdebugSuspendedReq) next; } BlkdebugSuspendedReq; -static const AIOCBInfo blkdebug_aiocb_info = { - .aiocb_size = sizeof(BlkdebugAIOCB), -}; - enum { ACTION_INJECT_ERROR, ACTION_SET_STATE, at which point you can have: Reviewed-by: Eric Blake <ebl...@redhat.com> (And now I can post my v3 blkdebug patches that have been rebased on top of this) -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature