public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Stefan Reiter <s.reiter@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH v3 storage 1/3] import: don't check for 1K aligned size
Date: Mon,  4 Oct 2021 17:29:19 +0200	[thread overview]
Message-ID: <20211004152921.2839809-2-s.reiter@proxmox.com> (raw)
In-Reply-To: <20211004152921.2839809-1-s.reiter@proxmox.com>

TPM state disks on directory storages may have completely unaligned
sizes, this check doesn't make sense for them.

This appears to just be a (weak) safeguard and not serve an actual
functional purpose, so simply get rid of it to allow migration of TPM
state.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
---
 PVE/Storage/Plugin.pm | 1 -
 1 file changed, 1 deletion(-)

diff --git a/PVE/Storage/Plugin.pm b/PVE/Storage/Plugin.pm
index 417d1fd..fab2316 100644
--- a/PVE/Storage/Plugin.pm
+++ b/PVE/Storage/Plugin.pm
@@ -1353,7 +1353,6 @@ sub read_common_header($) {
     sysread($fh, my $size, 8);
     $size = unpack('Q<', $size);
     die "import: no size found in export header, aborting.\n" if !defined($size);
-    die "import: got a bad size (not a multiple of 1K), aborting.\n" if ($size&1023);
     # Size is in bytes!
     return $size;
 }
-- 
2.30.2





  reply	other threads:[~2021-10-04 15:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-04 15:29 [pve-devel] [PATCH v3 0/3] Initial TPM support for VMs Stefan Reiter
2021-10-04 15:29 ` Stefan Reiter [this message]
2021-10-05  4:24   ` [pve-devel] applied: [PATCH v3 storage 1/3] import: don't check for 1K aligned size Thomas Lamprecht
2021-10-04 15:29 ` [pve-devel] [PATCH v3 qemu-server 2/3] fix #3075: add TPM v1.2 and v2.0 support via swtpm Stefan Reiter
2021-10-05  5:30   ` [pve-devel] applied: " Thomas Lamprecht
2021-10-04 15:29 ` [pve-devel] [PATCH v3 manager 3/3] ui: add support for adding TPM devices Stefan Reiter
2021-10-05  5:34   ` [pve-devel] applied: " Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211004152921.2839809-2-s.reiter@proxmox.com \
    --to=s.reiter@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal