rpc: Document bdev_error_inject_error

Signed-off-by: Monica Kenguva <monica.kenguva@intel.com>
Change-Id: I42d11341df2c364b0ad0c948c195e13448426c59
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6633
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Community-CI: Mellanox Build Bot
This commit is contained in:
Monica Kenguva 2021-03-02 00:53:52 +00:00 committed by Jim Harris
parent a89ea97204
commit b997e957d8

View File

@ -3445,6 +3445,48 @@ Example response:
}
~~~
## bdev_error_inject_error {#rpc_bdev_error_inject_error}
Inject an error via an error bdev. Create an error bdev on base bdev first. Default 'num'
value is 1 and if 'num' is set to zero, the specified injection is disabled.
### Parameters
Name | Optional | Type | Description
----------------------- | -------- | ----------- | -----------
name | Required | string | Name of the error injection bdev
io_type | Required | string | io type 'clear' 'read' 'write' 'unmap' 'flush' 'all'
error_type | Required | string | error type 'failure' 'pending'
num | Optional | int | the number of commands you want to fail.(default:1)
### Example
Example request:
~~~
{
"jsonrpc": "2.0",
"method": "bdev_error_inject_error",
"id": 1,
"params": {
"name": "EE_Malloc0",
"io_type": "write",
"error_type": "pending",
"num": 1
}
}
~~~
Example response:
~~~
{
"jsonrpc": "2.0",
"id": 1,
"result": true
}
~~~
## bdev_iscsi_create {#rpc_bdev_iscsi_create}
Connect to iSCSI target and create bdev backed by this connection.