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 304FB6109B for ; Tue, 20 Oct 2020 09:10:41 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 21A44AF0A for ; Tue, 20 Oct 2020 09:10:11 +0200 (CEST) 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 68388AF00 for ; Tue, 20 Oct 2020 09:10:10 +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 2FE1B45DC7 for ; Tue, 20 Oct 2020 09:10:10 +0200 (CEST) Date: Tue, 20 Oct 2020 09:10:04 +0200 From: Fabian =?iso-8859-1?q?Gr=FCnbichler?= To: Proxmox Backup Server development discussion , Stefan Reiter References: <20201019144523.24840-1-s.reiter@proxmox.com> <20201019144523.24840-3-s.reiter@proxmox.com> <1274295978.147.1603174351148@webmail.proxmox.com> In-Reply-To: <1274295978.147.1603174351148@webmail.proxmox.com> MIME-Version: 1.0 User-Agent: astroid/0.15.0 (https://github.com/astroidmail/astroid) Message-Id: <1603177691.z8a7ok0mzg.astroid@nora.none> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-SPAM-LEVEL: Spam detection results: 0 AWL 0.030 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. [proxmox.com, datastore.rs] Subject: Re: [pbs-devel] [PATCH proxmox-backup 3/3] fix #2988: allow verification after finishing a snapshot 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, 20 Oct 2020 07:10:41 -0000 On October 20, 2020 8:12 am, Dietmar Maurer wrote: >=20 >> + let verify =3D |env: BackupEnvironment| { >> + // we are done, so we can safely drop the snapshot guar= d early >> + // to allow the verify task to acquire it for itself >=20 > Instead, I would keep=C3=A4 the lock and use/expose "verify_backup_dir_no= _lock()". Is that > feasible? it will need a v2 in any case, since patch #2 without #3 applied as well=20 does not build. applied the following fixup: diff --git a/src/backup/datastore.rs b/src/backup/datastore.rs index a856e2f4..d8e7a794 100644 --- a/src/backup/datastore.rs +++ b/src/backup/datastore.rs @@ -18,7 +18,7 @@ use super::fixed_index::{FixedIndexReader, FixedIndexWrit= er}; use super::manifest::{MANIFEST_BLOB_NAME, MANIFEST_LOCK_NAME, CLIENT_LOG_B= LOB_NAME, BackupManifest}; use super::index::*; use super::{DataBlob, ArchiveType, archive_type}; -use crate::config::datastore; +use crate::config::datastore::{self, DataStoreConfig}; use crate::task::TaskState; use crate::tools; use crate::tools::format::HumanByte; @@ -65,7 +65,7 @@ impl DataStore { Ok(datastore) } =20 - fn open_with_path(store_name: &str, path: &Path, config: DataStoreConf= ig) -> Result { + fn open_with_path(store_name: &str, path: &Path, _config: DataStoreCon= fig) -> Result { let chunk_store =3D ChunkStore::open(store_name, path)?; =20 let gc_status =3D GarbageCollectionStatus::default(); please check that your series builds properly for every single commit,=20 e.g. with `git rebase origin/master --exec "cargo build"` >=20 >=20 >> + std::mem::drop(_snap_guard); >> + if let Err(err) =3D env.verify_after_complete() { >> + env.log(format!( >> + "backup finished, but starting the requested ve= rify task failed: {}", >> + err >> + )); >> + } >> + }; >> + >> match (res, env.ensure_finished()) { >=20 >=20 > _______________________________________________ > pbs-devel mailing list > pbs-devel@lists.proxmox.com > https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel >=20 =