While studying VFS, this question popped into my head. Is it okay to think of VFS as a module?

The reason why I thought like that is because VFS has the characteristic of simplifying actual file management to kernel/user space. This seemed something like a device driver would do and it got me thinking.

But then again, if VFS is something that is statically compile within the kernel I guess it can not be regarded as a module.


You don't specify which operating system you are asking about, but the answer is likely to be the same for all of the mainstream general purpose ones.

TL;DR: The VFS is not a module.

In general, the VFS is too much integral to the basic functionality of the kernel to be able to be configured as a (optional) module. Everything to do with files and pathnames and mount points and filesystems is basically hooked in to the VFS. Every system call that takes a pathname or file descriptor, from open() to rename() to execve() hooks in to the VFS. Without that last one you cannot, well... run any software.

There are operating systems that do not have a VFS or where the VFS is an optional component, but then those operating systems don't have the concept of files with names. Think microcontrollers, like the "operating system" in your digital thermostat.


On Solaris (note that VFS was invented by Sun SunOS-3.x in the mid-1980s) everything possible is dynamically loaded into the kernel....since 1992. VFS however is statically linked into /kernel/genunix. Even krtld the kernel runtime linker is loaded but genunix needs to be able to early mount the root filesystem as one of the first operations, so there is no way to make this loadable.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.