[pbs-devel] [PATCH proxmox-backup 3/3] fix #2988: allow verification after finishing a snapshot

Fabian Grünbichler f.gruenbichler at proxmox.com
Tue Oct 20 09:10:04 CEST 2020


On October 20, 2020 8:12 am, Dietmar Maurer wrote:
> 
>> +            let verify = |env: BackupEnvironment| {
>> +                // we are done, so we can safely drop the snapshot guard early
>> +                // to allow the verify task to acquire it for itself
> 
> Instead, I would keepä 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 
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, FixedIndexWriter};
 use super::manifest::{MANIFEST_BLOB_NAME, MANIFEST_LOCK_NAME, CLIENT_LOG_BLOB_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)
     }
 
-    fn open_with_path(store_name: &str, path: &Path, config: DataStoreConfig) -> Result<Self, Error> {
+    fn open_with_path(store_name: &str, path: &Path, _config: DataStoreConfig) -> Result<Self, Error> {
         let chunk_store = ChunkStore::open(store_name, path)?;
 
         let gc_status = GarbageCollectionStatus::default();



please check that your series builds properly for every single commit, 
e.g. with `git rebase origin/master --exec "cargo build"`

> 
> 
>> +                std::mem::drop(_snap_guard);
>> +                if let Err(err) = env.verify_after_complete() {
>> +                    env.log(format!(
>> +                        "backup finished, but starting the requested verify task failed: {}",
>> +                        err
>> +                    ));
>> +                }
>> +            };
>> +
>>              match (res, env.ensure_finished()) {
> 
> 
> _______________________________________________
> pbs-devel mailing list
> pbs-devel at lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
> 





More information about the pbs-devel mailing list