From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id CE7ED1FF15F for ; Mon, 4 Nov 2024 11:43:52 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id D95E79ED4; Mon, 4 Nov 2024 11:44:01 +0100 (CET) From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= To: pve-devel@lists.proxmox.com Date: Mon, 4 Nov 2024 11:42:20 +0100 Message-Id: <20241104104221.228730-3-f.gruenbichler@proxmox.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241104104221.228730-1-f.gruenbichler@proxmox.com> References: <20241104104221.228730-1-f.gruenbichler@proxmox.com> MIME-Version: 1.0 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.049 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy 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 Subject: [pve-devel] [PATCH v2 storage 1/1] file_size_info: implement untrusted mode X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox VE development discussion Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" dGhpcyBhbGxvd3MgY2hlY2tpbmcgc29tZSBleHRyYSBhdHRyaWJ1dGVzIGZvciBpbWFnZXMgd2hp Y2ggY29tZSBmcm9tIGEKcG90ZW50aWFsbHkgbWFsaWNpb3VzIHNvdXJjZS4KCnNpbmNlIGZpbGVf c2l6ZV9pbmZvIGlz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