PackageDescription | LIO is the SCSI target in the Linux kernel. It is entirely kernel
code, and allows exported SCSI logical units (LUNs) to be backed
by regular files or block devices. But, if we want to get fancier with
the capabilities of the device we're emulating, the kernel is not
necessarily the right place. While there are userspace libraries for
compression, encryption, and clustered storage solutions like
Ceph or Gluster, these are not accessible from the kernel.
The TCMU userspace-passthrough backstore allows a userspace process to
handle requests to a LUN. But since the kernel-user interface that
TCMU provides must be fast and flexible, it is complex enough that
we'd like to avoid each userspace handler having to write boilerplate
code.
tcmu-runner handles the messy details of the TCMU interface -- UIO,
netlink, pthreads, and DBus -- and exports a more friendly C plugin
module API. Modules using this API are called "TCMU handlers". Handler
authors can write code just to handle the SCSI commands as desired,
and can also link with whatever userspace libraries they like. |