she/they

  • 0 Posts
  • 12 Comments
Joined 7 months ago
cake
Cake day: December 31st, 2023

help-circle

  • If it was on something like BTRFS it’d probably be fine, though I imagine there’s still a small window where the FS could flush while the file is being written. renameat2 has the EXCHANGE flag to atomically switch 2 files, so if arch maintainers want to fix it they could do

    1. Write to temporary file
    2. Fsync temporary file
    3. Renameat2 EXCHANGE temporary and target
    4. Fsync directory (optional, since a background flush would still be atomic, just might take some time)