From patchwork Sat Mar 10 08:27:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Snow X-Patchwork-Id: 10273353 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 358F5605CE for ; Sat, 10 Mar 2018 08:30:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 276C929DEA for ; Sat, 10 Mar 2018 08:30:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1A4E829E09; Sat, 10 Mar 2018 08:30:57 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9BAE529DEA for ; Sat, 10 Mar 2018 08:30:56 +0000 (UTC) Received: from localhost ([::1]:49644 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1euZu3-0003t3-I9 for patchwork-qemu-devel@patchwork.kernel.org; Sat, 10 Mar 2018 03:30:55 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53631) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1euZrL-0002Pc-Lm for qemu-devel@nongnu.org; Sat, 10 Mar 2018 03:28:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1euZrJ-0000CA-8H for qemu-devel@nongnu.org; Sat, 10 Mar 2018 03:28:07 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:56128 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1euZrD-00004v-9a; Sat, 10 Mar 2018 03:27:59 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0A36A402277B; Sat, 10 Mar 2018 08:27:55 +0000 (UTC) Received: from probe.redhat.com (ovpn-123-36.rdu2.redhat.com [10.10.123.36]) by smtp.corp.redhat.com (Postfix) with ESMTP id 94FE11049463; Sat, 10 Mar 2018 08:27:54 +0000 (UTC) From: John Snow To: qemu-block@nongnu.org Date: Sat, 10 Mar 2018 03:27:28 -0500 Message-Id: <20180310082746.24198-4-jsnow@redhat.com> In-Reply-To: <20180310082746.24198-1-jsnow@redhat.com> References: <20180310082746.24198-1-jsnow@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Sat, 10 Mar 2018 08:27:55 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Sat, 10 Mar 2018 08:27:55 +0000 (UTC) for IP:'10.11.54.3' DOMAIN:'int-mx03.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'jsnow@redhat.com' RCPT:'' X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [PATCH v5 03/21] Blockjobs: documentation touchup X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kwolf@redhat.com, John Snow , pkrempa@redhat.com, jtc@redhat.com, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Trivial; Document what the job creation flags do, and some general tidying. Signed-off-by: John Snow --- include/block/blockjob.h | 8 ++++---- include/block/blockjob_int.h | 4 +++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/include/block/blockjob.h b/include/block/blockjob.h index 29cde3ffe3..b77fac118d 100644 --- a/include/block/blockjob.h +++ b/include/block/blockjob.h @@ -127,12 +127,10 @@ typedef struct BlockJob { /** Reference count of the block job */ int refcnt; - /* True if this job has reported completion by calling block_job_completed. - */ + /** True when job has reported completion by calling block_job_completed. */ bool completed; - /* ret code passed to block_job_completed. - */ + /** ret code passed to block_job_completed. */ int ret; /** @@ -146,7 +144,9 @@ typedef struct BlockJob { } BlockJob; typedef enum BlockJobCreateFlags { + /* Default behavior */ BLOCK_JOB_DEFAULT = 0x00, + /* BlockJob is not QMP-created and should not send QMP events */ BLOCK_JOB_INTERNAL = 0x01, } BlockJobCreateFlags; diff --git a/include/block/blockjob_int.h b/include/block/blockjob_int.h index becaae74c2..259d49b32a 100644 --- a/include/block/blockjob_int.h +++ b/include/block/blockjob_int.h @@ -114,11 +114,13 @@ struct BlockJobDriver { * block_job_create: * @job_id: The id of the newly-created job, or %NULL to have one * generated automatically. - * @job_type: The class object for the newly-created job. + * @driver: The class object for the newly-created job. * @txn: The transaction this job belongs to, if any. %NULL otherwise. * @bs: The block * @perm, @shared_perm: Permissions to request for @bs * @speed: The maximum speed, in bytes per second, or 0 for unlimited. + * @flags: Creation flags for the Block Job. + * See @BlockJobCreateFlags * @cb: Completion function for the job. * @opaque: Opaque pointer value passed to @cb. * @errp: Error object.