]> git.decadent.org.uk Git - kernel-news-talk.git/commitdiff
Add slide about O_TMPFILE
authorBen Hutchings <ben@decadent.org.uk>
Thu, 28 Aug 2014 00:06:57 +0000 (17:06 -0700)
committerBen Hutchings <ben@decadent.org.uk>
Thu, 28 Aug 2014 00:06:57 +0000 (17:06 -0700)
index.html

index 0e7b2051e2c19fa12ce6fecba7fac76b781c87ed..ef03341a9e1b72d27a43f72d18323739d369c121 100644 (file)
   </ul>
 </div>
 
+<div class="slide">
+  <h1>Unnamed temporary files [3.11]</h1>
+  <ul>
+    <li>
+      Open directory with option <tt>O_TMPFILE</tt> to create an
+      unnamed temporary file on that filesystem
+    </li>
+    <li>
+      As with <tt>tmpfile()</tt>, the file disppears on
+      last <tt>close()</tt>
+    </li>
+    <li>
+      File can be linked into the filesystem using
+      <tt>linkat(..., AT_EMPTY_PATH)</tt>, allowing for 'atomic'
+      creation of file with complete contents and metadata
+    </li>
+    <li>
+      Not supported on all filesystem types, so you will usually need
+      a fallback
+    </li>
+  </ul>
+</div>
+
 <div class="slide">
   <h1>Questions?</h1>
 </div>