qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Sunny Zhu <sunnyzhyy@qq.com>
To: eblake@redhat.com
Cc: hreitz@redhat.com, kwolf@redhat.com, qemu-block@nongnu.org,
	qemu-devel@nongnu.org, sunnyzhyy@qq.com
Subject: Re: [PATCH] block: change type of bytes from int to int64_t for *bdrv_aio_pdiscard
Date: Tue, 22 Apr 2025 01:33:46 +0800	[thread overview]
Message-ID: <tencent_FE7A06F963D2DD81589997B3DF66701A3806@qq.com> (raw)
In-Reply-To: <cxsasg7qiopbpwu24a6f2hponb2lv6ut5ylhcpeyagi6g6k2m5@w2c6mwuqi5ik>

Eric Blake wrote:
>On Mon, Apr 21, 2025 at 12:19:14AM +0800, Sunny Zhu wrote:
>> Keep it consistent with *bdrv_co_pdiscard.
>> 
>> Currently, there is no BlockDriver implemented the bdrv_aio_pdiscard() function,
>> so we don’t need to make any adaptations either.
>
>If there are no drivers implementing the callback, then why have it?
>I think we have been moving towards more coroutine-based callbacks and
>away from the aio callbacks; if so, should we instead be deleting this
>callback as stale code?

Yes, that makes sense. I will make the changes in the next version.

Thanks.

>
>> 
>> Signed-off-by: Sunny Zhu <sunnyzhyy@qq.com>
>> ---
>>  include/block/block_int-common.h | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git a/include/block/block_int-common.h b/include/block/block_int-common.h
>> index ebb4e56a50..4bf422d733 100644
>> --- a/include/block/block_int-common.h
>> +++ b/include/block/block_int-common.h
>> @@ -507,7 +507,7 @@ struct BlockDriver {
>>          BlockDriverState *bs, BlockCompletionFunc *cb, void *opaque);
>>  
>>      BlockAIOCB * GRAPH_RDLOCK_PTR (*bdrv_aio_pdiscard)(
>> -        BlockDriverState *bs, int64_t offset, int bytes,
>> +        BlockDriverState *bs, int64_t offset, int64_t bytes,
>>          BlockCompletionFunc *cb, void *opaque);
>>  
>>      int coroutine_fn GRAPH_RDLOCK_PTR (*bdrv_co_readv)(BlockDriverState *bs,
>> -- 
>> 2.43.0
>> 
>> 
>
>-- 
>Eric Blake, Principal Software Engineer
>Red Hat, Inc.
>Virtualization:  qemu.org | libguestfs.org



  reply	other threads:[~2025-04-21 17:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-20 16:19 [PATCH] block: change type of bytes from int to int64_t for *bdrv_aio_pdiscard Sunny Zhu
2025-04-21 15:03 ` Eric Blake
2025-04-21 17:33   ` Sunny Zhu [this message]
2025-04-22  7:11   ` Philippe Mathieu-Daudé
2025-04-24 17:40     ` Eric Blake
2025-04-25 15:36       ` Kevin Wolf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tencent_FE7A06F963D2DD81589997B3DF66701A3806@qq.com \
    --to=sunnyzhyy@qq.com \
    --cc=eblake@redhat.com \
    --cc=hreitz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).