iansjack wrote:
I think you are wrong about implementing ext2, which is a much more capable filesystem than FAT. It is a very good first step towards ext3 and ext4, and it shares many design features with other more capable filesystems. FAT is an anomaly that is nothing like most other modern filesystems. Ext2 is well documented and the level of difficulty is no more than implementing other parts of the operating system.
FAT may be easy, but it is only a stepping stone. Akin to playing with building blocks rather than building something useful with real bricks. Sure Linux doesn't use ext2 any longer; you may have noticed that it doesn't use FAT either. No modern OS uses FAT, or anything remotely related to it, as the primary filesystem; several use filesystems closely related to ext2.
I thought I wrote it clearly, looks like I didn't - FAT is more useful to have as a first implemented FS for an osdev enthusiast, because it is still widely used as a FS for removable storage devices. so having it implemented, one gets 2 in 1 - experience with FSs and also his/her work will be really useful, and not just lying dormant, since ext2 is a nearly extinct linux legacy. we all have USB sticks, our imaginary users have them. and all of them are formatted as FAT disks. imagine, our poster finishes his/her FAT driver and what an excitement it will be for him/her to insert a USB stick and list its contents from within his/her own OS. (of course, it will happen only after he/she is done with EHCI/UHCI/OHCI/XHCI stuff,
but it's another story, ext2 won't help with anyway). his/her users also would be happy to have that when playing with his/her OS. with FAT support, his/her OS will be more functional, because no matter whether you like it or not, FAT is still (and will be) widely used and embedded into several standards, I said that already. there will be no such an expereince with ext2, certainly. I thought it's so obvious. and I specifically emphasized about the "primary" FS:
zaval wrote:
Of course, as your OS advances, you will want to either invent your own fancy FS or choose some more capable one as a "boot" FS for the OS - FS on which you want your OS would be installed.
So I don't really understand, why this argument about "primary" FS from you. ext2 btw is as bad for the primary FS as FAT is, but FAT is good for small removable storages and is used there, ext2 isn't.
also, I disagree with the statement about FAT being a "stepping stone" not giving one to "build" something. it's simple enough for a starter, still it leaves room for challenges - the already mentioned embedding your own extensions for bringing permission control for example. or optimizations. think of it - the FS scales poorly with modern large volume sizes, it was not designed for such, so thinking out some "in memory" optimizing things to the FAT "engine" would be both useful and learning. for example speeding up directory lookup by generating in memory a more scalable (than just a list) structure for directories. or sophisticated cluster allocator (free space handling). and again as a FS, FAT is just yet another FS for the remaining OS components, it's totally untrue to think, that choosing FAT vs. ext2 would prevent one from making, say cache manager or VFS or whatever good.
Solar wrote:
You mean exFAT, which is not the same thing as FAT/FAT32.
No, I meant the whole FAT family. exFAT is standard for only SDXC cards. but anyway, exFAT is being released by MS for implementations. for linux already. there are some uncertainties about others, but I believe, it will be cleared up eventually.
Solar wrote:
You mean the filesystem based on FAT, the specification of which is part of the UEFI specs and independent of the original FAT specs?
Can you tell what the real differences between those are and are there? The relevant passage in the spec basically tells us, that it's a fixed version of FAT32 (1.03) with no additions in future. for compatibility. I guess, FAT by itself is fixed for a long time. so, the only difference is another OSType value in the partition scheme, which is outside of a FAT driver scope anyway. The whole relevant quote:
Quote:
12.3 File System Format
The file system supported by the Extensible Firmware Interface is based on the FAT file system. EFI defines a specific version of FAT that is explicitly documented and testable. Conformance to the EFI specification and its associate reference documents is the only definition of FAT that needs to be implemented to support EFI. To differentiate the EFI file system from pure FAT, a new partition file system type has been defined.
EFI encompasses the use of FAT32 for a system partition, and FAT12 or FAT16 for removable media. The FAT32 system partition is identified by an OSType value other than that used to identify previous versions of FAT. This unique partition type distinguishes an EFI defined file system from a normal FAT file system. The file system supported by EFI includes support for long file names.
The definition of the EFI file system will be maintained by specification and will not evolve over time to deal with errata or variant interpretations in OS file system drivers or file system utilities. Future enhancements and compatibility enhancements to FAT will not be automatically included in EFI file systems. The EFI file system is a target that is fixed by the EFI specification, and other specifications explicitly referenced by the EFI specification.
For more information about the EFI file system and file image format, visit the web site from which this document was obtained.
Try to follow their logic, expressed this dimly in the quote, and you'll find*, that their FAT is not "independent" from the original one, it's fixed at the chosen version. they don't specify FAT, there is no FAT doc from UEFI, they reference MS site.
* - the last sentence in the quote, in fact suggests you to visit this page, intended to deal with broken external links (ironically, the FAT link is broken now
), -
https://uefi.org/uefi (exactly where you are directed to by the "References" appendix, in the 2.5+ version). there, you see the link to the MS FAT spec. also in the "References" section of both 2.4 and 2.7 explicitly stated the version of FAT32 - 1.03.