Brendan wrote:
IMHO, pipes and sockets are essentially volatile (when you turn the computer off they're gone), so using non-volatile storage for these things is entirely unnecessary (excluding the swap space, I guess). I was wrong about character and block devices in ext2 - I didn't realize the Unix world was so lame (you'd think I'd know by now).
I'm just going to be a bit nitpicky here and point out that it's not just ext2 that supports this, but all UNIX filesystems, including ZFS. It's part of the POSIX spec. Although I will agree that using non-volatile storage for pipes and sockets is silly. All applications that use them first test for their existance and will create them if necessary, or error out as appropriate. IMO, the pipe and socket file types could be stored entirely in RAM. However, I can see some use cases for doing it the way it's done now as well.
My whole reason for posting to this thread in the first place wasn't to say 'yea' or 'nay' to an alteration of the SFS spec so much as it was to correct a little bit of mis-information.
However, since I'm here I may as well throw in my (probably worthless) opinion.
While I think the spec
could be altered to add the support JamesM wants, I tend to agree with Brendan in that SFS simply isn't the right tool for the job. There's too much missing from this filesystem for it to really be useful as the primary OS in a UNIX-clone. Granted, linux does have FAT32 support and all the owner/group information is emulated and stored in memory, but it is used primarily for the same reason as SFS was designed -- for transferring data between computers.
Regardless of if the SFS spec does get altered or not, it is functionality that could simply be ignored by an implementation. An OS that doesn't support UNIX style character or block devices could simply ignore those filetypes, not even displaying them as being on the disk (as long as it didn't erase them from the disk).
James -
I'm sure you picked SFS because of it's simplicity, and simplicity in a tutorial series is good, but I'd rather see something like a ramfs, and they're rather easy to implement. If you really want to go all out, you could go for read-only ext2 support, or a fat32 driver.