reader: acquire shared flock on open snapshot

...to avoid it being forgotten or pruned while in use.

Update lock error message for deletions to be consistent.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
This commit is contained in:
Stefan Reiter
2020-10-14 14:16:32 +02:00
committed by Dietmar Maurer
parent 7d6c4c39e9
commit 238a872d1f
2 changed files with 15 additions and 6 deletions

View File

@ -227,7 +227,7 @@ impl DataStore {
let _guard;
if !force {
_guard = lock_dir_noblock(&full_path, "snapshot", "possibly running or used as base")?;
_guard = lock_dir_noblock(&full_path, "snapshot", "possibly running or in use")?;
}
log::info!("removing backup snapshot {:?}", full_path);