-
Notifications
You must be signed in to change notification settings - Fork 200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for virtio 9p filesystem #23
Comments
In principle done. |
Could you expand on how this enables the mounting of a file system outside of the VM? What api is exposed that enables this? |
You can describe the filesystem as "filesystem as a device". Instead of having a block device with linear access to a data area, you send open, close, read,write,rename,remove,.... commands to the device. The interface to this filesystem device is virtio implemented as memory managed IO. The implementation and API of the filesystem is in the following file: https://github.com/s-macke/jor1k/blob/master/js/worker/filesystem/filesystem.js The API to access the filesystem from the master thread (where the graphical web elements reside) is pretty limited. Take a look at the following demo for watching a file: http://s-macke.github.io/jor1k/demos/watch.html |
That is exactly what I am after, full control of the filesystem from outside the emulator. I was looking around and found https://github.com/s-macke/jor1k/blob/master/js/worker/filesystem/filesystem.js , but I wasn't too sure if that was the correct point of entry as the stack trace was showing interaction with virtio 9p as well. |
Yes, that is the correct way to handle the filesystem. Just add the message handling to both files and you are done. Most functions are implemented in an atomic way. The only exception is the open function which might put the execution of the function in a queue until the file is loaded from the server. Also you will get problems when you alter or remove a file, which is currently opened by Linux. |
Support for the virtio 9p filesystem would allow us to manage a whole filesystem outside of the emulated machine.
For example a home folder which is mounted via the FileSystem APIs of modern web browsers.
Once this is done we can use 9p as root filesystem and load directly files from the webserver instead of a block device image.
The text was updated successfully, but these errors were encountered: