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 authored and Dietmar Maurer committed 2020-10-15 07:09:34 +02:00
1 parent 7d6c4c39e9
commit 238a872d1f
2 files changed
+15 -6

No files matched your search

+1 -1
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);