News for hackers. Stuff that matters.
Re:Plan 9 from Bell Labs by tyingq on Sunday March 21, 2021 @08:21PM (#26535413)
The 9p filesystem found its way into KVM's VirtFS. Curious if there's other active places where parts of Plan 9 are being used.
Re:Plan 9 from Bell Labs by paul_f on Sunday March 21, 2021 @09:35PM (#26535901)
The original Cisco PIX firewall used modified Plan 9 as the operating system. In fact, despite the official history, the name PIX came from Plan 9, or Plan IX. I know this because the person who wrote the entire PIX software stack, Brantley Coile, told me.
Re:Plan 9 from Bell Labs by lsllc on Sunday March 21, 2021 @08:27PM (#26535452)
Much of the Golang toolchain came from Plan 9:

https://news.ycombinator.com/item?id=8817990

EDIT: and the Gopher mascot was designed by Reneé French who also designed Glenda the Plan 9 bunny:

https://golang.org/doc/faq#gopher

Re:Plan 9 from Bell Labs by LukeShu on Sunday March 21, 2021 @08:57PM (#26535660)
Shoot, much of the Go lang team came from Plan 9. And they brought a lot of code and ideas with them.

Currently on my mind os `os.FileMode`; here's a comment I wrote in some Go code that interfaces with Python:

    // A StatMode represents a file's mode and permission bits, as represented in Python
    // (i.e. `os.stat()`'s `st_mode` member).  Similar to how Go's `os.FileMode` assigns bits to have
    // the same definition on all systems for portability, Python's `stat` assigns bits to have the same
    // definition on all systems for portability.  And it just so happens that Go's bits match those of
    // Plan 9, and Python's bits match those of the Linux kernel.
    type StatMode uint16
PS: If you weren't aware, Renée French's connection to Plan 9 and Go is largely that she's married to Rob Pike.
Re:Plan 9 from Bell Labs by lsllc on Sunday March 21, 2021 @09:06PM (#26535724)
I did not know the about Reneé and Rob! Thanks!
Re:Plan 9 from Bell Labs by dmitshur on Sunday March 21, 2021 @09:49PM (#26535992)
The image and image/draw package design[1] is also inspired by Plan 9.

[1] https://blog.golang.org/image-draw

Re:Plan 9 from Bell Labs by glangdale on Sunday March 21, 2021 @08:42PM (#26535532)
It's used, bizarrely enough, to communicate between the Windows and Linux sides of Windows Subsystem for Linux 2 - if I remember correctly, it's used to expose NTFS to the Linux side.
Re:Plan 9 from Bell Labs by PAPPPmAc on Sunday March 21, 2021 @10:50PM (#26536353)
And in roughly the same role (Host FS parts exposed to the VMs) in ChromeOS's Crostini container runtime.

https://chromium.googlesource.com/chromiumos/docs/+/HEAD/con...

Re:Plan 9 from Bell Labs by xfer on Sunday March 21, 2021 @11:55PM (#26536689)
Isn't WSL using 9p to mount the linux fs on windows side? https://devblogs.microsoft.com/commandline/whats-new-for-wsl...
Re:Plan 9 from Bell Labs by akhilcacharya on Sunday March 21, 2021 @09:54PM (#26536026)
Why is the 9P filesystem used to frequently for these applications? Is it just that much better than the alternatives?
Re:Plan 9 from Bell Labs by jsolson on Sunday March 21, 2021 @10:21PM (#26536186)
In general, 9P2000 is simple and fairly elegant. If you don't need POSIX semantics (and fs metadata), it's really quite simple to implement. For a bit more cost in terms of complexity you can go for 9P2000.u which makes things POSIXy enough if you've got a single client (as you do with VM -> host). This is great if you want to provide virtual filesystems, either proxied from the host or backed by something more exotic. In addition to QEMU, the gVisor folks (https://gvisor.dev/) have made heavy use of 9P (with enhancements) for similar reasons (in addition to Google being generally populated with Plan 9 aficionados).

Then, there's 9P2000.L... This has that "let's just take the filesystem vtable and export it as a protocol" flavor. This works well enough on Linux if you're just looking to translate the calls over into syscalls. I wouldn't recommend implementing a bespoke server for it, though. You're better off just implementing things with FUSE.