From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:48716) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rn9Hk-0005kM-Sa for qemu-devel@nongnu.org; Tue, 17 Jan 2012 08:41:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rn9Hg-0004XI-Ld for qemu-devel@nongnu.org; Tue, 17 Jan 2012 08:41:12 -0500 Received: from mx1.redhat.com ([209.132.183.28]:55128) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rn9Hg-0004X6-Do for qemu-devel@nongnu.org; Tue, 17 Jan 2012 08:41:08 -0500 Message-ID: <4F157B3C.4070501@redhat.com> Date: Tue, 17 Jan 2012 14:44:28 +0100 From: Kevin Wolf MIME-Version: 1.0 References: <1326460457-19446-1-git-send-email-stefanha@linux.vnet.ibm.com> <1326460457-19446-4-git-send-email-stefanha@linux.vnet.ibm.com> <4F1570FA.6020501@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v5 03/15] block: add BlockJob interface for long-running operations List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Luiz Capitulino , Marcelo Tosatti , Stefan Hajnoczi , qemu-devel@nongnu.org Am 17.01.2012 14:33, schrieb Stefan Hajnoczi: > On Tue, Jan 17, 2012 at 1:00 PM, Kevin Wolf 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