The BeOS file system, an OS geek retrospective
Most important thing wrong with this article is that it keeps talking about BeFS having a &quot;64-bit address space&quot;. That&#x27;s not so at all.<p>BeOS has the equivalent of the POSIX O_LARGEFILE permanently enabled. Historically 32-bit Unix systems assumed files were no larger than 2^31 bytes for the purposes of random access, and a feature labelled O_LARGEFILE says that your program wants 64-bit offset values instead so you can seek inside a larger file. In a 64-bit OS this doesn&#x27;t make any difference to anything, and in modern programs O_LARGEFILE will always be set for 32-bit programs too. This isn&#x27;t about the filesystem at all, on BeOS, or any other Unix-like system.<p>BeFS does, like a lot of modern filesystems, theoretically support larger storage than is ever likely to be in the hands of ordinary end users. Many petabytes of storage in a single filesystem are in principle possible with BeFS. But that&#x27;s not strongly related, in either direction, with the use of a 64-bit integer for file seeking.<p>Beyond that BFS has lots of annoying problems, which are very understandable in the context of it being rushed into use over such a short period of time and with really only one key person doing much of the work, but they don&#x27;t vanish just because they have an excuse:<p>The metadata indices are clearly aimed at end user operations like &quot;Where&#x27;s that file with the client&#x27;s name in it?&quot; or &quot;What songs do I have by Michael Jackson?&quot; but they&#x27;re designed in a way that wastes a lot of space and yet also has poor performance for such queries - because they&#x27;re case sensitive for no good reason. They also incur a LOT of extra I&#x2F;O so if you don&#x27;t need that feature you&#x27;d really want to switch it off, but you can only really do that at filesystem creation time.<p>Fragmentation is a really nasty problem. This is an extent-based filesystem, so that&#x27;s somewhat inevitable, but BeFS almost seems to go out of its way to make it worse, and provides no tools whatsoever to help you fix it. It&#x27;s actually possible to get a &quot;disk full&quot; type error when trying to append to a file which is badly fragmented, even though there is plenty of disk space.<p>Unix files often have an existence that transcends the mere name on the disk, but BeFS takes that a step further, allowing application software to identify a file without knowing its name at all. There are a few scenarios where this is quite clever, but if you ever want to retro-fit actual privilege separation to the OS (which has been a long term ambition for Haiku for more than a decade) this produces a Gordian knot - permissions are associated with names, but software can simply obtain (or guess!) the anonymous number for the file and sidestep such permissions altogether.<p>The journalling has a nasty hole in it. There&#x27;s no way to safely delete files using the provided metadata journalling and recover the freed space, so, in practice if you crash while deleting files some of the space is just mysteriously gone until you run a &quot;check&quot; tool (remember the scorn for such tools in the article...) to find and recover it.