From nobody Tue Nov 26 04:52:48 2024 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=1710194696; cv=none; d=zohomail.com; s=zohoarc; b=FBEK5cQUDm3W+cLnONVfarEDiYU1VWVmeN0DGRxVpKXlf6fqttT7zAY9vg9nb0tbqobI3V1/uVoSi4VLEVGVu60SmbcxYQwKWxIgokcx3oWnC4p+iFP6O3xEtfJbCq4AF21cFLozVvcZIaVqtwsPaUQlrE0botIF0jE3TnyiEto= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1710194696; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=LgyHPzF/xmcyuUnqn1KinqQdKLq8XEiNwDRL/hsnc9k=; b=FE7KMhU2YOFj/v/gSb76OXDAlJlsmlEQftKze6e7lHT+/1cS6aF+J9olv+NB7j7y9BQrydS5rInoTm6/SQ44KZX/yzDYqNtZGI3fQ/Kt1R5rIg19srQZKDnr3C1Wk3AKEXI+r9AHrU5YtVinbzD2/T4g7hyKg+5TUrTqT7xltTo= 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 1710194696298411.9061309575419; Mon, 11 Mar 2024 15:04:56 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rjnho-0001b7-3f; Mon, 11 Mar 2024 18:01:19 -0400 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 1rjngr-0000rP-PM for qemu-devel@nongnu.org; Mon, 11 Mar 2024 18:00:13 -0400 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 1rjngq-0004Hd-0W for qemu-devel@nongnu.org; Mon, 11 Mar 2024 18:00:13 -0400 Received: from mail-ua1-f70.google.com (mail-ua1-f70.google.com [209.85.222.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-261-CneGIuaXPhGATvVsqo8f-Q-1; Mon, 11 Mar 2024 18:00:09 -0400 Received: by mail-ua1-f70.google.com with SMTP id a1e0cc1a2514c-7da965e700fso482477241.1 for ; Mon, 11 Mar 2024 15:00:09 -0700 (PDT) Received: from x1n.. (cpe688f2e2cb7c3-cm688f2e2cb7c0.cpe.net.cable.rogers.com. [99.254.121.117]) by smtp.gmail.com with ESMTPSA id d6-20020a0ce446000000b00690cec16254sm1541932qvm.68.2024.03.11.15.00.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Mar 2024 15:00:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1710194411; 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=LgyHPzF/xmcyuUnqn1KinqQdKLq8XEiNwDRL/hsnc9k=; b=Q815McEMWocxBdr4+MASRneP1GBpS0VJ11U4X2Hy8bOazxNm3wNYDisonPWHOVO2gyH5Rl m6f7bmTXF4AmWpDtWz5rScFaEWe1F7urxs95gt85YZBYIxB7JnyZbfyLumWGhodegfD7pd fPG9TR/rbrFlJfYWfJu0PIocIXtjEuw= X-MC-Unique: CneGIuaXPhGATvVsqo8f-Q-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710194409; x=1710799209; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LgyHPzF/xmcyuUnqn1KinqQdKLq8XEiNwDRL/hsnc9k=; b=X8Ms7bMT2+S8/c4QLeIFAmKGQkUM+Siw/qoGoEDBv/qAnHK8IHe8xqDl+hs7nL9hQH ZAOTOp9bsIjfy2iBeFMKqNgrQO9ok2HdLAgGChHx1umy1BDjTesfCWAVPaXqbZyuXCW3 HWjHcmEJwunNOeZDMu9wYwUlu7c3PYmbdOdj9Nf68ccjDpAlYBZR2jg14FsBulVMRZtk oPmnMbVKQqqowdbA4NmMmIKUWY1fGkdqszTyXWYp0j8/+zy9wahueACCZyjvOKgq+XUI B0yM68nYRlFsr4qq9NMfiixMuqM73N79n5AFJMuQv4Vb2EvGIbCpgkq6I7+cHR0oey0f fvIg== X-Gm-Message-State: AOJu0Yyqe/mkQRtnX3uZPR+ZsIfL0Dg+XJ4sscxyfE4IMVgYokILTUY+ zzZ77iP01zYKzEBfL0v3zFCaxTZqECRN5pldmdiZExAnxpKKZkdRVqytjcHrRLnGLWe9tAHh9Cy DXO6Ef4FqoVh+LUk+HPp/GGI/XHjjwUrnuC8O83lIqzeMUpiB3+q/LFjZTvHXc3r4Z7aGSp4les x5IjmEgDvqrGnmaMCIDY9r90cR9p7ckegpGA== X-Received: by 2002:a05:6102:5127:b0:473:1ac8:5ef5 with SMTP id bm39-20020a056102512700b004731ac85ef5mr307656vsb.2.1710194409071; Mon, 11 Mar 2024 15:00:09 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEWoMYWpRefpIPYtlLxLHpZ3dnw8fpsVZGbhEl6K0NlO2iDafEQvp4Hkv4W1ty2lZhLvWTdxg== X-Received: by 2002:a05:6102:5127:b0:473:1ac8:5ef5 with SMTP id bm39-20020a056102512700b004731ac85ef5mr307632vsb.2.1710194408664; Mon, 11 Mar 2024 15:00:08 -0700 (PDT) From: peterx@redhat.com To: qemu-devel@nongnu.org, Peter Maydell Cc: Paolo Bonzini , peterx@redhat.com, Fabiano Rosas , David Hildenbrand , Prasad Pandit Subject: [PULL 28/34] migration/multifd: Allow zero pages in file migration Date: Mon, 11 Mar 2024 17:59:19 -0400 Message-ID: <20240311215925.40618-29-peterx@redhat.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240311215925.40618-1-peterx@redhat.com> References: <20240311215925.40618-1-peterx@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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=peterx@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1.029, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham 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: 1710194697284100005 Content-Type: text/plain; charset="utf-8" From: Fabiano Rosas Currently, it's an error to have no data pages in the multifd file migration because zero page detection is done in the migration thread and zero pages don't reach multifd. This is enforced with the pages->num assert. We're about to add zero page detection on the multifd thread. Fix the file_write_ramblock_iov() to stop considering p->iovs_num=3D0 an error. Signed-off-by: Fabiano Rosas Link: https://lore.kernel.org/r/20240311180015.3359271-2-hao.xiang@linux.dev Signed-off-by: Peter Xu --- migration/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migration/file.c b/migration/file.c index 5054a60851..b0b963e0ce 100644 --- a/migration/file.c +++ b/migration/file.c @@ -159,7 +159,7 @@ void file_start_incoming_migration(FileMigrationArgs *f= ile_args, Error **errp) int file_write_ramblock_iov(QIOChannel *ioc, const struct iovec *iov, int niov, RAMBlock *block, Error **errp) { - ssize_t ret =3D -1; + ssize_t ret =3D 0; int i, slice_idx, slice_num; uintptr_t base, next, offset; size_t len; --=20 2.44.0