mirror of
https://github.com/ostreedev/ostree.git
synced 2025-03-19 22:50:35 +03:00
deploy: Use fdatasync() for new kernel/initramfs by default
While we do a `syncfs()` plus `FIFREEZE/THAW` for `/boot`, that only comes during deployment finalization. The code here today generally assumes that if the file exists it's been fully written. So let's do a `fdatasync()` before we do the `rename()`. This just came out of looking through the code while working on deployment staging. In that scenario there's a much larger window between when we copy the kernel/initramfs and when we sync `/boot`. Closes: #1571 Approved by: jlebon
This commit is contained in:
parent
9f8e2b8862
commit
d0a1832347
@ -128,7 +128,7 @@ install_into_boot (OstreeSePolicy *sepolicy,
|
||||
error))
|
||||
return FALSE;
|
||||
return glnx_file_copy_at (src_dfd, src_subpath, NULL, dest_dfd, dest_subpath,
|
||||
GLNX_FILE_COPY_NOXATTRS,
|
||||
GLNX_FILE_COPY_NOXATTRS | GLNX_FILE_COPY_DATASYNC,
|
||||
cancellable, error);
|
||||
}
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user