| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
to keep coherent with other storeio translators, grub scripts, etc.
* rumpdisk/block-rump.c (translate_name): Prepend /dev/ to disk name.
(is_disk_device): Do not match heading /dev/.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
By default we do not want rumpdisk to step over the kernel drivers.
* rumpdisk/block-rump.c: Include <device/device.h>.
(disabled): New variable.
(dev_to_port): Rename to rumpdisk_dev_to_port.
(device_init): Rename to rumpdisk_init. Exit if the kernel runs SATA
drivers.
(device_close): Rename to rumpdisk_device_close.
(device_dealloc): Rename to rumpdisk_device_dealloc.
(device_shutdown): Rename to rumpdisk_device_shutdown. Do not shutdown
when disabled.
(device_open): Rename to rumpdisk_device_open. Return D_NO_SUCH_DEVICE
when disabled.
(device_write): Rename to rumpdisk_device_write.
(device_read): Rename to rumpdisk_device_read.
(device_get_status): Rename to rumpdisk_device_get_status.
(rump_block_emulation_ops): Update refs accordingly.
|
|
|
|
|
|
|
|
|
|
| |
* rumpdisk/block-rump.c (struct block_data): Make taken field an integer
instead of a boolean.
(device_open): When search_bd succeeds, set a new reference and return a
new port right. Separate out io_return_t err, int fd, and int ret to avoid
confusions. Simplify the error handling path.
(device_close): Decrement reference and close rump disk only when
reaching zero. Also destroy our port.
|
|
|
|
|
|
|
|
|
|
|
|
| |
bootstrap translators may not wish to appear in the FS, and the name of
the translator does not have to match the path where it is getting
installed.
* libmachdev/machdev.h (machdev_trivfs_init): Add path parameter.
* libmachdev/trivfs_server.c (machdev_trivfs_init): Add path parameter,
set devnode only if it is not NULL.
(trivfs_S_fsys_init): Only call install_as_translator when devnode is not NULL.
* /rumpdisk/main.c (main): Add path parameter.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
*/libmachdev/trivfs_server.c (machdev_ctl): Rename to control_port.
(trivfs_S_fsys_init): Fix accordingly.
(control): New variable.
(bootstrapped, underlying, devnode): New variables.
(install_as_translator): New function.
(trivfs_S_fsys_init): When bootstrapping, call install_as_translator.
(machdev_trivfs_init): Create one port of the control class.
(trivfs_S_fsys_getpriv): Use ports_get_send_right on the control port
instead of creating another one.
(resume_bootstrap_server): Use ports_get_send_right on the control port
instead of creating another one.
(machdev_trivfs_init): When bootstrapping, Use our control port as fsys.
|
| |
|
|
|
|
|
|
| |
TESTED by booting a QEMU passthrough disk via rumpdisk.static
Message-Id: <20201109070906.20796-1-damien@zamaudio.com>
|
|
|
|
| |
Message-Id: <20200801050538.273196-1-damien@zamaudio.com>
|
|
|
|
| |
Message-Id: <20200725011847.186969-4-damien@zamaudio.com>
|
|
|
|
| |
Otherwise we would crash after an unsuccessful device_open call.
|
|
|
|
| |
There is no need to store the error only to return it.
|
|
|
|
|
| |
* rumpdisk/block-rump.c (device_open): Reduce the dev_name buffer size
by one (unused) byte.
|
|
|
|
|
|
|
| |
To match snprintf parameter order.
* rumpdisk/block-rump.c (translate_name): Make `name' parameter last.
(device_open): Fix translate_name call accordingly.
|
|
|