Closed iefserge closed 9 years ago
In another thread there was reference to using Ext2. If you're starting from scratch, may I please request a more fault-tolerant file system? Something like BtrFS or ZFS? I really think the community will appreciate it later, and it would be easier to change now, right?
VFS is high level abstraction and interface for programs to every supported filesystem. So its easy to add new or replace an existing FS later. Ext2 was chosen because it should be much simpler to implement.
Wouldn't it be better to offer a higher-level filesystem API (FUSE)? Or are they at a similar abstraction layer?
@piranna Sorry, haven't seen your last question. What higher-level filesystem API FUSE provides? I think it's just a userspace fs implementation.
fuse request an api with a command for each fs related linux system call. you can look at fuse4js. Another high level api is pyfilesystem.
No longer relevant.
No longer relevant.
Why is it no longer relevant?
@piranna Well, at the moment there is no filesystem and all files need to be bundled up into single javascript bundle using Browserify. I agree, that it would probably be a good idea to support mutable filesystem in a future and have a VFS integrated, but the current implementation I've been working on no longer fits into overall system design.
How works the current implementation? Maybe you could use something like fatfs module to have a basic filesystem where to work with...
@piranna fatfs module is very cool, yep, we should be able to use it. This would require virtio disk driver implementation though.
You are right, first it should be added a disk driver, if not only possible filesystems would be memory-only.
I'm thinking: since fatfs return an object with the same API that the Node.js fs module this could be used as basis for the VFS so there's no need for a "pure" VFS mechanism, you could use the filesystem objects directly, or a filesystem object where other ones could be attached. VFS + FUSE(-ish) system + ad-hoc user defined filesystems all for the same prize :-D
Implement VFS filesystem layer. Provide access to initrd filesystem, mount to
/initrd
.