From nobody Sun Feb 8 12:38:06 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linux.intel.com ARC-Seal: i=1; a=rsa-sha256; t=1559810759; cv=none; d=zoho.com; s=zohoarc; b=IiINRK4/swZIIxmqbgRB8mao2MoHO1OPOFMYCHYxPL7yg1XIdR01x8Mygcx3p5W0QZhmZFlF9wEPkAJ+PuMerz5ZtHQrXv+Fd9l2LgkdiyLryhs9Ndy4dXIDnBtorlcrbb9HDROGEf/WGcXaopikyPnTV3puOKW+zlUxf6cBKwY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1559810759; 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:ARC-Authentication-Results; bh=n8Esa07dEbsqW1/Q4zP/T/i7/Rzc5eZIu/l1aFg++rg=; b=gW7Y1PnnZM4MjGOVmxTW44vs+PoeER/46ThkSFfuTYiLrrfLp9quOjICLVSJmhKyxN3g5Y/OQcg1CFpHoHQsbhS/nxTIP7ZF/y3qRlfvHP4U3X/YV3lbpGbi2my2/uEFgq49n6Ucek3RWFKk1xxVnHilpGwLDj9Axb5Dn3sW4cI= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1559810759594100.61987858650764; Thu, 6 Jun 2019 01:45:59 -0700 (PDT) Received: from localhost ([127.0.0.1]:56584 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hYo1g-00061M-Hv for importer@patchew.org; Thu, 06 Jun 2019 04:45:36 -0400 Received: from eggs.gnu.org ([209.51.188.92]:55557) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hYnyf-0003nJ-60 for qemu-devel@nongnu.org; Thu, 06 Jun 2019 04:42:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hYnsL-0003Wm-2G for qemu-devel@nongnu.org; Thu, 06 Jun 2019 04:35:57 -0400 Received: from mga14.intel.com ([192.55.52.115]:4990) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hYnsK-0003TJ-PI for qemu-devel@nongnu.org; Thu, 06 Jun 2019 04:35:56 -0400 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Jun 2019 01:35:56 -0700 Received: from richard.sh.intel.com (HELO localhost) ([10.239.159.54]) by fmsmga001.fm.intel.com with ESMTP; 06 Jun 2019 01:35:55 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 From: Wei Yang To: qemu-devel@nongnu.org Date: Thu, 6 Jun 2019 16:34:59 +0800 Message-Id: <20190606083501.2087-5-richardw.yang@linux.intel.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190606083501.2087-1-richardw.yang@linux.intel.com> References: <20190606083501.2087-1-richardw.yang@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 192.55.52.115 Subject: [Qemu-devel] [PATCH 4/6] migration/multifd: used must not be 0 for a pending job 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: Wei Yang , dgilbert@redhat.com, quintela@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" After thread synchronization request is handled in another case, this means when we only get pending_job when there is used pages. Signed-off-by: Wei Yang --- migration/ram.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/migration/ram.c b/migration/ram.c index 9982930392..3e48795608 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -1118,12 +1118,11 @@ static void *multifd_send_thread(void *opaque) break; } =20 - if (used) { - ret =3D qio_channel_writev_all(p->c, p->pages->iov, + assert(used); + ret =3D qio_channel_writev_all(p->c, p->pages->iov, used, &local_err); - if (ret !=3D 0) { - break; - } + if (ret !=3D 0) { + break; } =20 qemu_mutex_lock(&p->mutex); --=20 2.19.1