<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Filesystems on Nalar</title>
    <link>https://nalar.dev/tags/filesystems/</link>
    <description>Recent content in Filesystems on Nalar</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Fri, 04 Sep 2026 00:00:00 +0700</lastBuildDate>
    <atom:link href="https://nalar.dev/tags/filesystems/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Write Files Atomically on Linux with rename and fsync</title>
      <link>https://nalar.dev/write-files-atomically-on-linux-with-rename-and-fsync/</link>
      <pubDate>Fri, 04 Sep 2026 00:00:00 +0700</pubDate>
      <guid>https://nalar.dev/write-files-atomically-on-linux-with-rename-and-fsync/</guid>
      <description>&lt;p&gt;Updating a small file looks simple: open it, truncate it, write the new contents, and close it. That works when nothing interrupts the write.&lt;/p&gt;&#xA;&lt;p&gt;The failure mode appears when a process crashes, the machine loses power, or another process reads the file while it is being rewritten. A reader can observe an empty or partially written file, and a crash can leave the pathname referring to incomplete data.&lt;/p&gt;&#xA;&lt;p&gt;For configuration files, state snapshots, generated metadata, and similar single-file updates, a better pattern is to write a complete replacement beside the original file and then rename it into place.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
