Re: [PATCH RFC v2 1/5] block: add bitmap-populate job

2020-06-17 Thread Kevin Wolf
Am 16.06.2020 um 22:02 hat Eric Blake geschrieben: > On 6/16/20 2:46 PM, Eric Blake wrote: > > > > > +BlockJob *bitpop_job_create( > > > > > > +    if (bdrv_op_is_blocked(bs, BLOCK_OP_TYPE_BACKUP_SOURCE, errp)) { > > > > +        return NULL; > > > > +    } > > > > > > What does

Re: [PATCH RFC v2 1/5] block: add bitmap-populate job

2020-06-16 Thread Eric Blake
On 6/16/20 2:46 PM, Eric Blake wrote: +BlockJob *bitpop_job_create( +    if (bdrv_op_is_blocked(bs, BLOCK_OP_TYPE_BACKUP_SOURCE, errp)) { +    return NULL; +    } What does this protect? And why does BACKUP_SOURCE describe acccurately what this job does? I'm less certain what the

Re: [PATCH RFC v2 1/5] block: add bitmap-populate job

2020-06-16 Thread John Snow
On 6/16/20 3:46 PM, Eric Blake wrote: > I'm less certain what the BLOCK_OP_TYPE_* constants are supposed to > block, or if this is just copy/paste from backup.c. Does BlockOpType in > block.h need a new entry? Copy paste. I wasn't sure myself.

Re: [PATCH RFC v2 1/5] block: add bitmap-populate job

2020-06-16 Thread Eric Blake
On 6/4/20 4:01 AM, Kevin Wolf wrote: Am 14.05.2020 um 05:49 hat John Snow geschrieben: This job copies the allocation map into a bitmap. It's a job because there's no guarantee that allocation interrogation will be quick (or won't hang), so it cannot be retrofit into block-dirty-bitmap-merge.

Re: [PATCH RFC v2 1/5] block: add bitmap-populate job

2020-06-08 Thread Kevin Wolf
Am 08.06.2020 um 12:00 hat Vladimir Sementsov-Ogievskiy geschrieben: > 08.06.2020 12:21, Kevin Wolf wrote: > > Am 06.06.2020 um 08:55 hat Vladimir Sementsov-Ogievskiy geschrieben: > > > Allowing to use one target for several populating job is an > > > interesting idea. Current series does > > >

Re: [PATCH RFC v2 1/5] block: add bitmap-populate job

2020-06-08 Thread Peter Krempa
On Mon, Jun 08, 2020 at 13:30:48 +0300, Vladimir Sementsov-Ogievskiy wrote: > 08.06.2020 12:38, Peter Krempa wrote: > > On Sat, Jun 06, 2020 at 09:55:13 +0300, Vladimir Sementsov-Ogievskiy wrote: > > > 05.06.2020 13:59, Peter Krempa wrote: [...] > > > > It's not only a "user forgot" thing, but

Re: [PATCH RFC v2 1/5] block: add bitmap-populate job

2020-06-08 Thread Vladimir Sementsov-Ogievskiy
08.06.2020 12:38, Peter Krempa wrote: On Sat, Jun 06, 2020 at 09:55:13 +0300, Vladimir Sementsov-Ogievskiy wrote: 05.06.2020 13:59, Peter Krempa wrote: On Fri, Jun 05, 2020 at 12:07:47 +0200, Kevin Wolf wrote: Am 05.06.2020 um 11:58 hat Peter Krempa geschrieben: On Fri, Jun 05, 2020 at

Re: [PATCH RFC v2 1/5] block: add bitmap-populate job

2020-06-08 Thread Vladimir Sementsov-Ogievskiy
08.06.2020 12:21, Kevin Wolf wrote: Am 06.06.2020 um 08:55 hat Vladimir Sementsov-Ogievskiy geschrieben: 05.06.2020 13:59, Peter Krempa wrote: On Fri, Jun 05, 2020 at 12:07:47 +0200, Kevin Wolf wrote: Am 05.06.2020 um 11:58 hat Peter Krempa geschrieben: On Fri, Jun 05, 2020 at 11:44:07

Re: [PATCH RFC v2 1/5] block: add bitmap-populate job

2020-06-08 Thread Peter Krempa
On Sat, Jun 06, 2020 at 09:55:13 +0300, Vladimir Sementsov-Ogievskiy wrote: > 05.06.2020 13:59, Peter Krempa wrote: > > On Fri, Jun 05, 2020 at 12:07:47 +0200, Kevin Wolf wrote: > > > Am 05.06.2020 um 11:58 hat Peter Krempa geschrieben: > > > > On Fri, Jun 05, 2020 at 11:44:07 +0200, Kevin Wolf

Re: [PATCH RFC v2 1/5] block: add bitmap-populate job

2020-06-08 Thread Kevin Wolf
Am 06.06.2020 um 08:55 hat Vladimir Sementsov-Ogievskiy geschrieben: > 05.06.2020 13:59, Peter Krempa wrote: > > On Fri, Jun 05, 2020 at 12:07:47 +0200, Kevin Wolf wrote: > > > Am 05.06.2020 um 11:58 hat Peter Krempa geschrieben: > > > > On Fri, Jun 05, 2020 at 11:44:07 +0200, Kevin Wolf wrote: >

Re: [PATCH RFC v2 1/5] block: add bitmap-populate job

2020-06-06 Thread Vladimir Sementsov-Ogievskiy
05.06.2020 13:59, Peter Krempa wrote: On Fri, Jun 05, 2020 at 12:07:47 +0200, Kevin Wolf wrote: Am 05.06.2020 um 11:58 hat Peter Krempa geschrieben: On Fri, Jun 05, 2020 at 11:44:07 +0200, Kevin Wolf wrote: [...] The above was actually inspired by a very recent problem I have in my attempt

Re: [PATCH RFC v2 1/5] block: add bitmap-populate job

2020-06-05 Thread Peter Krempa
On Fri, Jun 05, 2020 at 12:07:47 +0200, Kevin Wolf wrote: > Am 05.06.2020 um 11:58 hat Peter Krempa geschrieben: > > On Fri, Jun 05, 2020 at 11:44:07 +0200, Kevin Wolf wrote: [...] > > The above was actually inspired by a very recent problem I have in my > > attempt to use the dirty bitmap

Re: [PATCH RFC v2 1/5] block: add bitmap-populate job

2020-06-05 Thread Kevin Wolf
Am 05.06.2020 um 11:58 hat Peter Krempa geschrieben: > On Fri, Jun 05, 2020 at 11:44:07 +0200, Kevin Wolf wrote: > > Am 05.06.2020 um 11:24 hat Peter Krempa geschrieben: > > > On Fri, Jun 05, 2020 at 11:01:23 +0200, Kevin Wolf wrote: > > > > Am 04.06.2020 um 18:22 hat Peter Krempa geschrieben: > >

Re: [PATCH RFC v2 1/5] block: add bitmap-populate job

2020-06-05 Thread Peter Krempa
On Fri, Jun 05, 2020 at 11:44:07 +0200, Kevin Wolf wrote: > Am 05.06.2020 um 11:24 hat Peter Krempa geschrieben: > > On Fri, Jun 05, 2020 at 11:01:23 +0200, Kevin Wolf wrote: > > > Am 04.06.2020 um 18:22 hat Peter Krempa geschrieben: > > > > On Thu, Jun 04, 2020 at 13:31:45 +0200, Kevin Wolf

Re: [PATCH RFC v2 1/5] block: add bitmap-populate job

2020-06-05 Thread Kevin Wolf
Am 05.06.2020 um 11:24 hat Peter Krempa geschrieben: > On Fri, Jun 05, 2020 at 11:01:23 +0200, Kevin Wolf wrote: > > Am 04.06.2020 um 18:22 hat Peter Krempa geschrieben: > > > On Thu, Jun 04, 2020 at 13:31:45 +0200, Kevin Wolf wrote: > > > > Am 04.06.2020 um 11:16 hat Peter Krempa geschrieben: > >

Re: [PATCH RFC v2 1/5] block: add bitmap-populate job

2020-06-05 Thread Peter Krempa
On Fri, Jun 05, 2020 at 11:01:23 +0200, Kevin Wolf wrote: > Am 04.06.2020 um 18:22 hat Peter Krempa geschrieben: > > On Thu, Jun 04, 2020 at 13:31:45 +0200, Kevin Wolf wrote: > > > Am 04.06.2020 um 11:16 hat Peter Krempa geschrieben: > > > > On Thu, Jun 04, 2020 at 11:12:31 +0200, Kevin Wolf

Re: [PATCH RFC v2 1/5] block: add bitmap-populate job

2020-06-05 Thread Kevin Wolf
Am 04.06.2020 um 18:22 hat Peter Krempa geschrieben: > On Thu, Jun 04, 2020 at 13:31:45 +0200, Kevin Wolf wrote: > > Am 04.06.2020 um 11:16 hat Peter Krempa geschrieben: > > > On Thu, Jun 04, 2020 at 11:12:31 +0200, Kevin Wolf wrote: > > > > Am 18.05.2020 um 22:49 hat Eric Blake geschrieben: > > >

Re: [PATCH RFC v2 1/5] block: add bitmap-populate job

2020-06-04 Thread Peter Krempa
On Thu, Jun 04, 2020 at 13:31:45 +0200, Kevin Wolf wrote: > Am 04.06.2020 um 11:16 hat Peter Krempa geschrieben: > > On Thu, Jun 04, 2020 at 11:12:31 +0200, Kevin Wolf wrote: > > > Am 18.05.2020 um 22:49 hat Eric Blake geschrieben: > > > > > + > > > > > +/* NB: new bitmap is anonymous and

Re: [PATCH RFC v2 1/5] block: add bitmap-populate job

2020-06-04 Thread Kevin Wolf
Am 04.06.2020 um 11:16 hat Peter Krempa geschrieben: > On Thu, Jun 04, 2020 at 11:12:31 +0200, Kevin Wolf wrote: > > Am 18.05.2020 um 22:49 hat Eric Blake geschrieben: > > > > + > > > > +/* NB: new bitmap is anonymous and enabled */ > > > > +cluster_size =

Re: [PATCH RFC v2 1/5] block: add bitmap-populate job

2020-06-04 Thread Peter Krempa
On Thu, Jun 04, 2020 at 11:12:31 +0200, Kevin Wolf wrote: > Am 18.05.2020 um 22:49 hat Eric Blake geschrieben: > > > + > > > +/* NB: new bitmap is anonymous and enabled */ > > > +cluster_size = bdrv_dirty_bitmap_granularity(target_bitmap); > > > +new_bitmap =

Re: [PATCH RFC v2 1/5] block: add bitmap-populate job

2020-06-04 Thread Kevin Wolf
Am 18.05.2020 um 22:49 hat Eric Blake geschrieben: > > + > > +/* NB: new bitmap is anonymous and enabled */ > > +cluster_size = bdrv_dirty_bitmap_granularity(target_bitmap); > > +new_bitmap = bdrv_create_dirty_bitmap(bs, cluster_size, NULL, errp); > > +if (!new_bitmap) { > > +

Re: [PATCH RFC v2 1/5] block: add bitmap-populate job

2020-06-04 Thread Kevin Wolf
Am 14.05.2020 um 05:49 hat John Snow geschrieben: > This job copies the allocation map into a bitmap. It's a job because > there's no guarantee that allocation interrogation will be quick (or > won't hang), so it cannot be retrofit into block-dirty-bitmap-merge. > > It was designed with different

Re: [PATCH RFC v2 1/5] block: add bitmap-populate job

2020-05-19 Thread Peter Krempa
On Mon, May 18, 2020 at 15:49:02 -0500, Eric Blake wrote: > On 5/13/20 10:49 PM, John Snow wrote: [...] > > + > > +/* NB: new bitmap is anonymous and enabled */ > > +cluster_size = bdrv_dirty_bitmap_granularity(target_bitmap); > > +new_bitmap = bdrv_create_dirty_bitmap(bs,

Re: [PATCH RFC v2 1/5] block: add bitmap-populate job

2020-05-18 Thread Eric Blake
On 5/13/20 10:49 PM, John Snow wrote: This job copies the allocation map into a bitmap. It's a job because there's no guarantee that allocation interrogation will be quick (or won't hang), so it cannot be retrofit into block-dirty-bitmap-merge. retrofitted It was designed with different

[PATCH RFC v2 1/5] block: add bitmap-populate job

2020-05-13 Thread John Snow
This job copies the allocation map into a bitmap. It's a job because there's no guarantee that allocation interrogation will be quick (or won't hang), so it cannot be retrofit into block-dirty-bitmap-merge. It was designed with different possible population patterns in mind, but only top layer