Lines Matching refs:a

10 A block device is a storage device that supports reading and writing data in
15 The block device layer consists of a single generic library in `lib/bdev`,
16 plus a number of optional modules (as separate libraries) that implement
20 API. For a guide to implementing a bdev module, see @ref bdev_module.
22 The bdev layer provides a number of useful features in addition to providing a
32 Users of the bdev API interact with a number of basic objects.
34 struct spdk_bdev, which this guide will refer to as a *bdev*, represents a
35 generic block device. struct spdk_bdev_desc, heretofore called a *descriptor*,
36 represents a handle to a given block device. Descriptors are used to establish
37 and track permissions to use the underlying block device, much like a file
51 abstracted by the header file include/spdk/thread.h. See @ref concurrency for a
63 All block devices have a simple string name. At any time, a pointer to the
74 In order to send I/O requests to a block device, it must first be opened by
75 calling spdk_bdev_open_ext(). This will return a descriptor. Multiple users may have
76 a bdev open at the same time, and coordination of reads and writes between
78 layer. Opening a bdev with write permission may fail if a virtual bdev module
84 When a block device is opened, a callback and context must be provided that
87 the callback will be called on each open descriptor for a bdev backed by
88 a physical NVMe SSD when the NVMe SSD is hot-unplugged. In this case
89 the callback can be thought of as a request to close the open descriptor so
91 exist, so it is required that a callback is provided.
93 When a user is done with a descriptor, they may release it by calling
97 However, for each thread a separate I/O channel must be obtained by calling
100 a channel, call spdk_put_io_channel(). A descriptor cannot be closed until
105 Once a descriptor and a channel have been obtained, I/O may be sent by calling
107 take a callback as an argument which will be called some time later with a
115 spdk_bdev_write(). These functions take as an argument a pointer to a region of
116 memory or a scatter gather list describing memory that will be transferred to
118 its variants. For a full explanation of why the memory must come from a
132 Some I/O request types are optional and may not be supported by a given bdev.
133 To query a bdev for the I/O request types it supports, call
138 In order to handle unexpected failure conditions, the bdev library provides a
139 mechanism to perform a device reset by calling spdk_bdev_reset(). This will pass
140 a message to every other thread for which an I/O channel exists for the bdev,
141 pause it, then forward a reset request to the underlying bdev module and wait