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 69A25600EB for ; Wed, 2 Dec 2020 14:40:07 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 60A751C562 for ; Wed, 2 Dec 2020 14:40:07 +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 EAB771C558 for ; Wed, 2 Dec 2020 14:40:06 +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 B7C9D44A91 for ; Wed, 2 Dec 2020 14:40:06 +0100 (CET) Date: Wed, 2 Dec 2020 14:40:05 +0100 From: Wolfgang Bumiller To: Dominik Csapak Cc: pbs-devel@lists.proxmox.com Message-ID: <20201202134005.zuufmg5op3nftnsu@wobu-vie.proxmox.com> References: <20201202131957.17051-1-d.csapak@proxmox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201202131957.17051-1-d.csapak@proxmox.com> User-Agent: NeoMutt/20180716 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.020 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. [datastore.rs] Subject: [pbs-devel] applied: [PATCH proxmox-backup 1/2] backup/datastore: really lock manifest on delete 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, 02 Dec 2020 13:40:07 -0000 applied this one On Wed, Dec 02, 2020 at 02:19:56PM +0100, Dominik Csapak wrote: > 'lock_manifest' returns a Result so we always got the result, > even when we did not get the lock, but we acted like we had. > > bubble the locking error up > > Signed-off-by: Dominik Csapak > --- > src/backup/datastore.rs | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/backup/datastore.rs b/src/backup/datastore.rs > index e6be1f67..0f74ac3c 100644 > --- a/src/backup/datastore.rs > +++ b/src/backup/datastore.rs > @@ -244,7 +244,7 @@ impl DataStore { > let (_guard, _manifest_guard); > if !force { > _guard = lock_dir_noblock(&full_path, "snapshot", "possibly running or in use")?; > - _manifest_guard = self.lock_manifest(backup_dir); > + _manifest_guard = self.lock_manifest(backup_dir)?; > } > > log::info!("removing backup snapshot {:?}", full_path); > -- > 2.20.1