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 08739B474 for ; Wed, 6 Apr 2022 16:52:34 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id EB96C2C9CB for ; Wed, 6 Apr 2022 16:52:03 +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 2337F2C9C0 for ; Wed, 6 Apr 2022 16:52:03 +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 E9E3646EEA for ; Wed, 6 Apr 2022 16:52:02 +0200 (CEST) Message-ID: Date: Wed, 6 Apr 2022 16:51:50 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:99.0) Gecko/20100101 Thunderbird/99.0 Content-Language: en-US To: Proxmox Backup Server development discussion , Stefan Sterz References: <20220406093955.3180508-1-s.sterz@proxmox.com> <20220406093955.3180508-2-s.sterz@proxmox.com> From: Thomas Lamprecht In-Reply-To: <20220406093955.3180508-2-s.sterz@proxmox.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.219 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 NICE_REPLY_A -0.631 Looks like a legit reply (A) POISEN_SPAM_PILL 0.1 Meta: its spam POISEN_SPAM_PILL_1 0.1 random spam to be learned in bayes POISEN_SPAM_PILL_3 0.1 random spam to be learned in bayes 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 - Subject: Re: [pbs-devel] [PATCH proxmox-backup v1 1/3] fix #3935: datastore/api2/backup: move datastore locking to '/run' 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, 06 Apr 2022 14:52:34 -0000 Thanks for this, no in-depth review/comments, but some higher-level/meta ones, sorry for that ;-) On 06.04.22 11:39, Stefan Sterz wrote: > to avoid issues when removing a group or snapshot directory where two > threads hold a lock to the same directory, move locking to the tmpfs > backed '/run' directory. also adds double stat'ing to make it > possible to remove locks without certain race condition issues. maybe it would be slightly easier to review (or "conserver" in the git history) if adding the lock methods and changing to /run + double-stat would be in two separate patches? > > Signed-off-by: Stefan Sterz > --- > i chose to have the lock be the sha256 hash of the relative path of a while really not user friendly it /could/ be ok to do and from a technical POV it would make it a bit simpler. > given group/snapshot/manifest in a datastore, because this way we > never run into issues where file names might be too long. this has > been discussed in previously[1]. i could also encode them using don't see the hash stuff discussed anywhere in [1]? Or did you mean the "it can get long" point? > proxmox_sys::systemd::escape_unit, but that would use two characters > for most ascii characters and, thus, we would run into the 255 byte how would that use two chars for every ascii? As mostly / and - would be affected? > filename limit even faster in most cases. however, i have no set > opinion here, if the consesus is, that this is a non-issue ill gladly > send a v2. > > [1]: https://lists.proxmox.com/pipermail/pbs-devel/2020-December/001669.html > > pbs-datastore/src/datastore.rs | 129 +++++++++++++++++++++------ > pbs-datastore/src/snapshot_reader.rs | 30 ++++--- > src/api2/backup/environment.rs | 4 +- > src/api2/backup/mod.rs | 5 +- > src/api2/reader/mod.rs | 7 +- > src/backup/verify.rs | 12 +-- > 6 files changed, 131 insertions(+), 56 deletions(-)