From nobody Mon Feb 9 08:36:53 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.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 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1510022114128823.0980617726457; Mon, 6 Nov 2017 18:35:14 -0800 (PST) Received: from localhost ([::1]:51125 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eBtjN-00031o-CS for importer@patchew.org; Mon, 06 Nov 2017 21:35:13 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54070) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eBtfz-00014h-SY for qemu-devel@nongnu.org; Mon, 06 Nov 2017 21:31:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eBtfz-00087d-3J for qemu-devel@nongnu.org; Mon, 06 Nov 2017 21:31:43 -0500 Received: from mx1.redhat.com ([209.132.183.28]:43470) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eBtfq-00082w-Gi; Mon, 06 Nov 2017 21:31:34 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 94CD0358; Tue, 7 Nov 2017 02:31:33 +0000 (UTC) Received: from localhost (ovpn-122-234.rdu2.redhat.com [10.10.122.234]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1CDFA17A63; Tue, 7 Nov 2017 02:31:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 94CD0358 Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=jcody@redhat.com From: Jeff Cody To: qemu-block@nongnu.org Date: Mon, 6 Nov 2017 21:31:21 -0500 Message-Id: <5d07b67f40f00586834bfc7e6e3adbfcc058e3de.1510021573.git.jcody@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Tue, 07 Nov 2017 02:31:33 +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 v3 3/4] block/parallels: add migration blocker 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, aik@ozlabs.ru, qemu-devel@nongnu.org, mreitz@redhat.com, stefanha@redhat.com, den@openvz.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Migration does not work for parallels, and has been broken for a while (see patch 'block/parallels: Do not update header or truncate image when INMIGRATE'). The bdrv_invalidate_cache() method needs to be added for migration to be supported. Until this is done, prohibit migration. Signed-off-by: Jeff Cody --- block/parallels.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/block/parallels.c b/block/parallels.c index 7b7a3ef..ffe0a79 100644 --- a/block/parallels.c +++ b/block/parallels.c @@ -35,6 +35,7 @@ #include "qemu/module.h" #include "qemu/bswap.h" #include "qemu/bitmap.h" +#include "migration/blocker.h" =20 /**************************************************************/ =20 @@ -100,6 +101,7 @@ typedef struct BDRVParallelsState { unsigned int tracks; =20 unsigned int off_multiplier; + Error *migration_blocker; } BDRVParallelsState; =20 =20 @@ -720,6 +722,16 @@ static int parallels_open(BlockDriverState *bs, QDict = *options, int flags, s->bat_dirty_bmap =3D bitmap_new(DIV_ROUND_UP(s->header_size, s->bat_dirty_block)); =20 + /* Disable migration until bdrv_invalidate_cache method is added */ + error_setg(&s->migration_blocker, "The Parallels format used by node '= %s' " + "does not support live migration", + bdrv_get_device_or_node_name(bs)); + ret =3D migrate_add_blocker(s->migration_blocker, &local_err); + if (local_err) { + error_propagate(errp, local_err); + error_free(s->migration_blocker); + goto fail; + } qemu_co_mutex_init(&s->lock); return 0; =20 --=20 2.9.5