Message ID | 20180723201748.25573-54-mdroth@linux.vnet.ibm.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 82930112E for <patchwork-qemu-devel@patchwork.kernel.org>; Mon, 23 Jul 2018 21:06:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7057828450 for <patchwork-qemu-devel@patchwork.kernel.org>; Mon, 23 Jul 2018 21:06:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 63316284A7; Mon, 23 Jul 2018 21:06:38 +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=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID 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 EEFA628450 for <patchwork-qemu-devel@patchwork.kernel.org>; Mon, 23 Jul 2018 21:06:37 +0000 (UTC) Received: from localhost ([::1]:36631 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org>) id 1fhi2P-0002n9-3o for patchwork-qemu-devel@patchwork.kernel.org; Mon, 23 Jul 2018 17:06:37 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42149) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <flukshun@gmail.com>) id 1fhhJk-0002wf-D7 for qemu-devel@nongnu.org; Mon, 23 Jul 2018 16:20:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <flukshun@gmail.com>) id 1fhhJi-0004ix-Kc for qemu-devel@nongnu.org; Mon, 23 Jul 2018 16:20:28 -0400 Received: from mail-oi0-x22d.google.com ([2607:f8b0:4003:c06::22d]:33578) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from <flukshun@gmail.com>) id 1fhhJi-0004id-9R; Mon, 23 Jul 2018 16:20:26 -0400 Received: by mail-oi0-x22d.google.com with SMTP id l10-v6so3502204oii.0; Mon, 23 Jul 2018 13:20:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=2NCI05YrlmA0ejKuml36wSlszTeWhz3k1PhwBumEZuI=; b=EW234pbTvBmSKMMoorCLyQovnVr/cm5d+yu6RRA2vCIGOIeRF2Lg9kxxpOO+MLtkt8 gKs1a++cUsx3wWByAK41KhhVTwB1vQZezY/+oqhwxGy8TxPGD/x2Px0flfRQOg0Amr5g HxvtBuz3z/mcR4iRsDC7sphz08AsCv4qFdFDxPrUDsL8Xcr6OXlNM2+6aYMFqMM5Po2P PkaUI0MOPSY3PYXBOrueU8P3Hb9LVk6AjEnGSWeInaKXsyzdTnOWCt5AE2lhfWH6VKDW HztC6Y81ofafjA4dt1scGm4aJkKv7ensTIiIrhU6oTMFirHcAs7hCHkcdHcSUqeFauYa 3ZPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=2NCI05YrlmA0ejKuml36wSlszTeWhz3k1PhwBumEZuI=; b=qLJAggoV0JKhpEfTw2Bn+4xBe9D05Zdvs3F9A59WN0lLC0i/j2+UfbHFJuMIKRzXFg YG+rjWOq0Wz7DnyvCC0Q3UUqU3D1KFQdb1YzNjr1bH38fRZm/6gx7uIIr6pwVaAbEtGX RzNiaLNS6ldCFQXIsN/z79FyZWJyq41j6X1knSg1mopB5gbrg5EytKBcnHbLw9OyaD3/ Xe5Jd04cBoEAi0SnRGkE43vOB10xbwx7m9flOU3jxujGhrvxjH6nJ7yMVYBUA2+gdE52 sFV1AOf6uDD/fFR2/PmVguUAjUma6UdrgqsZ422v51IhBJcKtwNHVEb1FPjdelZaMaDp +PTA== X-Gm-Message-State: AOUpUlEo5+DrUOGIwjEks1CklI4ZL9BjzVVjKY70Y/Z/0+7bD9I4mH2s 5lwxkcGTb3DE+jjX2kXVhWEUYDzZ7Po= X-Google-Smtp-Source: AAOMgpe3+51AzWCwQn9MNXJ8qavCJw/zVe6kOd2antnT8dJkVwpEJpSPrcZnW2HglxQ02mDC1EaX+Q== X-Received: by 2002:aca:d5d3:: with SMTP id m202-v6mr283303oig.93.1532377225098; Mon, 23 Jul 2018 13:20:25 -0700 (PDT) Received: from localhost (76-251-165-188.lightspeed.austtx.sbcglobal.net. [76.251.165.188]) by smtp.gmail.com with ESMTPSA id u18-v6sm6620552oiv.10.2018.07.23.13.20.23 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 23 Jul 2018 13:20:24 -0700 (PDT) From: Michael Roth <mdroth@linux.vnet.ibm.com> To: qemu-devel@nongnu.org Date: Mon, 23 Jul 2018 15:17:02 -0500 Message-Id: <20180723201748.25573-54-mdroth@linux.vnet.ibm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180723201748.25573-1-mdroth@linux.vnet.ibm.com> References: <20180723201748.25573-1-mdroth@linux.vnet.ibm.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4003:c06::22d Subject: [Qemu-devel] [PATCH 53/99] block/mirror: honor ratelimit again X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <http://lists.nongnu.org/archive/html/qemu-devel/> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Cc: Kevin Wolf <kwolf@redhat.com>, Liang Li <liliang.opensource@gmail.com>, qemu-stable@nongnu.org, Stefan Hajnoczi <stefanha@redhat.com>, Jeff Cody <jcody@redhat.com> Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org> X-Virus-Scanned: ClamAV using ClamSMTP |
Series |
Patch Round-up for stable 2.12.1, freeze on 2018-07-30
|
expand
|
diff --git a/block/mirror.c b/block/mirror.c index 820f512c7b..9436a8d5ee 100644 --- a/block/mirror.c +++ b/block/mirror.c @@ -868,12 +868,14 @@ static void coroutine_fn mirror_run(void *opaque) } ret = 0; + + if (s->synced && !should_complete) { + delay_ns = (s->in_flight == 0 && cnt == 0 ? SLICE_TIME : 0); + } trace_mirror_before_sleep(s, cnt, s->synced, delay_ns); + block_job_sleep_ns(&s->common, delay_ns); if (block_job_is_cancelled(&s->common) && s->common.force) { break; - } else if (!should_complete) { - delay_ns = (s->in_flight == 0 && cnt == 0 ? SLICE_TIME : 0); - block_job_sleep_ns(&s->common, delay_ns); } s->last_pause_ns = qemu_clock_get_ns(QEMU_CLOCK_REALTIME); } diff --git a/tests/qemu-iotests/185.out b/tests/qemu-iotests/185.out index 2c4b04de73..992162f418 100644 --- a/tests/qemu-iotests/185.out +++ b/tests/qemu-iotests/185.out @@ -36,9 +36,9 @@ Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 size=67108864 backing_file=TEST_DIR/t.q {"return": {}} Formatting 'TEST_DIR/t.qcow2.copy', fmt=qcow2 size=67108864 cluster_size=65536 lazy_refcounts=off refcount_bits=16 {"return": {}} -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_JOB_READY", "data": {"device": "disk", "len": 4194304, "offset": 4194304, "speed": 65536, "type": "mirror"}} {"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}} +{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_JOB_READY", "data": {"device": "disk", "len": 4194304, "offset": 4194304, "speed": 65536, "type": "mirror"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_JOB_COMPLETED", "data": {"device": "disk", "len": 4194304, "offset": 4194304, "speed": 65536, "type": "mirror"}} === Start backup job and exit qemu ===