qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 01/12] file-posix: remove incorrect coroutine_fn calls


From: Paolo Bonzini
Subject: Re: [PATCH 01/12] file-posix: remove incorrect coroutine_fn calls
Date: Thu, 1 Jun 2023 16:22:21 +0200



Il gio 1 giu 2023, 15:50 Eric Blake <eblake@redhat.com> ha scritto:
> @@ -2696,7 +2696,7 @@ static int coroutine_fn raw_co_truncate(BlockDriverState *bs, int64_t offset,
>      }

>      if (S_ISCHR(st.st_mode) || S_ISBLK(st.st_mode)) {
> -        int64_t cur_length = raw_co_getlength(bs);
> +        int64_t cur_length = raw_getlength(bs);

Shouldn't this one still call the raw_co_getlength() wrapper?

It could, but instead I wanted to clarify that this will never suspend (because it's calling the function directly rather than bdrv_co_getlength).

Paolo 


> @@ -3245,7 +3250,7 @@ static int coroutine_fn raw_co_block_status(BlockDriverState *bs,
>           * round up if necessary.
>           */
>          if (!QEMU_IS_ALIGNED(*pnum, bs->bl.request_alignment)) {
> -            int64_t file_length = raw_co_getlength(bs);
> +            int64_t file_length = raw_getlength(bs);

Likewise this one?


>  static bool coroutine_fn cdrom_co_is_inserted(BlockDriverState *bs)
>  {
> -    return raw_co_getlength(bs) > 0;
> +    return raw_getlength(bs) > 0;
>  }

and this one?

--
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org


reply via email to

[Prev in Thread] Current Thread [Next in Thread]