Hello, I've been occasionally, recreationally hacking on 9pfs, and here's what's new:
1. We now have support for writing in most places. Certainly for writing data with io_write, and also many file manipulation RPCs are wired up (but not all of them). 2. We handle various flags like O_CREAT, O_EXCL, O_DIRECTORY. O_EXCL is emulated: we try to open the file, if it doesn't exist we try to create it, if it already exists this second time, we try once again to open it -- this is also what the Plan 9 kernel did, and not as reliable as on Unix, but good enough in practice for picking a "winner" between multiple clients doing O_CREAT|O_EXCL at roughly the same time. 3. We have, through some clever tricks, support for "walking out" of the 9pfs mount, that is to say, ".." in the mount's root directory resolves to the parent directory that hosts the translator, as expected -- this is achieved without making 9pfs assume/cache too much about the remote filesystem's structure, and without giving up server-side multi-part resolution (the distinctive and desirable feature of 9P). Why is this important? Well, it (coupled with io_identity) makes getcwd(3) work, because that's exactly how it's implemented. While we don't support translators yet, this same mechanism also looks quite suitable as a way to implement active translators. 4. We have a hacky read-only mmap support. It should probably be done in a less hacky way, but hey, it works! On the wire / 9P, this amounts to reopening the file and reading pages from it. We pass MEMORY_OBJECT_COPY_DELAY to Mach, but that's a lie: if someone on the remote modifies a file we have mapped, the copy guarantees break down. 5. Finally, as of today, I wired up exec support. Theoretically, with setuid support, even. In practice, this means: you can edit your files (nano totally works). You can 'git clone' a repository onto a 9pfs mount. You can compile code; if you run GNU Make, its file modification time things work out. And you can run your compiled code off of 9pfs -- that's exec and mmap. To rehash, the use case that I'm trying to cover here is: store your source code on some other system, perhaps your favorite GNU/Linux distribution, and edit it there with your favorite editor. Have a 9P server running, and on the Hurd machine, mount the directory using 9pfs; then you can access your files from both machines. You could cross-compile from the other machine (useful for larger projects where SMP gives a significant advantage, cough glibc cough) and run/test on the Hurd, or compile on the Hurd natively -- both work. 9pfs source is on GitHub: https://github.com/bugaevc/9pfs and human contributions are welcome -- send them to this list with [PATCH 9pfs] in the subject. There's still a bunch to do. Enjoy, Sergey
