qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@redhat.com>
To: zoudongjie <zoudongjie@huawei.com>
Cc: fam@euphon.net, hreitz@redhat.com, kwolf@redhat.com,
	qemu-block@nongnu.org, qemu-devel@nongnu.org,
	qemu-stable@nongnu.org, zhuyangyang14@huawei.com,
	luolongmin@huawei.com, suxiaodong1@huawei.com,
	wangyan122@huawei.com, yebiaoxiang@huawei.com,
	wangjian161@huawei.com, mujinsheng@huawei.com,
	alex.chen@huawei.com, eric.fangyi@huawei.com,
	chenjianfei3@huawei.com, renxuming@huawei.com
Subject: Re: [PATCH 1/2] io/block: Refactoring the bdrv_drained_begin() function and implement a timeout mechanism.
Date: Mon, 17 Mar 2025 10:57:18 -0400	[thread overview]
Message-ID: <20250317145718.GA1214048@fedora> (raw)
In-Reply-To: <20250317121828.4069621-1-zoudongjie@huawei.com>

[-- Attachment #1: Type: text/plain, Size: 1285 bytes --]

On Mon, Mar 17, 2025 at 08:18:28PM +0800, zoudongjie wrote:
> On Thu, 13 Mar, 2025 at 12:09:45 +0800, Stefan Hajnoczi wrote:
> > On Sat, Mar 08, 2025 at 06:16:17PM +0800, zoudongjie wrote:
> > > @@ -342,16 +350,25 @@ static void coroutine_fn bdrv_co_yield_to_drain(BlockDriverState *bs,
> > >      /* If we are resumed from some other event (such as an aio completion or a
> > >       * timer callback), it is a bug in the caller that should be fixed. */
> > >      assert(data.done);
> > > +    return data.ret;
> > >  }
> > >  
> > > -static void bdrv_do_drained_begin(BlockDriverState *bs, BdrvChild *parent,
> > > -                                  bool poll)
> > > +static void coroutine_fn bdrv_co_yield_to_drain(BlockDriverState *bs,
> > > +                                                bool begin,
> > > +                                                BdrvChild *parent,
> > > +                                                bool poll)
> > > +{
> > > +    bdrv_co_yield_to_drain_timeout(bs, begin, parent, poll, -1);
> > 
> > Is this safe on 32-bit platforms?
> 
> I'm sorry, can it be more specific here, I didn't get it.

I was thinking about -1 vs -1ull integer literals, but it's not a
problem for int64_t so everything is fine here.

Stefan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2025-03-17 14:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-08 10:16 [PATCH 0/2] qapi: Fix qmp_block_set_io_throttle blocked for too long zoudongjie via
2025-03-08 10:16 ` [PATCH 1/2] io/block: Refactoring the bdrv_drained_begin() function and implement a timeout mechanism zoudongjie via
2025-03-13  4:09   ` Stefan Hajnoczi
2025-03-17 12:18     ` zoudongjie via
2025-03-17 14:57       ` Stefan Hajnoczi [this message]
2025-03-13  4:22   ` Stefan Hajnoczi
2025-03-08 10:16 ` [PATCH 2/2] qapi: Fix qmp_block_set_io_throttle blocked for too long zoudongjie via
2025-03-13  4:25   ` Stefan Hajnoczi
2025-03-17 12:59     ` zoudongjie via
2025-03-11  3:24 ` [PATCH 0/2] " zoudongjie via
2025-03-13  4:27 ` Stefan Hajnoczi

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=20250317145718.GA1214048@fedora \
    --to=stefanha@redhat.com \
    --cc=alex.chen@huawei.com \
    --cc=chenjianfei3@huawei.com \
    --cc=eric.fangyi@huawei.com \
    --cc=fam@euphon.net \
    --cc=hreitz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=luolongmin@huawei.com \
    --cc=mujinsheng@huawei.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-stable@nongnu.org \
    --cc=renxuming@huawei.com \
    --cc=suxiaodong1@huawei.com \
    --cc=wangjian161@huawei.com \
    --cc=wangyan122@huawei.com \
    --cc=yebiaoxiang@huawei.com \
    --cc=zhuyangyang14@huawei.com \
    --cc=zoudongjie@huawei.com \
    /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).