On Tue, Jan 17, 2012 at 1:00 PM, Kevin Wolf <kw...@redhat.com> 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 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? Stefan