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)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id B9AD37865E for ; Tue, 28 Jun 2022 13:13:52 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id B1440A44F for ; Tue, 28 Jun 2022 13:13:22 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (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 1EB93A446 for ; Tue, 28 Jun 2022 13:13:19 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id E3D1643A7A for ; Tue, 28 Jun 2022 13:13:18 +0200 (CEST) From: Dominik Csapak To: pbs-devel@lists.proxmox.com Date: Tue, 28 Jun 2022 13:13:15 +0200 Message-Id: <20220628111318.2648586-1-d.csapak@proxmox.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.100 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record T_SCC_BODY_TEXT_LINE -0.01 - URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [hierarchy.rs, zfs.rs] Subject: [pbs-devel] [PATCH proxmox/proxmox-backup] fix #2915: stat when necessary 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: Tue, 28 Jun 2022 11:13:52 -0000 this series implements a fallback to stat'ing files when the readdir entry does not contain the filetype (since only some filesystems support that) i opted for adding the 'FileStat' to the callback in 'scandir' (even if we don't use it yet) so that we'll not stat again sometimes when using that. If we want, we can of course omit that part, then the interface stays as it currently is we could also write our own 'ReadDir' that stats on demand, but given how few cases we have where we actually use it, i am not so sure if the benefits justify the work proxmox: Dominik Csapak (1): partially fix #2915: proxmox-sys: scandir: stat if file_type is unknown proxmox-sys/src/fs/read_dir.rs | 36 ++++++++++++++++++++++++++++++---- 1 file changed, 32 insertions(+), 4 deletions(-) proxmox-backup: Dominik Csapak (2): adapt to changed callback signature of 'scandir' partially fix #2915: 'stat' in case ReadDirEntry does not contain type pbs-datastore/src/backup_info.rs | 23 ++++++++----- pbs-datastore/src/chunk_store.rs | 23 ++++++------- pbs-datastore/src/hierarchy.rs | 56 ++++++++++++++++++++++++++++++++ src/tools/disks/zfs.rs | 2 +- 4 files changed, 81 insertions(+), 23 deletions(-) -- 2.30.2