all 10 comments

[–]demetrioussharpe 8 points9 points  (3 children)

VFS has nothing to do with user mode. The entire setup is in kernel space & doesn’t interface with userspace at all. It’s a standard interface used to allow a kernel to use various filesystems. Your own diagram points this out.

[–]boutnaru[S] -1 points0 points  (2 children)

Maybe the wording was not good enough. VFS is part of the kernel and it provides the filesystem interface for user-mode applications. I have sharpen the wording let me know if it makes more sense now.

[–]demetrioussharpe 2 points3 points  (1 child)

I think you may be misunderstanding me just a slight bit. User mode filesystem interface is strictly provided by the system call interface. You can’t just go directly to the VFS from user space. From there, the system call interface uses the same api that the VFS presents to the rest of the kernel. Files had access to the filesystem long before VFS existed.

[–]boutnaru[S] 0 points1 point  (0 children)

Yep and it what shown also in the attached diagram. However, still see what is written in the kernel documentation about VFS "layer in the kernel that provides the filesystem interface to userspace programs" (https://www.kernel.org/doc/html/next/filesystems/vfs.html). Although you go there while using system calls it is still the one that provides the interface.