From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 72B6F6AF18 for ; Wed, 17 Feb 2021 14:13:25 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 6981F2249B for ; Wed, 17 Feb 2021 14:13:25 +0100 (CET) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [212.186.127.180]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id 8123A2248F for ; Wed, 17 Feb 2021 14:13:24 +0100 (CET) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 47D89461D4 for ; Wed, 17 Feb 2021 14:13:24 +0100 (CET) From: Dominik Csapak To: pbs-devel@lists.proxmox.com Date: Wed, 17 Feb 2021 14:13:19 +0100 Message-Id: <20210217131322.9129-1-d.csapak@proxmox.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.220 Adjusted score from AWL reputation of From: address KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [extract.rs, lib.rs, mod.rs, io.rs, task.rs] Subject: [pbs-devel] [PATCH proxmox/proxmox-backup v5] restore files from pxar sparsely X-BeenThere: pbs-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Backup Server development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2021 13:13:25 -0000 to be able to restore containers with big sparse files ideally we would save hole information directly in the pxar archive and not even use zero chunks, so that we can have smaller pxar archives, and accurately restore sparse files like they were before for now, restore all files sparsely changes from v4: * moved proxmox test code into a toplevel testmodule that is behind a #[cfg(test)] and adapted the tests changes from v3: * collect subsequent holes, so that we only seek one time per hole * add tests for sparse_copy(_async) * also return if the last operation was a seek and only truncate then * create buffer with explicit 4096 bytes * use rustfmt * adds a patch to add poll_once to proxmox module (for async testing) changes from v2: * always sparse copy and truncate after changes from RFC: * drop the zero module of proxmox, rust can generate fast code by itself proxmox: Dominik Csapak (2): proxmox: add test/{io,task} modules proxmox: add sparse_copy(_async) to tools::io proxmox/src/lib.rs | 3 + proxmox/src/test/io.rs | 94 ++++++++++++++ proxmox/src/test/mod.rs | 2 + proxmox/src/test/task.rs | 32 +++++ proxmox/src/tools/io/mod.rs | 243 ++++++++++++++++++++++++++++++++++++ 5 files changed, 374 insertions(+) create mode 100644 proxmox/src/test/io.rs create mode 100644 proxmox/src/test/mod.rs create mode 100644 proxmox/src/test/task.rs proxmox-backup: Dominik Csapak (1): pxar/extract: if possible create files sparesly src/pxar/extract.rs | 43 ++++++++++++++++++++++++++++++++++++------- 1 file changed, 36 insertions(+), 7 deletions(-) -- 2.20.1