[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/2] io/block: Refactoring the bdrv_drained_begin() function
From: |
Stefan Hajnoczi |
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 |
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
signature.asc
Description: PGP signature