From nobody Mon Feb 9 23:18:16 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1668514483; cv=none; d=zohomail.com; s=zohoarc; b=O/U8YPBRwtmg6ZtHL93QvgzeiwjgCVdwumbpQn5wH7hDxLX7jh7SKBIbPoAPJLGYKTkAJpAXIwiiCyQnyihXGSa+ZD4emE5XE09oq02C1LrGNNE+KZ8oonMymNnPegjMYSFIAOLf0tQ1LCxdq465TDI1FsdRzXNoLsV0JY6BysA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1668514483; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=shYvfY1m4aFGTKlg3Ec60OJ8M+Vs1dd+K/kBHRLF7PM=; b=ezDv2Olk5nB4NDNqTXkMddXpivZAz/MvHsOy8LYdV8coREIRedRkJX6jyu8gZgHZoEo84fOratqlp1M+Us8GtJxJYT8Q/v8FRyuzO6a6ArbYRGsSSZr/ATfdMFMR8Nd/ZXCx41u45RGo24OGcAUA+z3pBC9vpxxM58oK4qBWOQo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1668514483983436.7426860720037; Tue, 15 Nov 2022 04:14:43 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ouupU-0005tk-EO; Tue, 15 Nov 2022 07:14:16 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ouupS-0005q4-4y for qemu-devel@nongnu.org; Tue, 15 Nov 2022 07:14:14 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ouupP-0004s1-QJ for qemu-devel@nongnu.org; Tue, 15 Nov 2022 07:14:13 -0500 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-53-kFpQr76QOtGchEoqWgeD2g-1; Tue, 15 Nov 2022 07:14:06 -0500 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 6369D3C025B2; Tue, 15 Nov 2022 12:14:06 +0000 (UTC) Received: from secure.mitica (unknown [10.39.195.11]) by smtp.corp.redhat.com (Postfix) with ESMTP id DEBA1492B05; Tue, 15 Nov 2022 12:14:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1668514451; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=shYvfY1m4aFGTKlg3Ec60OJ8M+Vs1dd+K/kBHRLF7PM=; b=J1oPs1zXrd3Cd1FmosyyKpmaoMD9Il1XxLUHEUV6XtbF1QJAYMLpsZKHPe3MSB58J5+5al BQI7pqJi9USH9pNlolio8BDDL1j/AgKIRL18QOMQf5fRqsDqvCQaeiUy1QfLh1fG489o5T B+xdFdIt5thInTHqXYK4HftKskka8nM= X-MC-Unique: kFpQr76QOtGchEoqWgeD2g-1 From: Juan Quintela To: qemu-devel@nongnu.org Cc: Paolo Bonzini , David Hildenbrand , Laurent Vivier , Stefan Hajnoczi , Fam Zheng , qemu-block@nongnu.org, "Dr. David Alan Gilbert" , Thomas Huth , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , qemu-trivial@nongnu.org, Michael Tokarev , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Peter Xu , Juan Quintela Subject: [PATCH 30/30] migration: Block migration comment or code is wrong Date: Tue, 15 Nov 2022 13:12:26 +0100 Message-Id: <20221115121226.26609-31-quintela@redhat.com> In-Reply-To: <20221115121226.26609-1-quintela@redhat.com> References: <20221115121226.26609-1-quintela@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=quintela@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1668514485289100003 Content-Type: text/plain; charset="utf-8" And it appears that what is wrong is the code. During bulk stage we need to make sure that some block is dirty, but no games with max_size at all. Signed-off-by: Juan Quintela Reviewed-by: Stefan Hajnoczi --- migration/block.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/migration/block.c b/migration/block.c index 3577c815a9..4347da1526 100644 --- a/migration/block.c +++ b/migration/block.c @@ -880,8 +880,8 @@ static void block_save_pending(QEMUFile *f, void *opaqu= e, uint64_t max_size, blk_mig_unlock(); =20 /* Report at least one block pending during bulk phase */ - if (pending <=3D max_size && !block_mig_state.bulk_completed) { - pending =3D max_size + BLK_MIG_BLOCK_SIZE; + if (!pending && !block_mig_state.bulk_completed) { + pending =3D BLK_MIG_BLOCK_SIZE; } =20 trace_migration_block_save_pending(pending); --=20 2.38.1