7a9ecf82 | 17-Oct-2019 |
Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> |
lib/scsi: Free bdev_io just after getting completion from bdev for non-read I/O
Previously, for iSCSI target, freeing bdev_io of SCSI task was deferred until the reference count of the SCSI task bec
lib/scsi: Free bdev_io just after getting completion from bdev for non-read I/O
Previously, for iSCSI target, freeing bdev_io of SCSI task was deferred until the reference count of the SCSI task becomes zero.
But this will cause the use-after-free issue when doing LUN hotplug during large write I/O workload.
The scenario is the following:
- Large iSCSI write I/O is split into multiple I/Os, the first I/O is from immediate, and subsetquent I/Os are from R2T.
1. The first I/O allocates iSCSI task as primary, and is submitted to the bdev layer. The first I/O is pending in the bdev layer. 2. The second I/O allocates iSCSI task as secondary (secondary is associated with primary by incrementing reference count). 3. Before submitting the second I/O to the bdev layer, LUN hotplug is started. LUN hotplug waits for getting completion of the first write I/O from the bdev layer. 4. The bdev layer completes the first I/O. The primary iSCSI task is tried to free, but reference count is still one, and is not done yet. 5. LUN hotplug detects completion of the first write I/O, and returns LUN I/O channel to the bdev layer. 6. The second I/O is tried to submit to the bdev layer, but LUN is already removed, and so free the secondary iSCSI task. 7. Then the reference count of the primary iSCSI task becomes zero, and its bdev_io is freed. However, LUN I/O channel is already freed and freeing bdev_io fails.
This issue is caused by separating iSCSI task allocation and submission.
For write I/O, we don't have to keep bdev_io after getting completion of it from the bdev layer.
This applies to other non-read I/O types.
So for non-read I/O, free bdev_io after getting SCSI status in bdev_scsi_task_complete_cmd(), and for read I/O, set bdev_io to task as same as before.
The next patch will do the same for management task.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Change-Id: I530fb491514880ce41858e1bea55d422d606dfc4 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471695 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
show more ...
|
310fc0b5 | 27-Jun-2019 |
yidong0635 <dongx.yi@intel.com> |
scsi_bdev_ut: add SPDK_CU_ASSERT_FATAL before put task.
Like other test, need to add SPDK_CU_ASSERT_FATAL(TAILQ_EMPTY(&g_bdev_io_queue)). To avoid issue: scsi_bdev_ut.c:956:2: warning: Address of st
scsi_bdev_ut: add SPDK_CU_ASSERT_FATAL before put task.
Like other test, need to add SPDK_CU_ASSERT_FATAL(TAILQ_EMPTY(&g_bdev_io_queue)). To avoid issue: scsi_bdev_ut.c:956:2: warning: Address of stack memory associated with local variable 'task' is still referred to by the global variable 'g_io_wait_queue' upon returning to the caller. This will be a dangling reference ut_put_task(&task); ^~~~~~~~~~~~~~~~~~ waiting exit from while loop in ut_bdev_io_flush.
This is related to issue #822.
Change-Id: If390f5076582a0149646f0c2a408c3bcd3b4fab6 Signed-off-by: yidong0635 <dongx.yi@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459534 Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
show more ...
|
37bdd0e8 | 07-Jun-2019 |
Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> |
scsi: Add data offset to DIF context separately from start block address
This patch uses the change by the last patch to initialize DIF context in SCSI layer. Besides this patch changes the name of
scsi: Add data offset to DIF context separately from start block address
This patch uses the change by the last patch to initialize DIF context in SCSI layer. Besides this patch changes the name of a parameter from offset to data_offset to clarify the meaning.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Change-Id: I54bf1168ec5959432aa15dae0360c0640138b033 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/457541 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
show more ...
|
73204fe2 | 04-Jun-2019 |
Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> |
dif: Add data offset to DIF context separately from start block address
Data offset are intended to correspond to DATAO in NVMe/TCP and Buffer Offset in iSCSI.
Previously for iSCSI, buffer offset h
dif: Add data offset to DIF context separately from start block address
Data offset are intended to correspond to DATAO in NVMe/TCP and Buffer Offset in iSCSI.
Previously for iSCSI, buffer offset had been merged to start block address, but passing buffer offset separately from start block address clarifies the logic more.
On the other hand, for NVMe/TCP, passing DATAO separately from start block address will be critically important because DATAO will bave any alignment and will be necessary to use for not only reference tag but also guard computation.
This patch adds data_offset to struct spdk_dif_ctx and adds it to the parameters of spdk_dif_ctx_init(). ref_tag_offset is also added to struct spdk_dif_ctx and it is computed by dividing data_offset by data_block_size and is used to compute reference tag.
The next patch will use this change when getting DIF context in SCSI.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Change-Id: Id0e12ca9b1dc75d0589787520feb0c2ee0f844a5 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/457540 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
show more ...
|
4e9e220e | 14-May-2019 |
Changpeng Liu <changpeng.liu@intel.com> |
scsi: add persistent reservation in command with read keys action support
Change-Id: Ia8e4ad31e84a1a97c83d4f49680bb7090ee4e041 Signed-off-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-on: htt
scsi: add persistent reservation in command with read keys action support
Change-Id: Ia8e4ad31e84a1a97c83d4f49680bb7090ee4e041 Signed-off-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/436093 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
show more ...
|
d0d19eb8 | 14-May-2019 |
Changpeng Liu <changpeng.liu@intel.com> |
scsi: add persistent reservation out with register feature support
To establish a persistent reservation the application client shall first register an I_T nexus with the device server. An applicati
scsi: add persistent reservation out with register feature support
To establish a persistent reservation the application client shall first register an I_T nexus with the device server. An application client registers with a logical unit by issuing a PERSISTENT RESERVE OUT command with REGISTER service action or REGISTER AND IGNORE EXISTING KEY service action.
Specify Initiator Ports (SPEC_I_PT) bit and All Target Ports (ALL_TG_PT) bit are not supported for now, the registrants belong to the I_T nexus who sends the command.
Also Activate Persist Through Power Loss (APTPL) bit will be supported in following patches.
Change-Id: If057a764a4bfa73017f98048c94b697dbfa4b4a1 Signed-off-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/436088 Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
show more ...
|
12ab86e2 | 03-Apr-2019 |
Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> |
scsi: Add helper functions to convert LUN ID between structure and integer
SPDK iSCSI target didn't convert LUN ID from integer to structure when it sends R2T PDUs. The next patch will fix the issue
scsi: Add helper functions to convert LUN ID between structure and integer
SPDK iSCSI target didn't convert LUN ID from integer to structure when it sends R2T PDUs. The next patch will fix the issue. Introducing helper functions into SCSI library and using them will be clean. Hence this patch adds two helper functions to convert LUN ID between structure and integer.
The logic of helper functions is derived simply from the current implementation in SPDK.
Change-Id: I114b546cfcb44109d6cd131a1fa972f4d6bfea38 Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/449962 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
show more ...
|
0ed66e7e | 28-Mar-2019 |
Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> |
scsi: Remove the prefix spdk_ from names of private functions
This patch doesn't change any behavior too.
Change-Id: I67be498bfd4f1ae42e6239de4539e5e99f158279 Signed-off-by: Shuhei Matsumoto <shuhe
scsi: Remove the prefix spdk_ from names of private functions
This patch doesn't change any behavior too.
Change-Id: I67be498bfd4f1ae42e6239de4539e5e99f158279 Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/449397 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
show more ...
|
8697bce7 | 26-Feb-2019 |
Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> |
scsi: Add an API to return DIF context of bdev and CDB
This patch adds an API spdk_scsi_bdev_get_dif_ctx().
spdk_scsi_bdev_get_dif_ctx() decodes opcode in CDB, and if opcode is read or write block
scsi: Add an API to return DIF context of bdev and CDB
This patch adds an API spdk_scsi_bdev_get_dif_ctx().
spdk_scsi_bdev_get_dif_ctx() decodes opcode in CDB, and if opcode is read or write block commands, it gets LBA and use the lower 32bits of LBA as Reference Tag. It gets DIF information from specified bdev next. Then it sets all to DIF context and return.
spdk_scsi_bdev_get_dif_ctx() is exported to iSCSI through spdk_scsi_lun_get_dif_ctx().
Change-Id: Id8aac164c48e9e9d4ff7cfc9fa81bb5090f3e187 Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446224 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
show more ...
|
adc8da4a | 01-Mar-2019 |
Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> |
scsi: Use data block size not including metadata instead of block size
SPDK iSCSI and SCSI target don't expose any metadata and DIF settings to the corresponding iSCSI and SCSI initiator.
Even when
scsi: Use data block size not including metadata instead of block size
SPDK iSCSI and SCSI target don't expose any metadata and DIF settings to the corresponding iSCSI and SCSI initiator.
Even when SPDK iSCSI and SCSI target allocate any bdev formatted with DIF, SCSI commands sent from iSCSI and SCSI initiator don't have any metadata and DIF information.
For that case, iSCSI target inserts and strips DIF on behalf of iSCSI and SCSI initiator.
Hence SPDK SCSI target has to use data block size not including metadata to process SCSI commands correctly.
This patch replaces spdk_bdev_get_block_size by spdk_bdev_get_data_block_size in necessary places.
Change-Id: I264c8e532d1d1b016f6d8774c8ec03389528044f Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/445083 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
show more ...
|
07e9a00b | 15-Feb-2019 |
Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> |
scsi: Use spdk_bdev_writev_blocks instead of spdk_bdev_writev
This is in a effort to consolidate SCSI read and write I/O for the upcoming transparent DIF support.
Previously conversion of bytes and
scsi: Use spdk_bdev_writev_blocks instead of spdk_bdev_writev
This is in a effort to consolidate SCSI read and write I/O for the upcoming transparent DIF support.
Previously conversion of bytes and blocks are done both in SCSI layer and BDEV layer. After the patch series, conversion is consolidated into SCSI layer.
Change-Id: Ib964a41ec22757f2a09cea22f398903f78d0781f Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-on: https://review.gerrithub.io/c/444779 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
show more ...
|
56e12b00 | 15-Feb-2019 |
Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> |
scsi: Use spdk_bdev_readv_blocks instead of spdk_bdev_readv
This is in a effort to consolidate SCSI read and write I/O for the upcoming transparent DIF support.
Previously conversion of bytes and b
scsi: Use spdk_bdev_readv_blocks instead of spdk_bdev_readv
This is in a effort to consolidate SCSI read and write I/O for the upcoming transparent DIF support.
Previously conversion of bytes and blocks are done both in SCSI layer and BDEV layer. After the patch series, conversion is consolidated into SCSI layer.
About conversion from bytes to blocks, we don't expose bdev API spdk_bdev_bytes_to_blocks and but create private helper function _bytes_to_blocks because we will use not block size but data block size when we support transparent DIF feature.
Change-Id: I37169c673479c92e027e2507a0e54a1e414b43e1 Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-on: https://review.gerrithub.io/c/444778 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
show more ...
|
7d468452 | 12-Nov-2018 |
Jim Harris <james.r.harris@intel.com> |
test: use test_env in scsi unit tests
Also remove some unneeded stubs since the thread library is linked by default to all unit tests.
Note that the lun.c unit tests include test_env via the new in
test: use test_env in scsi unit tests
Also remove some unneeded stubs since the thread library is linked by default to all unit tests.
Note that the lun.c unit tests include test_env via the new include of ut_multithread.c. It needs ut_multithread to simplify allocation of threads needed so that the lun.c code can safely register pollers.
Signed-off-by: Jim Harris <james.r.harris@intel.com> Change-Id: I922b5fed12ff7e2802b19d7f953c1b2352800f73
Reviewed-on: https://review.gerrithub.io/c/432919 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
show more ...
|
63b3b8fd | 08-Feb-2019 |
Jim Harris <james.r.harris@intel.com> |
test/unit: remove duplicate mk/spdk.common.mk includes
mk/spdk.unittest.mk already includes mk/spdk.common.mk, so it's not needed. This also fixes an issue where touching an included .mk file would
test/unit: remove duplicate mk/spdk.common.mk includes
mk/spdk.unittest.mk already includes mk/spdk.common.mk, so it's not needed. This also fixes an issue where touching an included .mk file would not trigger unit tests to rebuild if they had this duplicated mk/spdk.common.mk include.
Signed-off-by: Jim Harris <james.r.harris@intel.com> Change-Id: I41a04eb77ce468849cb9b53bd1f76df6fec06e46
Reviewed-on: https://review.gerrithub.io/c/443980 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
show more ...
|
9c2aea2a | 21-Nov-2018 |
Jim Harris <james.r.harris@intel.com> |
build: remove duplicate spdk.app.mk includes
spdk.unittest.mk includes spdk.app.mk, but some unit test Makefiles include both spdk.unittest.mk and spdk.app.mk, meaning spdk.app.mk gets included twic
build: remove duplicate spdk.app.mk includes
spdk.unittest.mk includes spdk.app.mk, but some unit test Makefiles include both spdk.unittest.mk and spdk.app.mk, meaning spdk.app.mk gets included twice. Fix that.
This hasn't been an issue because spdk.app.mk currently only includes variables - but no rules.
Signed-off-by: Jim Harris <james.r.harris@intel.com> Change-Id: I23d39e8084f79442fb06ae9b5a6a68d6134adff4
Reviewed-on: https://review.gerrithub.io/434281 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
show more ...
|
760c8def | 10-Dec-2018 |
Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> |
ut/scsi: Use STUB in SCSI unit tests
Change-Id: I74f2de3310341504850bd9034baefce6126f540f Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-on: https://review.gerrithub.io/4
ut/scsi: Use STUB in SCSI unit tests
Change-Id: I74f2de3310341504850bd9034baefce6126f540f Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-on: https://review.gerrithub.io/436645 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
show more ...
|
b7adc8fe | 26-Nov-2018 |
Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> |
scsi: Differentiate callback function about LUN reset from other TMFs
Current SPDK SCSI supports only LUN RESET in task management function. Upcoming patches will support other functions too but dif
scsi: Differentiate callback function about LUN reset from other TMFs
Current SPDK SCSI supports only LUN RESET in task management function. Upcoming patches will support other functions too but differentiate the callback function about LUN reset from other task management functions for now to avoid misunderstanding.
Change-Id: If8f00ce413fbcc54b12dd885cbf01597f83a2af9 Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-on: https://review.gerrithub.io/434763 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
show more ...
|
65e5bbdc | 29-Oct-2018 |
Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> |
scsi: Use not C++ style comments // but C-style comments /* */
Change-Id: I44c1b5c68ddb56aca2ad46471753d6835dd744a5 Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-on: htt
scsi: Use not C++ style comments // but C-style comments /* */
Change-Id: I44c1b5c68ddb56aca2ad46471753d6835dd744a5 Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-on: https://review.gerrithub.io/431079 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
show more ...
|
17e9d38c | 30-Aug-2018 |
Seth Howell <seth.howell@intel.com> |
test/unit: Fix Scan-build errors in scsi tests
I had to make small modifications to one test in the dev_ut.c file to prevent a memory leak error. However, changing the index in this test from -1 to
test/unit: Fix Scan-build errors in scsi tests
I had to make small modifications to one test in the dev_ut.c file to prevent a memory leak error. However, changing the index in this test from -1 to 0 has no effect on the coverage.
Change-Id: Ia8a475aaa41118f072a5d9006bab9d9c84b4a10a Signed-off-by: Seth Howell <seth.howell@intel.com> Reviewed-on: https://review.gerrithub.io/424126 Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
show more ...
|
f0ec7bc6 | 05-Jul-2018 |
Tomasz Zawadzki <tomasz.zawadzki@intel.com> |
scsi/bdev: use spdk_bdev_queue_io_wait()
New function was added in bdev layer to allow handling spdk_bdev_io buffer exhaustion.
This patch adds that functionality to scsi bdev.
Change-Id: Ia6a5be8
scsi/bdev: use spdk_bdev_queue_io_wait()
New function was added in bdev layer to allow handling spdk_bdev_io buffer exhaustion.
This patch adds that functionality to scsi bdev.
Change-Id: Ia6a5be871ae09a4d1166991925f0a44f3b355bdd Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-on: https://review.gerrithub.io/417032 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
show more ...
|
6f9e81ee | 10-Jul-2018 |
Tomasz Zawadzki <tomasz.zawadzki@intel.com> |
scsi/UT: add scsi_bdev IO operations UT
This patch adds UT for IO operations, as preparation for next patch in series handling bdev_io buffer exhaustion.
Change-Id: I139cb8811453576efd1acddd15ad2a3
scsi/UT: add scsi_bdev IO operations UT
This patch adds UT for IO operations, as preparation for next patch in series handling bdev_io buffer exhaustion.
Change-Id: I139cb8811453576efd1acddd15ad2a3672995f09 Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-on: https://review.gerrithub.io/417452 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
show more ...
|
bcfd6d0f | 03-Jul-2018 |
Tomasz Zawadzki <tomasz.zawadzki@intel.com> |
scsi: only set SPDK_SCSI_STATUS_GOOD on bdev callback
Previously when IO was sent to bdev, even without callback yet, status for task was set to SPDK_SCSI_STATUS_GOOD.
This patch changes it so that
scsi: only set SPDK_SCSI_STATUS_GOOD on bdev callback
Previously when IO was sent to bdev, even without callback yet, status for task was set to SPDK_SCSI_STATUS_GOOD.
This patch changes it so that it is only set when callback actually comesback from bdev via spdk_bdev_io_get_scsi_status().
Change-Id: I4a36ec345608257123e1036d31540f5f1090a23b Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-on: https://review.gerrithub.io/417708 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Seth Howell <seth.howell5141@gmail.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
show more ...
|
97154b1f | 03-Jul-2018 |
Tomasz Zawadzki <tomasz.zawadzki@intel.com> |
scsi/ut: initialize task with invalid values to assert change later
Originally task was memset to 0, meaning that some asserts might have incorrectly asserted values that were set to 0 beforehand.
scsi/ut: initialize task with invalid values to assert change later
Originally task was memset to 0, meaning that some asserts might have incorrectly asserted values that were set to 0 beforehand.
Now ut_init_task() sets task to 0xFF, with only couple required fields set to appropriate values.
Change-Id: I47fbb03daf6ab7cbf60abc58f63315a151e49890 Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-on: https://review.gerrithub.io/417686 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
show more ...
|
a8656d66 | 03-Jul-2018 |
Tomasz Zawadzki <tomasz.zawadzki@intel.com> |
scsi/ut: stub out IO callback for scsi UT
Callbacks were never called in UT for scsi_bdev.
Change-Id: I54a9d75af3161cd4dd4f0c153c7808b13e818576 Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel
scsi/ut: stub out IO callback for scsi UT
Callbacks were never called in UT for scsi_bdev.
Change-Id: I54a9d75af3161cd4dd4f0c153c7808b13e818576 Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-on: https://review.gerrithub.io/417551 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
show more ...
|
d5471e29 | 03-Jul-2018 |
Tomasz Zawadzki <tomasz.zawadzki@intel.com> |
scsi/ut: rename helper *_task functions
To make it clear that spdk_put_task() and spdk_init_task() are not part of public API, chaged prefix to ut_.
Change-Id: I76a6efc3835f0ee71953029cad1dabf5a680
scsi/ut: rename helper *_task functions
To make it clear that spdk_put_task() and spdk_init_task() are not part of public API, chaged prefix to ut_.
Change-Id: I76a6efc3835f0ee71953029cad1dabf5a68013a4 Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-on: https://review.gerrithub.io/417685 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
show more ...
|