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 233C01FF29F for ; Thu, 18 Jul 2024 14:18:51 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 2EC97B4A5; Thu, 18 Jul 2024 14:19:21 +0200 (CEST) Date: Thu, 18 Jul 2024 14:18:47 +0200 From: Gabriel Goller To: Proxmox Backup Server development discussion Message-ID: <20240718121847.niiyllvfg6r4j6yh@luna.proxmox.com> References: <20240612132300.352392-1-g.goller@proxmox.com> <1720616817.d7d27nxn2b.astroid@yuna.none> <20240712115734.muoepwh7nhn6lxpr@luna.proxmox.com> <1721042531.o3ompmx0x7.astroid@yuna.none> <20240718092732.545nff5wmbwfyusm@luna.proxmox.com> <1721300315.5wh3qyc8v3.astroid@yuna.none> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1721300315.5wh3qyc8v3.astroid@yuna.none> X-SPAM-LEVEL: Spam detection results: 0 AWL -0.050 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: Re: [pbs-devel] [PATCH proxmox-backup v2 1/2] fix #5439: allow to reuse existing datastore 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: , Reply-To: Proxmox Backup Server development discussion Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: pbs-devel-bounces@lists.proxmox.com Sender: "pbs-devel" >> >> Ooh, I think I got it... >> So basically we could just call `ChunkStore::verify_chunkstore` in >> `ChunkStore::open` and drop the `open` call above, right? > >no, what I meant is: > >in open, split out the checks there (that base is absolute, and that the >chunk dir is accessible) into a new helper fn. then call that new helper >fn in open (so that the behaviour of open stays the same). > >then, also call this helper in your patch here - it doesn't really give >much extra benefit atm, but it makes it less easy to miss that this >should be done in both places when adding new checks. > >I don't think we want to do the full verification on each open, but when >creating a datastore config entry with an existing datastore, we want to >do both the extensive checks and those we'd do when opening it. > >of course another option would be to have a single helper, and a >parameter that controls whether the extensive checks should be done or >not. even harder to miss that there are two related sets of checks then >;) > Got it! Didn't have my coffee yet, sorry about that :) Will submit a new version soon! _______________________________________________ pbs-devel mailing list pbs-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel