use new fsync parameter to replace_file and atomic_open_or_create
Depend on proxmox 0.15.0 and proxmox-openid 0.8.1 Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
This commit is contained in:
@ -345,7 +345,7 @@ fn save_changer_state_cache(
|
||||
.owner(backup_user.uid)
|
||||
.group(backup_user.gid);
|
||||
|
||||
replace_file(path, state.as_bytes(), options)
|
||||
replace_file(path, state.as_bytes(), options, false)
|
||||
}
|
||||
|
||||
fn delete_changer_state_cache(changer: &str) {
|
||||
|
@ -555,7 +555,7 @@ pub fn set_tape_device_state(
|
||||
.owner(backup_user.uid)
|
||||
.group(backup_user.gid);
|
||||
|
||||
replace_file(path, state.as_bytes(), options)
|
||||
replace_file(path, state.as_bytes(), options, false)
|
||||
}
|
||||
|
||||
/// Get the device state
|
||||
@ -618,6 +618,7 @@ fn open_device_lock(device_path: &str) -> Result<std::fs::File, Error> {
|
||||
OFlag::O_RDWR | OFlag::O_CLOEXEC | OFlag::O_APPEND,
|
||||
&[],
|
||||
options,
|
||||
false,
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -117,7 +117,7 @@ impl VirtualTapeHandle {
|
||||
let raw = serde_json::to_string_pretty(&serde_json::to_value(index)?)?;
|
||||
|
||||
let options = CreateOptions::new();
|
||||
replace_file(&path, raw.as_bytes(), options)?;
|
||||
replace_file(&path, raw.as_bytes(), options, false)?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@ -157,7 +157,7 @@ impl VirtualTapeHandle {
|
||||
let raw = serde_json::to_string_pretty(&serde_json::to_value(status)?)?;
|
||||
|
||||
let options = CreateOptions::new();
|
||||
replace_file(&path, raw.as_bytes(), options)?;
|
||||
replace_file(&path, raw.as_bytes(), options, false)?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -183,7 +183,7 @@ impl Inventory {
|
||||
.group(backup_user.gid)
|
||||
};
|
||||
|
||||
replace_file(&self.inventory_path, raw.as_bytes(), options)?;
|
||||
replace_file(&self.inventory_path, raw.as_bytes(), options, true)?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
@ -102,6 +102,7 @@ fn write_snapshot_cache(
|
||||
cache_path,
|
||||
data.as_bytes(),
|
||||
options,
|
||||
false,
|
||||
)?;
|
||||
|
||||
Ok(list)
|
||||
|
Reference in New Issue
Block a user