On 2013-01-10 16:09:49 (-0500), Simon <turner25@gmail.com> wrote:
Firstly, I was wondering if it would be possible to implement the filesystem entirely as a kernel module. I would need TCP/UDP sockets. I think this is really not the recommended approach, but an advantage I see is it could be used to mount the root filesystem before calling init (that would be before user-space exists, right?). On the other hand, separating the work to have a program/daemon in user-space do the communication and processing would allow me to write that part in C++ (which I personally prefer).
It's certainly possible to implement a network file system entirely in kernel space. That's where NFS is implemented. If you *really* care about performance it's pretty much the only way to go. If you don't you should keep as much as possible in user space. In either case I'd recommend you start your development on top of fuse though. That means you can implement all new code in user space, in whatever language you prefer. It'll be much easier to debug in any case. Think of it as a fast prototype, to validate your protocol. Kristof