On 03/15/2016 02:04 PM, Vladimir Sementsov-Ogievskiy wrote:
> This function stores block dirty bitmap to qcow2. If the bitmap with
> the same name, size and granularity already exists, it will be
> rewritten, if the bitmap with the same name exists but granularity or
> size does not match, an error will be genrated.

s/genrated/generated/

> 
> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsement...@virtuozzo.com>
> ---

> +
> +/* if no id is provided, a new one is constructed */
> +static int qcow2_bitmap_create(BlockDriverState *bs, const char *name,
> +                               uint64_t size, int granularity)
> +{
> +    int ret;
> +    BDRVQcow2State *s = bs->opaque;
> +
> +    if (s->nb_bitmaps >= QCOW_MAX_DIRTY_BITMAPS) {
> +        return -EFBIG;
> +    }
> +
> +    /* Check that the name is unique */
> +    if (find_bitmap_by_name(bs, name) != NULL) {
> +        return -EEXIST;
> +    }
> +

Is the comment about constructing a name stale or misplaced?

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to