From patchwork Fri Jan 19 20:58:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Snow X-Patchwork-Id: 10175985 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 0C81B602B1 for ; Fri, 19 Jan 2018 21:00:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 043AB287C9 for ; Fri, 19 Jan 2018 21:00:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ECA6A287F3; Fri, 19 Jan 2018 21:00:42 +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 8AB8C287C9 for ; Fri, 19 Jan 2018 21:00:42 +0000 (UTC) Received: from localhost ([::1]:44736 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ecdmD-00037S-KI for patchwork-qemu-devel@patchwork.kernel.org; Fri, 19 Jan 2018 16:00:41 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46307) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ecdkd-0001Wx-I8 for qemu-devel@nongnu.org; Fri, 19 Jan 2018 15:59:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ecdkc-0005vM-Qo for qemu-devel@nongnu.org; Fri, 19 Jan 2018 15:59:03 -0500 Received: from mx1.redhat.com ([209.132.183.28]:35178) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ecdkZ-0005ti-Tr; Fri, 19 Jan 2018 15:59:00 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E833AC056826; Fri, 19 Jan 2018 20:58:58 +0000 (UTC) Received: from probe.bos.redhat.com (dhcp-17-231.bos.redhat.com [10.18.17.231]) by smtp.corp.redhat.com (Postfix) with ESMTP id 32B585C1B7; Fri, 19 Jan 2018 20:58:57 +0000 (UTC) From: John Snow To: qemu-block@nongnu.org Date: Fri, 19 Jan 2018 15:58:36 -0500 Message-Id: <20180119205847.7141-3-jsnow@redhat.com> In-Reply-To: <20180119205847.7141-1-jsnow@redhat.com> References: <20180119205847.7141-1-jsnow@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Fri, 19 Jan 2018 20:58:59 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v2 02/13] blockjob: consolidate SLICE_TIME definition 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, jcody@redhat.com, qemu-devel@nongnu.org, mreitz@redhat.com, stefanha@redhat.com, John Snow Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP They're all the same. If it actually becomes important to configure it, it can become a job or driver property. Signed-off-by: John Snow Reviewed-by: Paolo Bonzini Reviewed-by: Stefan Hajnoczi Reviewed-by: Jeff Cody --- block/backup.c | 1 - block/commit.c | 2 -- block/mirror.c | 1 - block/stream.c | 2 -- include/block/blockjob_int.h | 2 ++ 5 files changed, 2 insertions(+), 6 deletions(-) diff --git a/block/backup.c b/block/backup.c index 4a16a37229..7b1cdd038a 100644 --- a/block/backup.c +++ b/block/backup.c @@ -27,7 +27,6 @@ #include "qemu/error-report.h" #define BACKUP_CLUSTER_SIZE_DEFAULT (1 << 16) -#define SLICE_TIME 100000000ULL /* ns */ typedef struct BackupBlockJob { BlockJob common; diff --git a/block/commit.c b/block/commit.c index bb6c904704..898545b318 100644 --- a/block/commit.c +++ b/block/commit.c @@ -31,8 +31,6 @@ enum { COMMIT_BUFFER_SIZE = 512 * 1024, /* in bytes */ }; -#define SLICE_TIME 100000000ULL /* ns */ - typedef struct CommitBlockJob { BlockJob common; RateLimit limit; diff --git a/block/mirror.c b/block/mirror.c index 88f4e8964d..1fb5fc0cb8 100644 --- a/block/mirror.c +++ b/block/mirror.c @@ -22,7 +22,6 @@ #include "qemu/ratelimit.h" #include "qemu/bitmap.h" -#define SLICE_TIME 100000000ULL /* ns */ #define MAX_IN_FLIGHT 16 #define MAX_IO_BYTES (1 << 20) /* 1 Mb */ #define DEFAULT_MIRROR_BUF_SIZE (MAX_IN_FLIGHT * MAX_IO_BYTES) diff --git a/block/stream.c b/block/stream.c index 499cdacdb0..e85af18c54 100644 --- a/block/stream.c +++ b/block/stream.c @@ -29,8 +29,6 @@ enum { STREAM_BUFFER_SIZE = 512 * 1024, /* in bytes */ }; -#define SLICE_TIME 100000000ULL /* ns */ - typedef struct StreamBlockJob { BlockJob common; RateLimit limit; diff --git a/include/block/blockjob_int.h b/include/block/blockjob_int.h index c9b23b0cc9..209fa1bb3e 100644 --- a/include/block/blockjob_int.h +++ b/include/block/blockjob_int.h @@ -29,6 +29,8 @@ #include "block/blockjob.h" #include "block/block.h" +#define SLICE_TIME 100000000ULL /* ns */ + /** * BlockJobDriver: *