[haiku-development] Re: Call for help: FAT file system module

  • From: John Scipione <jscipione@xxxxxxxxx>
  • To: "haiku-development@xxxxxxxxxxxxx" <haiku-development@xxxxxxxxxxxxx>
  • Date: Thu, 14 Jan 2010 14:35:39 -0500



On Jan 14, 2010, at 6:45 AM, Niels Reedijk <niels.reedijk@xxxxxxxxx> wrote:

Hi Stephan,

2010/1/14 Stephan Assmus <superstippi@xxxxxx>:
Hi Romain,

thanks for stepping up! Writing file systems on Haiku is actually
documented:

<http://api.haiku-os.org/fs_modules.html>

AFAIK, this documentation is up to date.

Almost. There was a major update to the API since writing the
documentation. I will try to fix that, though I might need some input
from devs.

N>

I would imagine that the FAT filesystem must have a lot of gotchas and undocumented API calls because it was developed over many years behind closed doors at Microsoft and so therefore I would suggest not starting over from the ext2 module since despite the code cleansliness many undocumented fixes will be lost. Would it be practical to look at the fat module from the freebsd project to learn the gotchas first? I realize that the fs modules on freebsd are all using a common set of Apis that all call the same read() write() hooks from the various filesystem modules. The design of the freebsd fs module has been well documented in "The Design and Implentation of The FreeBSD Operating System" so imagine a lot of information about how that operating system impliments its fs layer could be learned without having to look at the source code. I do not know if Haiku used a similar approach but it probably should. My guess is that Haiku is very BFS centric at this point so a lot of the code that should be general to all filesystems will be found in that module. I furthermore realize that my suggestion to create a more general fs layer is a lot more work than you probably want to do to get fat working but I think in the future perhaps after R1 it would be a good idea to move in that direction. For now see what documentation you can find on a real world example of a fat filesystem. Something open source would be preferrable even if the license prevents you from using the code directly.

John Scipione

Other related posts: