[haiku-development] Re: Writing a filesystem driver

  • From: "Axel Dörfler" <axeld@xxxxxxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Mon, 26 Oct 2009 14:12:56 +0100

Alexander Botero-Lowry <alex.boterolowry@xxxxxxxxx> wrote:
> > BFS in this way is time well spent - it would probably be a better 
> > idea 
> > to implement a new file system based on ideas found in more 
> > recently 
> > developed file systems (but, of course, still with support for 
> > queries).
> What are the issues with BFS, and what new features are compelling
> enough to warrant a new file system?

BFS has several issues that can only be solved with breaking binary 
compatibility. To solve all of them, I would think it's a better idea 
to start a new file system (based on the BFS sources) than to try to 
remain compatible.

To mention the ones I currently remember without further investigation:
* The space of files that were deleted, but still in use is lost after 
a system crash (checkfs fixes that, so it's a good idea to run it from 
time to time after crashes).
* There is a global block bitmap that could solved better using some 
* The index is not written for user queries (looking up wildcards can 
be pretty expensive).
* There is a single fixed size log which theoretically prevents some 
operations from happening (those that doesn't fit into the log 
* Writing meta data is essentially single threaded (as there is only 
one log).
* The double indirect block range is implemented in a stupid way which 
makes it almost useless (it could cover a lot more space easily).
* No support for hard links.
* One inode covers a whole block, and it only embeds attribute data 
into that block (could do the same with file data).
* Potentially scatters inodes over the whole disk (somewhat balanced by 
its allocation policies) that aren't optimal for directory reading 
* The B+trees fragment over time.
* No data correctness facilities (ie. data cannot be placed in the log, 
and there are no checksums either).
* The indexes hurt performance as they are updated synchronously.

Nothing too bad, but still a lot of room for improvements.


Other related posts: