pluto
pluto copied to clipboard
VFS close root node
Currently, you can't close the root directory node as this isn't opened in the traditional case using open
.
We want to keep the root around at all times. I think this has exposed a possible design or mental representation issue with the VFS: we want to let a process open any node (including the root) and close it when they are done since we'd want to release the file handle etc., but if this then called the close function on the node it would close it for all other processes too, which we wouldn't want. Perhaps we need to have a think about what closing actually means.
I'm not sure how much my comment will help here but we could have a look at how Serenity OS implements VFS
https://www.github.com/SerenityOS/serenity/tree/master/Kernel%2FFileSystem%2FVirtualFileSystem.cpp