FAT file system
FAT file system
since i am a relative beginner to osdeving, should i use someone else's file system (FAT32), before i write my own?
oh microsoft, microsoft, what souls you have dismayed
As much as I understand the first rule, I disagree on the use of FAT. FAT is bad for you, especially those kinds of saturated FAT's like FAT32. Try using something else that your operating system also supports, but do shy away from the most complex filesystems (no NTFS, ReiserFS etc.). What about FFS or Ext2?pcmattman wrote:Don't write your own filesystem until you've finished your kernel. It's too much of a distraction. Use FAT (but not only FAT32, also FAT16 and FAT12).
I would consider FAT a bad choice for a first filesystem for any new operating system, as the assumptions you will implicitly make during its implementation will limit any other filesystem's performance. Also, you'll further the commonality of FAT, encouraging others to do the same.Combuster wrote:The reason to put FAT first, is that it is standard for floppy disks. Most likely that is the first file system you'd get into contact with. If you have linux + harddisk driver candy's right and Ext2 is probably a better choice.
-
- Member
- Posts: 2566
- Joined: Sun Jan 14, 2007 9:15 pm
- Libera.chat IRC: miselin
- Location: Sydney, Australia (I come from a land down under!)
- Contact:
Actually, I disagree, Candy.
The reason why I choose and promote FAT is because it is standard. Linux supports it, Windows supports it (even Apple computers support it). If I write a FAT32 driver I know that people's USB devices will work with my OS (once I get usb working
).
Also, I use Windows which makes working with anything other than FAT filesystems tedious and difficult.
If I only ever used Linux and every drive I owned was Ext2, well, then I would have to write an Ext2 driver.
And,
I don't see how implementing one filesystem can affect another's performance, unless you treat Ext2 more like FAT or something insane like that.
The reason why I choose and promote FAT is because it is standard. Linux supports it, Windows supports it (even Apple computers support it). If I write a FAT32 driver I know that people's USB devices will work with my OS (once I get usb working
![Very Happy :D](./images/smilies/icon_biggrin.gif)
Also, I use Windows which makes working with anything other than FAT filesystems tedious and difficult.
If I only ever used Linux and every drive I owned was Ext2, well, then I would have to write an Ext2 driver.
And,
A filesystem should be implemented to be transparent. I should be able to have my fread function decide, based on what it has already found out about the drive, which filesystem driver to call.as the assumptions you will implicitly make during its implementation will limit any other filesystem's performance
I don't see how implementing one filesystem can affect another's performance, unless you treat Ext2 more like FAT or something insane like that.
The filesystem and interface SHOULD be implemented based on what the device can do and what a file system can use/do. However:pcmattman wrote:And,A filesystem should be implemented to be transparent. I should be able to have my fread function decide, based on what it has already found out about the drive, which filesystem driver to call.as the assumptions you will implicitly make during its implementation will limit any other filesystem's performance
I don't see how implementing one filesystem can affect another's performance, unless you treat Ext2 more like FAT or something insane like that.
- If my filesystem supports arbitrary attributes, your interface won't be able to handle them
- If you think about permissions, FAT is a disaster
- You can't use inodes in your interface since FAT doesn't know them
- Copy on write files
- Name changing directories
- Symlinks
- Need I continue?
You will limit your interface to the filesystem to the lowest common denominator, effectively halting progress. Especially since you'll adapt new file systems to the old interface since that only involves changing one driver and not two or more. Not to mention people in the past having made interfaces specifically tailored to FAT, such as being able to cache the disk area where the FAT would be (explicitly) and only allowing 32k/64k reads to be efficient.
Nothing mentioned above that I haven't already seen in existing implementations, by the way. This is purely practical experience.
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
SFS isn't quite Candy's homegrown filesystem. He uses something with a load of guru features even I probably won't even bother with the next few years... ![Rolling Eyes :roll:](./images/smilies/icon_rolleyes.gif)
There was a thread on it - here
![Rolling Eyes :roll:](./images/smilies/icon_rolleyes.gif)
There was a thread on it - here
SFS supports, iirc, symlinks. It isn't intended to be a full-blown filesystem for OS hosting use, it's intended for removable media and exchanging information. I'm developing my own filesystem with support for at least the items above; you don't have to take my FS for it though, the very recently developed ZFS has nearly all of them as well. There's ext3cow for copy on write (without decent interface, I think), you can rename files in any unix without any effect and so on & forth.mikegonta wrote:Another grain of salt in the ocean.Candy wrote:Also, you'll further the commonality of FAT, encouraging others to do the same.
But seriously, could you elaborate on these SFS features.Mike GontaCandy wrote:- If my filesystem supports arbitrary attributes, your interface won't be able to handle them
- If you think about permissions, FAT is a disaster
- You can't use inodes in your interface since FAT doesn't know them
- Copy on write files
- Name changing directories
- Symlinks
http://groups.google.com/group/aeBIOS/about?hl=en
If you base your OS on FAT, it'll show clearly in your unix file system support code.