Reputation: 55
I'm trying to do a custom fs, basically read and write several "virutal files" from others files, the issue here is not the fs I want to make, is in the start on Fuse and FS(file system).
Actually, I'm reading the Fuse documentation, is very well documentated, at least for someone who knows how the FSs works, and this last point is what I can't found, I want to learn the basic of FS to know how to construct my own FS in Fuse, from the high API to the low API.
Every FS can work as it want to works, but there need to exist some common sections, at least, enough common to can exist something like FUSE.
We can read here: https://github.com/libfuse/libfuse/blob/master/example/passthrough.c
The high lvl API work fine, but can not be very efficient, to imporove the FS I'll need the low API.
Oks, so, how noob doc I need? Ideally from the start..., for a FUSE FS., example noob questions?
Why we need to "open" a file?, I know deducting, "close" a file is to sync the file with the disk and "close" the "opened" file
What is a "inode" here?
file descriptors?
what means and why we need to "lock" a file? what happens if we lock a file that is already opened in other app?, we can't look something all the time.., when it need to lock a file, and when it unlock?
I supopse we can open a file several times (running "open" function), is there a limit?
Note, all of this, is just several questions to show the type of questions, answer one by one does not solve the main question (If you answer will help me, but don't lost the focus), I don't know even the start point here, or what I don't know, all of this belongs to FS in general?, or is only FUSE? I'm reading the API, but even with the descriptions, I don't get what means several of them.
I already check on: Using Fuse-Low Level API
Still, this can be not only Fuse knowledge, I know I don't know a lot of this, so please help to get starting points on this.
Thx.
Upvotes: 0
Views: 803
Reputation: 2021
If you don't know what a file description or an inode is, I would suggest to start with some introductory course about unix, eg.: this Refresher course in computer scienc is a good example, see section about POSIX filesystem there (you can find other resources to match your needs if you search yourself). Then you can follow with some fuse specific material, eg. Writing a FUSE Filesystem: a Tutorial or Develop your own filesystem with FUSE.
Upvotes: 0