This matches the general order (LBA start then LBA count) for
the NVMe API.
While here, fix a copy/paste error in a debug message (write
instead of writev).
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ice326af5d6025867dffed4d1f6c7b81fb9eba5eb
The table of bdev function pointers should not need to be modified at
runtime.
Change-Id: I3e8876fc83df9296ce528231269b1a905c96072c
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
If a bdev doesn't need to be polled, allow it to specify NULL for the
check_io function pointer to indicate that no poller needs to be
registered.
This will be useful for virtual blockdevs that don't have any associated
hardware to poll.
Change-Id: I0ef8f848587b0c200296805ccc710340dde683b5
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
When an I/O with children is being freed, also free its child I/O
requests that were allocated via spdk_bdev_get_child_io().
Change-Id: I2d44aed845c1035ae8f8cb07c5992da855f1dc99
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
This callback was only used for freeing buffers, but the buffers are now
managed by the bdev core, so none of the free_request callbacks actually
do anything.
Change-Id: Icfe2e6169e829159dda5e3d75a27d8f040de07c6
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Add unmap support to the ramdisk block device for testing purposes.
Change-Id: Ibeb5530b2b5a31603d09d2d1de07760f32dea0f8
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
The bdev layer can be used independently of iSCSI, so fix the
misleading names.
Change-Id: I3fd5b113403acdd7578ce93234dde0fd4f148e96
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Bdev modules need a separate interface than public
consumers of the blockdevs.
Change-Id: I581ee493570c114f7e96b31a425bc077a791c71e
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Some block devices do not support the unmap operation, and we may add
other optional I/O types in the future. Add a method to check which I/O
types a specific block device supports.
Change-Id: I6e6414bf6b6482ea0224022d8326b252bd363c7f
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Switch from the non-portable <sys/endian.h> functions (htobeXX/beXXtoh)
to the SPDK endian conversion functions.
Change-Id: Id49b87f2e536c68f0d5d567e78e1990c0a37ef14
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
This leaves more flexibility for future changes to the poller
representation without requiring API changes (after this one).
It also prevents the user from accidentally using poller fields in a
non-thread-safe way, since they can't be accessed directly anymore.
Change-Id: I7677d5b93668665d29ae39c5e0ba74333ad3f878
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Replace other critical rte_zmalloc() sites that actually depend on the
memory being zeroed.
Change-Id: If6856ad44a4c50869811d3ce9411c993ce88018d
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Allow pollers to be scheduled to be run periodically every N
microseconds instead of every iteration of the reactor loop.
Change-Id: Iaea3e98965d81044e6dc5ce5f406bcb7a455289e
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Just getting a reference to a bdev should not claim it.
Change-Id: I21e07160662490ec95b52fa31ea1d2ae93a21f09
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Combine the necessary functionality with the main bdev file.
Change-Id: I96d796bc87ac2a8688cdf1fd3c16d2a7c8aef730
Signed-off-by: Ben Walker <benjamin.walker@intel.com>