[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 2/5] block/io: introduce bdrv_co_range_try_lock
From: |
Stefan Hajnoczi |
Subject: |
Re: [PATCH 2/5] block/io: introduce bdrv_co_range_try_lock |
Date: |
Mon, 13 Jul 2020 12:23:55 +0100 |
On Wed, Jul 08, 2020 at 06:56:53PM +0300, Vladimir Sementsov-Ogievskiy wrote:
> 07.07.2020 19:10, Stefan Hajnoczi wrote:
> > On Sat, Jun 20, 2020 at 05:36:46PM +0300, Vladimir Sementsov-Ogievskiy
> > wrote:
> > > +int coroutine_fn bdrv_co_pwrite_zeroes_locked(BdrvChild *child, int64_t
> > > offset,
> > > + int bytes,
> > > BdrvRequestFlags flags,
> > > + BdrvTrackedRequest *lock)
> >
> > The name is confusing because _locked() normally means that a mutex
> > should be held. Functions using that naming convention already exist in
> > block/io.c. It would be nice to distinguish between functions that need
> > BdrvTrackedRequest and functions that must be called with a mutex held.
> >
> > How about bdrv_co_pwrite_zeroes_with_lock()?
> >
>
> OK.
>
> May be _in_locked_range ? A bit longer, but more understandable.
Sounds good.
Stefan
signature.asc
Description: PGP signature