From nobody Fri May 17 04:49:44 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 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=1655897412; cv=none; d=zohomail.com; s=zohoarc; b=kPRVmH31j/KI24LscIO3oxJO/ysLWIkFiYlybDXIsyrdSAWFY9aCVpz4jes5M/+uJhhb72AjO4zFQhiO57ZU6M0BsDjsJMqrNf7N3zvnuDKMQmWAOVV3Swtl2sXbr9Mh4bV+leYECiKEU1axJnXyfiM05mUvzl8JCVEFZbi4z8k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1655897412; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=cfTUZ1uEZYHNjNR7N7WY1XdqtnsCGnA2agl2FSFslU4=; b=JWEqKOg3JKrGjOvtdfe8FiSXST9w838bOzxctGRU9KWyCGvAhVwif0XXzzYNlwgNwmpVKilnYycTObJjb7mk9/ACL3xu9iyXhgk0GAMbHVlXRJvSWWI7bAhGfl+Fvs71uNw7yuDtAichxcXs59PV4zNVJ3ByY7F2h7hm7LnvNyE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1655897412412520.2442395480806; Wed, 22 Jun 2022 04:30:12 -0700 (PDT) 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-152-_VMWuZDQOlyfdA66rHeV0A-1; Wed, 22 Jun 2022 07:30:07 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 3F3C61C06903; Wed, 22 Jun 2022 11:30:05 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0270D40CFD0B; Wed, 22 Jun 2022 11:30:02 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id BC22A194704C; Wed, 22 Jun 2022 11:30:01 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 9AF2B194704A for ; Wed, 22 Jun 2022 11:30:00 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 7C42B9D54; Wed, 22 Jun 2022 11:30:00 +0000 (UTC) Received: from hjs.redhat.com (unknown [10.43.2.85]) by smtp.corp.redhat.com (Postfix) with ESMTP id 240621131D for ; Wed, 22 Jun 2022 11:30:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1655897411; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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=cfTUZ1uEZYHNjNR7N7WY1XdqtnsCGnA2agl2FSFslU4=; b=UuLXA+aP6ajc8U1f0r/jXH5FQBogtvGa9uGNnW7lAGw6xS51dAvlTTD8rJsbqGvZEpMnMI zLCvNZByyot+eH5dNt+1akWnR1IF9zDQ9WETfKGq5l688d5qswKOMfcUUc6vncSpP5wv3E XodLLaFwLj6+xco8p80gUy1Jt41koxU= X-MC-Unique: _VMWuZDQOlyfdA66rHeV0A-1 X-Original-To: libvir-list@listman.corp.redhat.com From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Subject: [libvirt PATCHv2] storagefile: set size field of ploop to 8 Date: Wed, 22 Jun 2022 13:29:57 +0200 Message-Id: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.84 on 10.11.54.1 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1655897413171100001 For all file formats, the length of the size field is assumed and hardcoded to be 8 bytes. Fix the length for the ploop format - since we specify the offset, we read 8 bytes of the length, not 0. Signed-off-by: J=C3=A1n Tomko Reviewed-by: Michal Privoznik --- src/storage_file/storage_file_probe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/storage_file/storage_file_probe.c b/src/storage_file/stora= ge_file_probe.c index 54e095ffd3..9465af5d96 100644 --- a/src/storage_file/storage_file_probe.c +++ b/src/storage_file/storage_file_probe.c @@ -296,7 +296,7 @@ static struct FileTypeInfo const fileTypeInfo[] =3D { [VIR_STORAGE_FILE_VHD] =3D { 0, NULL, LV_LITTLE_ENDIAN, -1, 0, {0}, 0, 0, 0, NULL, NULL, NULL, NULL= }, [VIR_STORAGE_FILE_PLOOP] =3D { 0, "WithouFreSpacExt", LV_LITTLE_ENDIAN, - -2, 0, {0}, PLOOP_IMAGE_SIZE_OFFSET, 0, + -2, 0, {0}, PLOOP_IMAGE_SIZE_OFFSET, 8, PLOOP_SIZE_MULTIPLIER, NULL, NULL, NULL, = NULL }, =20 /* All formats with a backing store probe below here */ --=20 2.34.1