Lines Matching refs:ublk

4 Userspace block device driver (ublk driver)
10 ublk is a generic framework for implementing block device logic from userspace.
13 new virtual block device such as ublk-qcow2 (there are several attempts of
28 ublk block device (``/dev/ublkb*``) is added by ublk driver. Any IO request
29 on the device will be forwarded to ublk userspace program. For convenience,
30 in this document, ``ublk server`` refers to generic ublk userspace
43 assigned by one queue wide unique tag. ublk server assigns unique tag to each
47 ``io_uring`` passthrough command; that is why ublk is also one io_uring based
49 give better IOPS than block IO; which is why ublk is one of high performance
51 done by io_uring, but also the preferred IO handling in ublk server is io_uring
54 ublk provides control interface to set/get ublk block device parameters.
55 The interface is extendable and kabi compatible: basically any ublk request
56 queue's parameter or ublk generic feature parameters can be set/get via the
57 interface. Thus, ublk is generic userspace block device framework.
58 For example, it is easy to setup a ublk device with specified block
61 Using ublk
64 ublk requires userspace ublk server to handle real block device logic.
66 Below is example of using ``ublksrv`` to provide ublk-based loop device.
70 ublk add -t loop -f ublk-loop.img
82 ublk list
86 ublk del -a
87 ublk del -n $ublk_dev_id
97 ublk driver provides global misc device node (``/dev/ublk-control``) for
98 managing and controlling ublk devices with help of several control commands:
102 Add a ublk char device (``/dev/ublkc*``) which is talked with ublk server
119 pthread & io_uring for handling ublk IO), this command is sent to the
126 ublk server will release resources (such as destroying per-queue pthread &
131 Remove ``/dev/ublkc*``. When this command returns, the allocated ublk device
148 Same purpose with ``UBLK_CMD_GET_DEV_INFO``, but ublk server has to
151 ublk device, and introduced with ``UBLK_F_UNPRIVILEGED_DEV`` together.
158 If ublk server supports ``UBLK_F_UNPRIVILEGED_DEV``:
160 ublk server should send ``UBLK_CMD_GET_DEV_INFO2``, given anytime
166 If ublk server doesn't support ``UBLK_F_UNPRIVILEGED_DEV``:
173 If ublk server supports ``UBLK_F_UNPRIVILEGED_DEV``:
179 If ublk server doesn't support ``UBLK_F_UNPRIVILEGED_DEV``:
187 command is accepted after the old process has exited, ublk device is quiesced
190 ublk device is ready for the new process.
195 command is accepted after ublk device is quiesced and a new process has
196 opened ``/dev/ublkc*`` and get all ublk queues be ready. When this command
197 returns, ublk device is unquiesced and new I/O requests are passed to the
205 With ``UBLK_F_USER_RECOVERY`` set, after one ubq_daemon(ublk server's io
206 handler) is dying, ublk does not delete ``/dev/ublkb*`` during the whole
207 recovery stage and ublk device ID is kept. It is ublk server's
212 With ``UBLK_F_USER_RECOVERY_REISSUE`` set, after one ubq_daemon(ublk
220 Unprivileged ublk device is supported by passing ``UBLK_F_UNPRIVILEGED_DEV``.
224 commands by ublk driver, for doing that, path of the char device has to
225 be provided in these commands' payload from ublk server. With this way,
226 ublk device becomes container-ware, and device created in one container
232 ublk server needs to create per-queue IO pthread & io_uring for handling IO
254 IO pthread for ublk driver to setup IO forward environment.
274 issued to ublk server without data copy. Then, IO backend of ublk server
283 should not enable UBLK_F_NEED_GET_DATA. ublk server pre-allocates IO
285 buffer to communicate with ublk driver. However, existing project may
290 - data copy between ublk server IO buffer and ublk block IO request