How do you do your VFS?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
Candy
Member
Member
Posts: 3882
Joined: Tue Oct 17, 2006 11:33 pm
Location: Eindhoven

How do you do your VFS?

Post by Candy »

I was trying to figure out how to make multiple filesystems fold into one as I'm now making the generic register-filesystem logic (and register-device logic). I got to wondering, how do you figure out what goes where...

Windows puts every partition into its own drive letter and does not have anything more complicated than that (* other than winNT which has mount points, that nobody knows about).

Linux and related systems have a root FS and mount stuff into it according to some file on the root filesystem.

I don't like either. Windows is very arbitrary and unintuitive - is F: my cdrom drive, my network drive, a USB stick or half of an SD card? Linux on the other hand is unfriendly to auto-mounting which is one of my design desires, where most distros automount things into /media or /mnt. I don't know of any other designs right now, but can't think of many other logical ones.

What does your VFS look like? Why do you think that's a good design, and what things do you want in a VFS?
User avatar
Rusky
Member
Member
Posts: 792
Joined: Wed Jan 06, 2010 7:07 pm

Re: How do you do your VFS?

Post by Rusky »

What makes *nix filesystems unfriendly to automount? /media makes perfect sense to me.

I have seen systems that refer to drives like Windows but with more intuitive names (that end up being unintuitive when the OS's view and the user's view of something don't match up) like "cdrom0:" and "floppy0:" and "ide0:".
User avatar
iansjack
Member
Member
Posts: 4707
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: How do you do your VFS?

Post by iansjack »

You can set any Linux system to automount file systems wherever you choose. I think it's a brilliant design.
onlyonemac
Member
Member
Posts: 1146
Joined: Sat Mar 01, 2014 2:59 pm

Re: How do you do your VFS?

Post by onlyonemac »

Actually, I don't like my filesystems to automount anyway. But the *NIX concept is really good, because one can split subdirectories across multiple partitions like I did on my one computer and link directories across different filesystems with symbolic links like I did on my other computer that has two Linux installations in separate partitions but they both automount each other's root filesystems and then there's a link pointing to a certain subdirectory of the other system's home folder in the current system's home folder (it's a long story as to why I haven't linked the entire home directories or put the home directories on a separate partition).
When you start writing an OS you do the minimum possible to get the x86 processor in a usable state, then you try to get as far away from it as possible.

Syntax checkup:
Wrong: OS's, IRQ's, zero'ing
Right: OSes, IRQs, zeroing
Post Reply