Commit b997e957 authored by Monica Kenguva's avatar Monica Kenguva Committed by Jim Harris
Browse files

rpc: Document bdev_error_inject_error



Signed-off-by: default avatarMonica Kenguva <monica.kenguva@intel.com>
Change-Id: I42d11341df2c364b0ad0c948c195e13448426c59
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6633


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarPaul Luse <paul.e.luse@intel.com>
Community-CI: Mellanox Build Bot
parent a89ea972
Loading
Loading
Loading
Loading
+42 −0
Original line number Diff line number Diff line
@@ -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.