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:
@ -95,7 +95,7 @@ impl FileLogger {
|
||||
flags |= OFlag::O_EXCL;
|
||||
}
|
||||
|
||||
let file = atomic_open_or_create_file(&file_name, flags, &[], options.file_opts.clone())?;
|
||||
let file = atomic_open_or_create_file(&file_name, flags, &[], options.file_opts.clone(), false)?;
|
||||
|
||||
Ok(file)
|
||||
}
|
||||
|
@ -117,7 +117,7 @@ pub(crate) fn pstart() -> u64 {
|
||||
/// Helper to write the PID into a file
|
||||
pub fn write_pid(pid_fn: &str) -> Result<(), Error> {
|
||||
let pid_str = format!("{}\n", *PID);
|
||||
proxmox::tools::fs::replace_file(pid_fn, pid_str.as_bytes(), CreateOptions::new())
|
||||
proxmox::tools::fs::replace_file(pid_fn, pid_str.as_bytes(), CreateOptions::new(), false)
|
||||
}
|
||||
|
||||
/// Helper to read the PID from a file
|
||||
|
@ -146,6 +146,7 @@ impl WorkerTaskSetup {
|
||||
&self.active_tasks_fn,
|
||||
active_raw.as_bytes(),
|
||||
options,
|
||||
false,
|
||||
)?;
|
||||
|
||||
finish_list.sort_unstable_by(|a, b| {
|
||||
@ -166,6 +167,7 @@ impl WorkerTaskSetup {
|
||||
OFlag::O_APPEND | OFlag::O_RDWR,
|
||||
&[],
|
||||
options,
|
||||
false,
|
||||
)?;
|
||||
for info in &finish_list {
|
||||
writer.write_all(render_task_line(&info).as_bytes())?;
|
||||
|
Reference in New Issue
Block a user