{"id":22048,"date":"2018-07-06T14:14:45","date_gmt":"2018-07-06T18:14:45","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=22048"},"modified":"2018-07-06T14:14:45","modified_gmt":"2018-07-06T18:14:45","slug":"be-file-system-retrospective","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2018\/07\/06\/be-file-system-retrospective\/","title":{"rendered":"Be File System Retrospective"},"content":{"rendered":"<p><a href=\"https:\/\/arstechnica.com\/information-technology\/2018\/07\/the-beos-filesystem\/\">Andrew Hudson<\/a> (<a href=\"https:\/\/news.ycombinator.com\/item?id=17468920\">Hacker News<\/a>):<\/p>\n<blockquote cite=\"https:\/\/arstechnica.com\/information-technology\/2018\/07\/the-beos-filesystem\/\">\n<p>The Be operating system file system, known simply as BFS, is the file system for the Haiku, BeOS, and SkyOS operating systems. When it was created in the late &rsquo;90s as part of the ill-fated BeOS project, BFS&rsquo;s ahead-of-its-time feature set immediately struck the fancy OS geeks. That feature set includes:<\/p>\n<ul>\n<li>A 64-bit address space<\/li>\n<li>Use of journaling<\/li>\n<li>Highly multithreaded reading<\/li>\n<li>Support of database-like extended file attributes<\/li>\n<li>Optimization for streaming file access<\/li>\n<\/ul>\n<p>A dozen years later, the legendary BFS still merits exploration&mdash;so we&rsquo;re diving in today, starting with some filesystem basics and moving on to a discussion of the above features. We also chatted with two people intimately familiar with the OS: the person who developed BFS for Be and the developer behind the open-source version of BFS.<\/p>\n<\/blockquote>\n\n<p><a href=\"https:\/\/news.ycombinator.com\/item?id=17469388\">tialaramex<\/a>:<\/p>\n<blockquote cite=\"https:\/\/news.ycombinator.com\/item?id=17469388\"><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&rsquo;t vanish just because they have an excuse:<\/p><p>The metadata indices are clearly aimed at end user operations like &ldquo;Where&rsquo;s that file with the client&rsquo;s name in it?&rdquo; or &ldquo;What songs do I have by Michael Jackson?&rdquo; but they&rsquo;re designed in a way that wastes a lot of space and yet also has poor performance for such queries - because they&rsquo;re case sensitive for no good reason. They also incur a LOT of extra I\/O so if you don&rsquo;t need that feature you&rsquo;d really want to switch it off, but you can only really do that at filesystem creation time.<\/p><p>Fragmentation is a really nasty problem. This is an extent-based filesystem, so that&rsquo;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&rsquo;s actually possible to get a &ldquo;disk full&rdquo; type error when trying to append to a file which is badly fragmented, even though there is plenty of disk space.<\/p><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><\/blockquote>\n\n<p>Previously: <a href=\"https:\/\/mjtsai.com\/blog\/2004\/02\/21\/practical_file_system_des\/\">Practical File System Design<\/a>.<\/p>","protected":false},"excerpt":{"rendered":"<p>Andrew Hudson (Hacker News): The Be operating system file system, known simply as BFS, is the file system for the Haiku, BeOS, and SkyOS operating systems. When it was created in the late &rsquo;90s as part of the ill-fated BeOS project, BFS&rsquo;s ahead-of-its-time feature set immediately struck the fancy OS geeks. That feature set includes: [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"2018-07-06T18:14:48Z","apple_news_api_id":"d2fadb0c-db28-489b-b9d4-9c7e0537a19e","apple_news_api_modified_at":"2018-07-06T18:14:51Z","apple_news_api_revision":"AAAAAAAAAAD\/\/\/\/\/\/\/\/\/\/w==","apple_news_api_share_url":"https:\/\/apple.news\/A0vrbDNsoSJu51Jx-BTehng","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[2],"tags":[1190,547,537,295],"class_list":["post-22048","post","type-post","status-publish","format-standard","hentry","category-technology","tag-beos","tag-permissions","tag-filesystem","tag-history"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/22048","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=22048"}],"version-history":[{"count":1,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/22048\/revisions"}],"predecessor-version":[{"id":22049,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/22048\/revisions\/22049"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=22048"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=22048"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=22048"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}