Minor questions in Linux file semantics

  • Post author:
  • Post category:Linux

I’ve known for a long time that if you delete a file on Unix / Linux but that file is open somewhere, the blocks used by the file aren’t freed until that user closes the file (or is terminated), but I was left wondering about some other edge cases.

Shaken Fist has a distributed blob store. It also has a cache of images that virtual machines are using. If the blob store and the image cache are on the same filesystem, sometimes the image cache entry can be a hard link to an entry in the blob store (for example, if the entry in the blob store doesn’t need to be transcoded before use by the virtual machine). However, if they are on different file systems, I instead use a symbolic link.

This raises questions — what happens if you rename a file which is open for writing in a program? What happens if you change a symbolic link to point somewhere else while it is open? I suspect in both cases the right thing happens, but I decided I should test these theories out.

(more…)

Continue ReadingMinor questions in Linux file semantics

Large inodes = faster samba

  • Post author:
  • Post category:Link

Ted T'so just mentioned in his LCA 2007 talk that larger inode sizes improves the speed of Samba 4. This is because you can fit more file attributes in the inode. I can't find a reference to the benchmark results online quickly, but wanted to make a note of this.

Continue ReadingLarge inodes = faster samba

End of content

No more pages to load