[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 1/6] block: add bitmap-populate job
From: |
Kevin Wolf |
Subject: |
Re: [PATCH v3 1/6] block: add bitmap-populate job |
Date: |
Tue, 23 Jun 2020 13:50:00 +0200 |
Am 19.06.2020 um 21:56 hat Eric Blake geschrieben:
> From: John Snow <jsnow@redhat.com>
>
> 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 retrofitted into block-dirty-bitmap-merge.
>
> It was designed with different possible population patterns in mind,
> but only top layer allocation was implemented for now.
>
> Signed-off-by: John Snow <jsnow@redhat.com>
> Signed-off-by: Eric Blake <eblake@redhat.com>
> +BlockJob *bitpop_job_create(
> + const char *job_id,
> + BlockDriverState *bs,
> + BdrvDirtyBitmap *target_bitmap,
> + BitmapPattern pattern,
> + BlockdevOnError on_error,
> + int creation_flags,
> + BlockCompletionFunc *cb,
> + void *opaque,
> + JobTxn *txn,
> + Error **errp)
> +{
> + int64_t len;
> + BitpopBlockJob *job = NULL;
> + int64_t cluster_size;
> + BdrvDirtyBitmap *new_bitmap = NULL;
> +
> + assert(bs);
> + assert(target_bitmap);
> +
> + if (!bdrv_is_inserted(bs)) {
> + error_setg(errp, "Device is not inserted: %s",
> + bdrv_get_device_name(bs));
> + return NULL;
> + }
> +
> + if (bdrv_op_is_blocked(bs, BLOCK_OP_TYPE_BACKUP_SOURCE, errp)) {
> + return NULL;
> + }
So did we decide that we'll keep the legacy op blocker with the type of
another block job even though nobody could tell what it's good for?
Kevin
- [PATCH v3 0/6] block: add block-dirty-bitmap-populate job, Eric Blake, 2020/06/19
- [PATCH v3 2/6] blockdev: combine DriveBackupState and BlockdevBackupState, Eric Blake, 2020/06/19
- [PATCH v3 3/6] qmp: expose block-dirty-bitmap-populate, Eric Blake, 2020/06/19
- [PATCH v3 4/6] iotests: move bitmap helpers into their own file, Eric Blake, 2020/06/19
- [PATCH v3 5/6] iotests: add 298 for block-dirty-bitmap-populate, Eric Blake, 2020/06/19
- [PATCH v3 6/6] bitmaps: Use x- prefix for block-dirty-bitmap-popluate, Eric Blake, 2020/06/19
- Re: [PATCH v3 0/6] block: add block-dirty-bitmap-populate job, Kevin Wolf, 2020/06/23