On Fri, 11/06 09:42, Peter Lieven wrote:
> Signed-off-by: Peter Lieven
> ---
> block/block-backend.c | 17 +
> include/sysemu/block-backend.h | 3 +++
> 2 files changed, 12 insertions(+), 8 deletions(-)
>
> diff --git a/block/block-backend.c b/block/block-backend.c
> index 19fdaae..b13dc4e 100644
> --- a/block/block-backend.c
> +++ b/block/block-backend.c
> @@ -627,8 +627,9 @@ static void error_callback_bh(void *opaque)
> qemu_aio_unref(acb);
> }
>
> -static BlockAIOCB *abort_aio_request(BlockBackend *blk, BlockCompletionFunc
> *cb,
> - void *opaque, int ret)
> +BlockAIOCB *blk_abort_aio_request(BlockBackend *blk,
> + BlockCompletionFunc *cb,
> + void *opaque, int ret)
Parameter list identation is off by one.
> {
> struct BlockBackendAIOCB *acb;
> QEMUBH *bh;
> @@ -650,7 +651,7 @@ BlockAIOCB *blk_aio_write_zeroes(BlockBackend *blk,
> int64_t sector_num,
> {
> int ret = blk_check_request(blk, sector_num, nb_sectors);
> if (ret < 0) {
> -return abort_aio_request(blk, cb, opaque, ret);
> +return blk_abort_aio_request(blk, cb, opaque, ret);
> }
>
> return bdrv_aio_write_zeroes(blk->bs, sector_num, nb_sectors, flags,
> @@ -710,7 +711,7 @@ BlockAIOCB *blk_aio_readv(BlockBackend *blk, int64_t
> sector_num,
> {
> int ret = blk_check_request(blk, sector_num, nb_sectors);
> if (ret < 0) {
> -return abort_aio_request(blk, cb, opaque, ret);
> +return blk_abort_aio_request(blk, cb, opaque, ret);
> }
>
> return bdrv_aio_readv(blk->bs, sector_num, iov, nb_sectors, cb, opaque);
> @@ -722,7 +723,7 @@ BlockAIOCB *blk_aio_writev(BlockBackend *blk, int64_t
> sector_num,
> {
> int ret = blk_check_request(blk, sector_num, nb_sectors);
> if (ret < 0) {
> -return abort_aio_request(blk, cb, opaque, ret);
> +return blk_abort_aio_request(blk, cb, opaque, ret);
> }
>
> return bdrv_aio_writev(blk->bs, sector_num, iov, nb_sectors, cb, opaque);
> @@ -732,7 +733,7 @@ BlockAIOCB *blk_aio_flush(BlockBackend *blk,
>BlockCompletionFunc *cb, void *opaque)
> {
> if (!blk_is_available(blk)) {
> -return abort_aio_request(blk, cb, opaque, -ENOMEDIUM);
> +return blk_abort_aio_request(blk, cb, opaque, -ENOMEDIUM);
> }
>
> return bdrv_aio_flush(blk->bs, cb, opaque);
> @@ -744,7 +745,7 @@ BlockAIOCB *blk_aio_discard(BlockBackend *blk,
> {
> int ret = blk_check_request(blk, sector_num, nb_sectors);
> if (ret < 0) {
> -return abort_aio_request(blk, cb, opaque, ret);
> +return blk_abort_aio_request(blk, cb, opaque, ret);
> }
>
> return bdrv_aio_discard(blk->bs, sector_num, nb_sectors, cb, opaque);
> @@ -787,7 +788,7 @@ BlockAIOCB *blk_aio_ioctl(BlockBackend *blk, unsigned
> long int req, void *buf,
>BlockCompletionFunc *cb, void *opaque)
> {
> if (!blk_is_available(blk)) {
> -return abort_aio_request(blk, cb, opaque, -ENOMEDIUM);
> +return blk_abort_aio_request(blk, cb, opaque, -ENOMEDIUM);
> }
>
> return bdrv_aio_ioctl(blk->bs, req, buf, cb, opaque);
> diff --git a/include/sysemu/block-backend.h b/include/sysemu/block-backend.h
> index 9306a52..b5267a8 100644
> --- a/include/sysemu/block-backend.h
> +++ b/include/sysemu/block-backend.h
> @@ -180,5 +180,8 @@ int blk_save_vmstate(BlockBackend *blk, const uint8_t
> *buf,
> int blk_load_vmstate(BlockBackend *blk, uint8_t *buf, int64_t pos, int size);
> int blk_probe_blocksizes(BlockBackend *blk, BlockSizes *bsz);
> int blk_probe_geometry(BlockBackend *blk, HDGeometry *geo);
> +BlockAIOCB *blk_abort_aio_request(BlockBackend *blk,
> + BlockCompletionFunc *cb,
> + void *opaque, int ret);
>
Same here.
> #endif
> --
> 1.9.1
>
>