Commit Graph

753 Commits

Author SHA1 Message Date
Andrey Kuzmin
55eb9617cf bdev/aio: Fix EAGAIN handling.
To test, build and run bdevperf against an arbitrary aio device with
queue depth of 512 or more.

Change-Id: I800a9ea529af9de22fddf50e1dafeefa2244122d
Signed-off-by: Andrey Kuzmin <andrey.v.kuzmin@gmail.com>
Reviewed-on: https://review.gerrithub.io/408709
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-04-23 20:16:44 +00:00
Ben Walker
41d94136e6 bdev: I/O stats are now kept on the io_submit_ch
For bdev I/O that gets passed to another thread for handling,
such as in the QoS case, make sure the I/O stats are tracked
on the original submitting thread.

Change-Id: Ieaba168dde5eb24314e5cf64bb063faaca2b5be7
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/408399
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-04-23 17:49:08 +00:00
Ben Walker
7a8c30959c bdev: Move QoS parameters into separate struct
The QoS parameters are only used from the QoS thread,
so gather them together in a struct pointed to by the
bdev.

Change-Id: I91005f1d00205217a189d1ebacdb55782814f247
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/407356
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-04-23 17:49:08 +00:00
Ben Walker
2fa8447f2f bdev: Handle calls to spdk_bdev_unregister from non-SPDK threads
Change-Id: Ic20993bdf5ae4e5ed7fbed7d630a0024462f7fc6
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/408534
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2018-04-23 16:14:32 +00:00
Ben Walker
106684ff45 bdev/nvme: Validate adrfam when printing out config file
Change-Id: Ibca68074005655f034d71f51b403e746525e922f
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/408532
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-04-23 16:14:32 +00:00
Ben Walker
a1bcc450f0 bdev/virtio: Validate maximum number of queues specified in config file
Change-Id: I372565a1d3388fc5f4da79e4eb2799572144ed83
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/408531
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2018-04-23 16:14:32 +00:00
Ben Walker
3a5452d65d bdev/lvol: Validate lvs_bdev during dump info json
Change-Id: I16021ccd1fc6638dae977d0089f85895e60ceced
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/408530
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-04-23 16:14:32 +00:00
Tomasz Kulasek
7fb0f7467c lvol: raport not supported io types on ro lvol
Change-Id: I07dac4bbf06a85659ae5d31e3f8d037d87825694
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-on: https://review.gerrithub.io/408483
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-04-20 15:22:53 -04:00
Tomasz Kulasek
887ecc2d82 lvol: display clone/snapshot status in get_bdevs
--------------+------------------+-------------------------------------------
Name          | Type             | Description
--------------+------------------+-------------------------------------------
snapshot      | boolean          | true if lvol is a snapshot
clone         | boolean          | true if lvol is a clone
base_snapshot | string           | name of base snapshot if lvol is a clone
clones        | array of strings | array of clones names created from snapshot
--------------+------------------+--------------------------------------------

Change-Id: I5df06798f3bd34bba89743aba896d129a0915d00
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-on: https://review.gerrithub.io/404638
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-04-20 15:22:53 -04:00
Paul Luse
cbb8f46575 bdev: fix timing of init_complete callback
Recently added a new call to bdev modules to inform them of when
bdev subsystem init is complete. The intention is for modules like
RAID or crypto that need to take some action after the initial bdev
subsystem init such as 'build whatever RAID volumes you can, all
initial examine callbacks are done' or in the case of crypto 'OK,
construct all of your crypto structures for HW and SW PMDs and
associate each to configured vbdevs.'

Now that I've implemented the crypto case I see that the call was
misplaced and will execute following any examine_done call including
subsequent bdev registrations.  Those cases, for both RAID and crypto,
need to follow a different path (examine) since all of the activities
associated with the new init_complete() callback are intended just for
the very first initialization of SPDK.

So, long story short, moving this call so that it's only executed once
when subsystem init is done and not on subsequent bdev registrations.

Change-Id: I952b90e33fc67d48d86c0a7de2ad47c74a98e839
Signed-off-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/408209
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-04-20 15:16:09 -04:00
GangCao
cb1c88d19f vbdev/passthru: add the construct_passthru_bdev RPC method
Add the RPC method to construct a passthru bdev.

The usage as following:

usage:
rpc.py construct_passthru_bdev [-h] -b BASE_BDEV_NAME -p PASSTHRU_BDEV_NAME

Change-Id: I87bcfde499a9f0c2f5758e36e6772e0fc2928d20
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.gerrithub.io/406891
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-04-20 14:58:13 -04:00
GangCao
92577c92b0 vbdev/passthru: introduce the public create_passthru_disk function
The patch here is to have two utility functions that can be
called in the examine path and also through the newly created
create_passthru_disk() public function.

This is also a preparation work to add the RPC method to construct
the passthru vbdev at runtime.

Change-Id: I6cf7ec61ace8b021de19d35ddbd5441618938739
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.gerrithub.io/406888
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2018-04-20 13:39:21 -04:00
GangCao
b8681aa659 bdev/qos: add the QoS information on RPC get_bdevs interface
Change-Id: I515a08ce95ffd6fea4d5f4fab42e6d09bcdd11f7
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.gerrithub.io/393278
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-04-20 13:34:44 -04:00
Ben Walker
7540c61a21 lvol: Make snapshot_lvol_bdev RPC's arguments required
Progress cannot be made without these values.

Change-Id: I40e346f8598dcca8a4028c1c05cfdebdc5a8e4c1
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/408245
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-04-19 15:48:36 -04:00
GangCao
ffba4fdbc3 bdev/qos: add RPC method to set QoS at runtime
This patch adds a new RPC method to configure QoS on bdev
at runtime.

For example:

set_bdev_qos_limit_iops Malloc0 20000 --> Enable QoS on this
block device with 20000 IOPS rate limiting.

Change-Id: I1ee8b313b769fb5a664820f4ba827e0230be4b5d
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.gerrithub.io/393255
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-04-19 13:47:54 -04:00
Ben Walker
87211463a2 bdev: Fix data type mismatch for io_per_sec
Change-Id: I6bf491bd9661d247a70d7ee323c14397cd577636
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/407367
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-04-18 16:48:56 -04:00
Ben Walker
2931d638e7 bdev: Configure max_ios_per_timeslice when QoS is initialized
This value was recalculated on each time slice. Instead, just
set it up right away.

Right now QoS is statically configured at creation time for bdevs,
which means we can get away with this. Once dynamic
configuration is added, events will need to be sent to the QoS
thread.

Change-Id: I8bde4170f2d882d2c0f5e57a6aa7713d045beb7d
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/407355
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-04-18 16:48:56 -04:00
Ben Walker
880e3b153e lvol: Make lvol rename RPC arguments required
The RPC can't make progress if the old name and new name
are not specified.

Change-Id: I1a74fb264142fc2ff17cc5b3a2837840509827b5
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/408221
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-04-18 15:35:12 -04:00
Ziye Yang
ec5cf8a221 bdev/iSCSI: Make the connection connect in async mode.
Change-Id: I9d3b56ed908273c6853014241a28237f8d077cfa
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/405537
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-04-18 12:31:31 -04:00
Dariusz Stojaczyk
6c0078300b bdev: defer freeing bdev_io mempool
There might be a couple of mgmt channels still
trying to use the mempool from their destroy
callback (spdk_bdev_mgmt_channel_destroy).

Change-Id: I59247bfa283dc0481923fdd4eaf8e1726e1267ce
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/408192
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-04-18 12:00:16 -04:00
Ben Walker
2e1dbc4587 bdev: Fix race condition when testing whether QoS is enabled
When testing whether QoS is enabled, the code previously
checked mutable values in the bdev itself. Instead, it needs
to check the flag in the channel.

Right now, QoS can only be configured statically when the
bdev is created. This means that no channels will exist
prior to QoS being turned on, which simplifies setting
the per-channel flag (only need to set it when a channel
is created).

Change-Id: I59e56c64c18c262cc2a7f71a6dde8329edb35db7
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/407354
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: GangCao <gang.cao@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-04-17 21:47:12 -04:00
Pawel Wodkowski
1a6dac405b bdev/virito: add JSON config dump and generic create RPC
The new construct_virtio_dev allow creating virtio SCSI and blk for both
PCI and user transports.

Change-Id: Ibd79c4fb75e3cbd993b46227d86e915c1b740a18
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/405419
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-04-17 17:16:06 -04:00
Pawel Wodkowski
f34fae94fe bdev/lvol: add dump config mock
Change-Id: I0e081b17071bb5d906676c1b509bf8e0fc528b8e
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/407745
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-04-17 13:30:32 -04:00
Ben Walker
ade146b966 bdev: Wait for io device to unregister in bdev_part
Change-Id: I6627fd4253094548816c50bd97e13b22dc245df1
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/407838
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-04-17 11:47:09 -04:00
Pawel Wodkowski
5f6c428dbc bdev/iscsi: initialize g_iscsi_lun_head staticly and make iqn per bdev
Change-Id: I3cdf920a937209fd03cf3998c7927e505504b5f9
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/407767
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-04-16 19:14:54 -04:00
paul luse
a4a497d5b0 bdev: add new optional bdev i/f entry point
Add new optional bdev module interface function, init_complete, to notify bdev modules
when the bdev subsystem initialization is complete. Useful for virtual bdevs that require
notification that the set of initialization examine() calls is complete.

Change-Id: I0997fb5749d430f2fd3a40172ec8a1d5caa96964
Signed-off-by: paul luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/407222
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-04-13 17:46:33 -04:00
Daniel Verkamp
3b62b84f41 lvol: use uint64_t to represent lvol sizes
Replace the few existing uses of size_t as lvol size with uint64_t for
consistency.  size_t is meant to represent the size of an object in
memory, and it may be smaller than uint64_t (e.g. on 32-bit platforms).

Change-Id: Ifed8959625e18be67e98070f7fea1f2a09e4e791
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/407008
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-04-12 11:42:06 -04:00
Slawomir Mrozowicz
7552707ef1 bdev: Enable lvol resize RPC
Enable test functions for lvol resize.

Change-Id: Ia4583af211350054797d2d8441083e582e6e2ab7
Signed-off-by: Slawomir Mrozowicz <slawomirx.mrozowicz@intel.com>
Reviewed-on: https://review.gerrithub.io/395043
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-04-10 19:24:04 -04:00
Slawomir Mrozowicz
f3e13c95d9 bdev: Change vbdev lvol resize function
Change vbdev_lvol_resize() char name argument
to struct spdk_lvol lvol.
Add spdk_bdev_notify_blockcnt_change() after
succesfull spdk_lvol_resize().
Some code clean up and refactoring.

Change-Id: Idaa5bd4707e2479dfee50459a9844319b8c35d3a
Signed-off-by: Slawomir Mrozowicz <slawomirx.mrozowicz@intel.com>
Reviewed-on: https://review.gerrithub.io/394521
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-04-10 19:24:04 -04:00
Ben Walker
e433001a47 bdev: Put 3 types of channels in a hierarchy
The bdev layer has three types of channels:

* bdev channels - one per bdev per thread
* module channels - one per bdev module per thread
* management channels - one per thread

Arrange this in a hierarchy where bdev channesl point to
module channels which point to management channels. Rely
on the channel mechanism to reference count and release
resources at the correct time.

Change-Id: I9341068f95ec2a3897c5a1d897895a4f5cc49299
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/406854
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-04-10 19:12:15 -04:00
Ben Walker
150a5898cb bdev: Reorder functions in the spdk_bdev_module_finish path
This is code movement only. This minimizes an upcoming
diff.

Change-Id: If2af99fdd86ca3c8ce672b9d8f5bc44a2f30cc8e
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/407218
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-04-10 19:12:15 -04:00
GangCao
9bad29c18c bdev: update the name of Passthru section
Change-Id: I28fa033378649f9cf02bf216698b9d2058f77c9d
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.gerrithub.io/406883
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-04-10 15:44:54 -04:00
Tomasz Zawadzki
97934c5291 lvol: add snapshots and clones
Signed-off-by: Piotr Pelplinski <piotr.pelplinski@intel.com>
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Change-Id: Ibc43e3ee65d85a83d78d6e15457ae57992a1188a
Reviewed-on: https://review.gerrithub.io/395059
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-04-10 13:46:09 -04:00
Ben Walker
7b822323e8 bdev: Remove all uses of strncpy
strncpy is going to be added to the list of banned
functions because it does not guarantee strings are
null terminated.

Change-Id: I6657471f5771489b5004e48d08e79cebb860b069
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/407019
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-04-10 12:58:34 -04:00
Ben Walker
a615ae7e26 bdev/nvme: Fix descriptor leak in apply firmware RPC
Change-Id: I1a82e1c248d573f3a99e661bc7fef0871cfcc7f4
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/406993
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2018-04-10 12:58:34 -04:00
Ben Walker
a28294b0b4 bdev/nvme: Fix use after free in apply firmware RPC
Change-Id: I7ffe73e803ef416ce698df2d8403e32fa94ebccd
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/406988
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-04-09 16:33:19 -04:00
Ben Walker
7eac6d9b3e bdev: Remove _spdk_bdev_finish_unregister_bdevs
This is a one line static function called from one place.

Change-Id: Ie00bbedfabf54d40a2f571bbc8d30f0ac8cbbdd6
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/406853
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
2018-04-09 12:41:44 -04:00
Ben Walker
fe53e5330c bdev: Move definition for spdk_bdev_module_channel up
Move this definition between the management channel and
the bdev channel struct since that's where it fits in
the logical hierarchy.

This is just code movement. No other changes.

Change-Id: I80b9909b14cad473a7768780ac9ab74a2f1309e5
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/406852
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-04-09 12:41:44 -04:00
Ben Walker
03717822c5 bdev: Change spdk_bdev_get_io to take a bdev channel
We'll need the bdev channel inside this function in
an upcoming change.

Change-Id: Iadb07700ba57b23d37b7c373d0e9c5063aaed57b
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/406851
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
2018-04-09 12:41:44 -04:00
Ben Walker
ddde2c74f2 bdev/nvme: Fix memory leak of command in apply firmware RPC
The command can be allocated on the stack safely instead.

Change-Id: Iab412e91c1a06f80f1d86d7f9a6d88be2a759b09
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/406859
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-04-09 11:39:18 -04:00
Jim Harris
218dcd840a bdev/pmem: change all NVML strings to PMDK
NVML (Non Volatile Memory Library) changed its name to
PMDK (Persistent Memory Development Kit), so make the
necessary changes to the SPDK repository.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Id07a87eafb4e9a3099603030c58c0e927bafa608

Reviewed-on: https://review.gerrithub.io/406256
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-04-07 00:07:57 -04:00
Daniel Verkamp
72509206dd bdev/malloc: num_blocks parameter should be uint64_t
Change-Id: Ib88b797da168290ac07564cae46e544cb037f575
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/406672
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-04-06 18:22:22 -04:00
Daniel Verkamp
415933c879 bdev/null: fix RPC string memory leak
The uuid string was not freed.  Factor out the free() calls into a
helper function and add a free of uuid.

Change-Id: I2f5f794e240fcdb07f346b892ea4dec46dc9bdb6
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/406665
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-04-06 18:22:22 -04:00
Daniel Verkamp
aa3345346c bdev/null: num_blocks parameter should be uint64_t
Change-Id: Ie60989f157d20119dd24488688d527f607b585f1
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/406660
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-04-06 18:22:22 -04:00
Ben Walker
0b5fb0921f bdev: Consistently refer to the module channel as module_ch
It was called module_ch and shared_ch throughout the code.
The name module_ch is better, so use that everywhere.

Change-Id: Id030f72c878f44ea4dc8ca14b936719e26e891e3
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/406825
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-04-06 16:30:49 -04:00
Paul Luse
8988543dbf bdev: cleanup passthru vbdev
A few small changes for readability and one changed examine
error returns to breaks to assure examine_done() is called
in those cases.

Change-Id: If21ecdfa9ce1d6dbeeff4ced4e73425cec5940e1
Signed-off-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/406818
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-04-06 16:29:54 -04:00
Jim Harris
463925ff0f blob: make spdk_blob_resize an async operation
To support resize operations during I/O, we will need
to send messages to each thread to quiesce I/O while
the resize operation is in progress to guard against
the cluster map memory changing while another thread
is accessing the cluster map.

Therefore, spdk_blob_resize needs to be asynchronous.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ida037334739b4b80a1dbc76e8f1c70bca8b73582

Reviewed-on: https://review.gerrithub.io/404616
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-04-05 18:43:11 -04:00
Pawel Wodkowski
33aad6ee8d bdev/nvme: add JSON config dump
Change-Id: I0f22e6051e291b3eac8589fe0f686f7db445d71c
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/406587
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-04-05 18:26:16 -04:00
Dariusz Stojaczyk
20d8fec039 bdev/virtio/scsi: fix bdev->name memory leak
This must have been overlooked before.

Change-Id: I631c7b926970d045e9e91cada535acd605e05b6e
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/406334
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-04-05 15:56:21 -04:00
Pawel Wodkowski
be98deff3e bdev/rbd: add missing block_size in RPC config dump
Change-Id: Ic918f7b95598631432a67508735324c6be7af21d
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/406588
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-04-05 14:57:43 -04:00