GNU/Linux is a monolithic kernel, meaning that a lot of functionality
is baked into the kernel, including filesystems like ext4
or xfs
.
Alternatively, the Hurd's filesystems are in userspace, but our disk
device drivers are baked into the GNU Mach kernel image (via
DDE). With rumpdisk, the Hurd can
use SSDs with userspace device drivers! RumpDisk uses libmachdev
as
a helper library.
libmachdev
exposes devices to userspace via some Mach device-*
RPC
calls. libmachdev
provides a trivfs that intercepts the
device_open
RPC, which the /dev
node uses. It also fakes a
filesystem node, so you can mount a netfs
onto it. You still have
to implement device_read
and device_write
yourself, but that code
runs in userspace. An example of this can be found in
rumpdisk/block-rump.c
.
If serverboot V2 is written, then
libmachdev
could be simplified or maybe removed.