datastore: add manifest locking
Avoid races when updating manifest data by flocking a lock file. update_manifest is used to ensure updates always happen with the lock held. Snapshot deletion also acquires the lock, so it cannot interfere with an outstanding manifest write. Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
This commit is contained in:
committed by
Dietmar Maurer
parent
e07620028d
commit
1a374fcfd6
@ -8,6 +8,7 @@ use ::serde::{Deserialize, Serialize};
|
||||
use crate::backup::{BackupDir, CryptMode, CryptConfig};
|
||||
|
||||
pub const MANIFEST_BLOB_NAME: &str = "index.json.blob";
|
||||
pub const MANIFEST_LOCK_NAME: &str = ".index.json.lck";
|
||||
pub const CLIENT_LOG_BLOB_NAME: &str = "client.log.blob";
|
||||
|
||||
mod hex_csum {
|
||||
|
Reference in New Issue
Block a user