[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v5 03/15] block: add BlockJob interface for long
From: |
Kevin Wolf |
Subject: |
Re: [Qemu-devel] [PATCH v5 03/15] block: add BlockJob interface for long-running operations |
Date: |
Tue, 17 Jan 2012 14:44:28 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111115 Thunderbird/8.0 |
Am 17.01.2012 14:33, schrieb Stefan Hajnoczi:
> On Tue, Jan 17, 2012 at 1:00 PM, Kevin Wolf <address@hidden> wrote:
>> Am 13.01.2012 14:14, schrieb Stefan Hajnoczi:
>>> +typedef struct BlockJobType {
>>> + /** Derived BlockJob struct size */
>>> + size_t instance_size;
>>> +
>>> + /** String describing the operation, part of query-block-jobs QMP API
>>> */
>>> + const char *job_type;
>>> +
>>> + /** Optional callback for job types that support setting a speed limit
>>> */
>>> + int (*set_speed)(BlockJob *job, int64_t value);
>>
>> Would be worth mentioning what the unit of value is.
>
> I left this open on purpose so future block jobs could support
> block_job_set_speed with whatever unit makes sense for them. At the
> interface level it's an arbitrary int64_t. Each block job type can
> decide how to interpret the values.
I see.
> I could add "The meaning of value and its units depend on the block
> job type". Or do you think it's problematic to allow different
> meanings?
Might be confusing to have different meanings. But we can leave it open
for now and commit the comment as it is.
Kevin
[Qemu-devel] [PATCH v5 07/15] qmp: add block_job_set_speed command, Stefan Hajnoczi, 2012/01/13
[Qemu-devel] [PATCH v5 14/15] docs: describe live block operations, Stefan Hajnoczi, 2012/01/13
[Qemu-devel] [PATCH v5 11/15] block: add bdrv_find_backing_image, Stefan Hajnoczi, 2012/01/13
[Qemu-devel] [PATCH v5 10/15] blockdev: make image streaming safe across hotplug, Stefan Hajnoczi, 2012/01/13
[Qemu-devel] [PATCH v5 12/15] add QERR_BASE_NOT_FOUND, Stefan Hajnoczi, 2012/01/13
[Qemu-devel] [PATCH v5 08/15] qmp: add block_job_cancel command, Stefan Hajnoczi, 2012/01/13
[Qemu-devel] [PATCH v5 06/15] qmp: add block_stream command, Stefan Hajnoczi, 2012/01/13
[Qemu-devel] [PATCH v5 13/15] block: add support for partial streaming, Stefan Hajnoczi, 2012/01/13