Re: [PATCH 2/5] block/io: introduce bdrv_co_range_try_lock

2020-07-13 Thread Stefan Hajnoczi
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 > > > offse

Re: [PATCH 2/5] block/io: introduce bdrv_co_range_try_lock

2020-07-08 Thread Vladimir Sementsov-Ogievskiy
07.07.2020 19:10, Stefan Hajnoczi wrote: On Sat, Jun 20, 2020 at 05:36:46PM +0300, Vladimir Sementsov-Ogievskiy wrote: @@ -83,6 +84,12 @@ typedef struct BdrvTrackedRequest { CoQueue wait_queue; /* coroutines blocked on this request */ struct BdrvTrackedRequest *waiting_for; + +

Re: [PATCH 2/5] block/io: introduce bdrv_co_range_try_lock

2020-07-07 Thread Stefan Hajnoczi
On Sat, Jun 20, 2020 at 05:36:46PM +0300, Vladimir Sementsov-Ogievskiy wrote: > @@ -83,6 +84,12 @@ typedef struct BdrvTrackedRequest { > CoQueue wait_queue; /* coroutines blocked on this request */ > > struct BdrvTrackedRequest *waiting_for; > + > +/* > + * If non-zero, the requ

[PATCH 2/5] block/io: introduce bdrv_co_range_try_lock

2020-06-20 Thread Vladimir Sementsov-Ogievskiy
Introduce an interface to make a "critical section" on top of serialising requests feature. This is needed to avoid intersecting with other requests during a set of operations. Will be used in a next commit to implement preallocate filter. To keep assertions during intersecting requests handling,