From nobody Mon Nov 25 23:52:30 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) client-ip=205.139.110.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1587561431; cv=none; d=zohomail.com; s=zohoarc; b=jgt0wKwKN83WsdY8d3SGAMc+d3ay1G9+rFRfczSH/D2j54DskIrpfIJjUfldRou4FcKpFdd9RtmwGU1c9hKUAafHauT0//p53AEHA3JV1Nj7/y2TDn05YWcoZ3V5TbLOV0ywxqyhFZbHmwnZz+lJDRohiWS+r18h0nrKErEJsS0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1587561431; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=YLoPP3v0X2aPz/mkW7fgYHwX+9ozoCsZZMOatLjvZ0Y=; b=Ja53UUabNAKAcBzp6JSnJPCfhV3kqw4czNQhuZw1u4JFl9AIFcjcLPxUoUsaQMoSeFrtTaDgHUhJPE0PJQ3Hpsyl8E9BWfBU6t7l1bnUu0s0rI1KofewSBJtZC6Zz6r5BlP9aYGzhX4Q4Znde97x63Lx/oTwjYSNNB3dGT2YJxg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by mx.zohomail.com with SMTPS id 15875614316791008.1275659749696; Wed, 22 Apr 2020 06:17:11 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-496-_Z4UdfOyNHGqbAsqMQNQyw-1; Wed, 22 Apr 2020 09:17:07 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E739D100A621; Wed, 22 Apr 2020 13:17:01 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9BFA3101E58A; Wed, 22 Apr 2020 13:17:01 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id C5C5C180954D; Wed, 22 Apr 2020 13:17:00 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 03MDFdfF004885 for ; Wed, 22 Apr 2020 09:15:39 -0400 Received: by smtp.corp.redhat.com (Postfix) id 6B07B5D716; Wed, 22 Apr 2020 13:15:39 +0000 (UTC) Received: from ibm-p8-15-fsp.mgmt.pnr.lab.eng.rdu2.redhat.com (unknown [10.40.195.70]) by smtp.corp.redhat.com (Postfix) with ESMTP id 19D9A5D70A; Wed, 22 Apr 2020 13:15:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1587561430; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=YLoPP3v0X2aPz/mkW7fgYHwX+9ozoCsZZMOatLjvZ0Y=; b=fxxxs4p7UEYsfydhyfE6jIxrAzN06zc8MfHvPe3lW3c4AMgBzCCY6+vr0lPggH/6fd+Vbh s2SZzQcvPQehh6x+lBGZQSQ7N51nn07R3+kuIF8UjBm50P2i1cB/tjWjWlzTZK1Kve/Ip7 gxcebUUsaatiF4SWADiAnCV0LG/YP4k= X-MC-Unique: _Z4UdfOyNHGqbAsqMQNQyw-1 From: Pavel Mores To: libvir-list@redhat.com Subject: [libvirt PATCH v2] qemu: fix domain start with corrupted save file Date: Wed, 22 Apr 2020 15:15:31 +0200 Message-Id: <20200422131531.1281979-1-pmores@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Cc: Pavel Mores X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" This is to fix https://bugzilla.redhat.com/show_bug.cgi?id=3D1791522 With this change, if a domain comes across a corrupted save file during boot it removes the save file and logs a warning but continues to boot normally instead of failing to boot (with a subsequent boot attempt succeeding). The regression was introduced by 21ad56e932 and this change effectively reverts the relevant part of that commit. --- src/qemu/qemu_driver.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index e8d47a41cd..2579ef3984 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -6810,13 +6810,14 @@ qemuDomainSaveImageOpen(virQEMUDriverPtr driver, *ret_def =3D def; *ret_data =3D data; =20 + cleanup: return fd; =20 error: virDomainDefFree(def); virQEMUSaveDataFree(data); VIR_FORCE_CLOSE(fd); - return -1; + goto cleanup; } =20 static int ATTRIBUTE_NONNULL(4) ATTRIBUTE_NONNULL(5) ATTRIBUTE_NONNULL(6) --=20 2.24.1