Namespaces can be allocated but inactive, which causes
the identify namespace command to fail. Handle this
case so that attaching to the controller does not fail.
Change-Id: I9d692f8e7841a9315a737b0a5e44d9b4e4484a13
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Rather than requiring changes to a static list of header files, use the
GNU Make wildcard function to generate a .cpp file per header.
This also tests whether each header includes all of the system headers
for the types it uses.
Change-Id: I05b82510b194533672568019e138d7d1aad2e86b
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Modify the spdk_poller_unregister() function so that it works correctly
when unregistering a poller from its own callback function.
Change-Id: I57fa5ebd8a8bad522e34f597b406a4726f1b76ad
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
A previous commit added use of 'bool' but did not add
a stdbool.h include. All files including io_channel.h
already were including stdbool.h, but adding it here
so that we do not depend on that for future usages.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Iaa88a0747889fe02f327059c99bc751c9ab326f7
This patch will add a new bdev module, rbd.
It can make ceph rbd as the backend of iSCSI
target.
Change-Id: Id5eb3b159ee607052e3c33a2e59d721739fd9977
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
These offsets are passed to the bdev I/O functions, which take uint64_t
offsets.
Change-Id: I1d597d066dfb64b6c7658906e7ee8e6fb2f8e4db
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
The offset variable is used to store the result of a uint64_t * uint32_t
multiplication; a signed integer is not the correct type for the result.
Change-Id: If1fb22314ba7e3cec91808cc051678f809c9e58b
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
This code calculates the difference between two pointers and then stores
it in an off_t, which is intended for file offsets.
In this particular case, the offset will never be large enough to
overflow off_t, but use the correct ptrdiff_t type anyway.
Change-Id: I6b159bf0286a7f5962d08b9894538f4d99c8647b
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
off_t is problematic for use as a file/block offset: it is signed, and
on 32-bit platforms, it can be 32 bits (depending on the settings of
_FILE_OFFSET_BITS and _LARGEFILE_SOURCE).
The blockdev layer already uses uint64_t to represent offsets; replace
the blockdev module uses of off_t in internal functions with uint64_t
to match.
Change-Id: I77a2e594572c56f1cd8a7a080f985ea5b27c35f3
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
The free function is missed for dev in spdk_io_device_
unregister function.
Change-Id: Id212344dfcde2ae4780c631e3443f530ef25cfd1
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
For process_read-task_completion, add a
new paramter and remove the duplicated code
since this function is the critical path
Change-Id: I6a56327def717ee965c701383f01d6745a8c6988
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
This feature should only be used if clients are coordinating
with one another.
Change-Id: I89a437441a7e3fbcc1e5f6efa1c8e970ade7c2ec
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Now that the NVMe and I/OAT libraries depend on the log library, log
needs to be built earlier in the Travis-CI unit test script.
Change-Id: I189800934007fe8365cdfd5eb4cd797eed252b73
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
This was added after the previous SPDK_CU_ASSERT_FATAL change was
merged.
Change-Id: I9d26fcd78157b6c9b232ac1e7484d0939cc90612
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
We already require the assert header from the C standard library,
so use that instead of RTE_VERIFY to further isolate DPDK
dependencies.
Change-Id: I4a718af858c88aff6080e33e6c3dd533c077b8f4
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Add some checks to hit paths not covered by the current tests.
Change-Id: If8e7977ab8327eacfa33657d0a167f3b935b0113
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Some subsystems may wish to create unique I/O channels
which are not shared across all users of the same I/O
device on the same thread.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I3ade3675d57338cf85b6a301285e6f392bd6cd2e
We need to return -1, when there is still tasks. From the
usage, return 1 is wrong.
Change-Id: Ibf1b53e0be92818c73590c0b4211d34332073c74
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Also remove libspdk_util.a from the io_channel_ut linker command, since
it already includes the tested C file directly and doesn't depend on any
other util library functions.
Change-Id: I4b3fc4d57b5af4524b53664365f6ba52686e4b80
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
The test can't continue if a NULL pointer would be dereferenced.
Change-Id: If857057c69679de3be08c4605d15bc2b3892210a
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Fix the existing cases (all missing void in parameter lists) and enable
the warning to prevent new ones from being introduced.
Change-Id: Ieaf00b3dfd5daf1e21fcbefb124514882e8996c9
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
If posix_memalign() fails, it may not have updated buf, so set it to
NULL explicitly.
Change-Id: I756bdc59ec1e31987ad3e6754eec4e2194b95074
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
This patch aimed at avoid run out of large rbuf for read commands
Change-Id: Ibc42b2216e929f8dfa59cba1b32ae8d52a1a345e
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
For NUMA architecture, you may get performance drop if your NVMe
devices and transport devices located in different socket, with
this patch, the NVMf target will print a warning message to remind
the user that your configuration is not optimal.
Change-Id: Ia6013ef95984f0ce8c7f1ca86b89c0375686a188
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
bdev and copy modules no longer have check_io functions
now - all polling is done via pollers registered when
I/O channels are created.
Other default resources are also removed - for example,
a qpair is no longer allocated and assigned per bdev
exposed by the nvme driver - the qpairs are only allocated
via I/O channels. Similar principle also applies to the
aio driver.
ioat channels are no longer allocated and assigned to
lcores - they are dynamically allocated and assigned
to I/O channels when needed. If no ioat channel is
available for an I/O channel, the copy engine framework
will revert to using memcpy/memset instead.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I99435a75fe792a2b91ab08f25962dfd407d6402f
With the I/O channel changes, this test needs to be rewritten
to be event-based. bdevio uses the spdk_bdev_do_work() function
to poll for completions, which is built on the check_io functions
that are going away when we move to using I/O channels.
Do not delete the code from the tree - just detach it from the
build and the test scripts for now.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I88674988db6ccb3673faf7eb5b3e79b403059fa4
I/O channels are not actually used for I/O yet however.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Iaa3774ecacc7ec206c7c0c66e6b2f2d10c8fa785
This will start testing the I/O channel allocation paths. I/O channels
are not actually used for submitting I/O yet however.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I901402633248170324db1e2fc8fb813f7629c2b0
This will help catch any cases where I/O channels are not
released during shutdown.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I96cf93218026b9ef319abcf0662fe258bf75174d
Also implement these functions for all of the bdev drivers in
the tree.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Idea97743d601150044b1fe2d9d76e922d46d3ee1