verify: cleanup logging order/messages

otherwise we end up printing warnings before the start message..

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
Fabian Grünbichler 2020-11-10 13:52:50 +01:00 committed by Thomas Lamprecht
parent 1b1cab8321
commit 9f9a661b1a
1 changed files with 5 additions and 9 deletions

View File

@ -498,13 +498,10 @@ pub fn verify_all_backups(
) -> Result<Vec<String>, Error> { ) -> Result<Vec<String>, Error> {
let mut errors = Vec::new(); let mut errors = Vec::new();
task_log!(worker, "verify datastore {}", datastore.name());
if let Some(owner) = &owner { if let Some(owner) = &owner {
task_log!( task_log!(worker, "limiting to backups owned by {}", owner);
worker,
"verify datastore {} - limiting to backups owned by {}",
datastore.name(),
owner
);
} }
let filter_by_owner = |group: &BackupGroup| { let filter_by_owner = |group: &BackupGroup| {
@ -545,8 +542,7 @@ pub fn verify_all_backups(
Err(err) => { Err(err) => {
task_log!( task_log!(
worker, worker,
"verify datastore {} - unable to list backups: {}", "unable to list backups: {}",
datastore.name(),
err, err,
); );
return Ok(errors); return Ok(errors);
@ -566,7 +562,7 @@ pub fn verify_all_backups(
// start with 64 chunks since we assume there are few corrupt ones // start with 64 chunks since we assume there are few corrupt ones
let corrupt_chunks = Arc::new(Mutex::new(HashSet::with_capacity(64))); let corrupt_chunks = Arc::new(Mutex::new(HashSet::with_capacity(64)));
task_log!(worker, "verify datastore {} ({} snapshots)", datastore.name(), snapshot_count); task_log!(worker, "found {} snapshots", snapshot_count);
let mut done = 0; let mut done = 0;
for group in list { for group in list {