ocf: RPC add WriteBack to allowed cache modes
Make construct_ocf_bdev call accept 'wb'
as allowed cache mode.
Previusly user could only create OCF bdevs
in WriteThrough or PassThrough modes.
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/455628 (master)
(cherry picked from commit 1e0e0ea1fc
)
Change-Id: Ic2e1c8d2905cb51fc13c080aa7b7a4dfd7d9387f
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/457585
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>
This commit is contained in:
parent
3768d9a8c6
commit
d8a948ca1d
@ -779,14 +779,14 @@ Example response:
|
|||||||
|
|
||||||
Construct new OCF bdev.
|
Construct new OCF bdev.
|
||||||
Command accepts cache mode that is going to be used.
|
Command accepts cache mode that is going to be used.
|
||||||
Currently, we support Write-Through and Pass-Through OCF cache modes.
|
Currently, we support Write-Through, Pass-Through and Write-Back OCF cache modes.
|
||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
Name | Optional | Type | Description
|
Name | Optional | Type | Description
|
||||||
----------------------- | -------- | ----------- | -----------
|
----------------------- | -------- | ----------- | -----------
|
||||||
name | Required | string | Bdev name to use
|
name | Required | string | Bdev name to use
|
||||||
mode | Required | string | OCF cache mode ('wt' or 'pt')
|
mode | Required | string | OCF cache mode ('wb' or 'wt' or 'pt')
|
||||||
cache_bdev_name | Required | string | Name of underlying cache bdev
|
cache_bdev_name | Required | string | Name of underlying cache bdev
|
||||||
core_bdev_name | Required | string | Name of underlying core bdev
|
core_bdev_name | Required | string | Name of underlying core bdev
|
||||||
|
|
||||||
|
@ -183,7 +183,7 @@ if __name__ == "__main__":
|
|||||||
p = subparsers.add_parser('construct_ocf_bdev',
|
p = subparsers.add_parser('construct_ocf_bdev',
|
||||||
help='Add an OCF block device')
|
help='Add an OCF block device')
|
||||||
p.add_argument('name', help='Name of resulting OCF bdev')
|
p.add_argument('name', help='Name of resulting OCF bdev')
|
||||||
p.add_argument('mode', help='OCF cache mode', choices=['wt', 'pt'])
|
p.add_argument('mode', help='OCF cache mode', choices=['wb', 'wt', 'pt'])
|
||||||
p.add_argument('cache_bdev_name', help='Name of underlying cache bdev')
|
p.add_argument('cache_bdev_name', help='Name of underlying cache bdev')
|
||||||
p.add_argument('core_bdev_name', help='Name of unerlying core bdev')
|
p.add_argument('core_bdev_name', help='Name of unerlying core bdev')
|
||||||
p.set_defaults(func=construct_ocf_bdev)
|
p.set_defaults(func=construct_ocf_bdev)
|
||||||
|
@ -73,7 +73,7 @@ def construct_ocf_bdev(client, name, mode, cache_bdev_name, core_bdev_name):
|
|||||||
|
|
||||||
Args:
|
Args:
|
||||||
name: name of constructed OCF bdev
|
name: name of constructed OCF bdev
|
||||||
mode: OCF cache mode: {'wt', 'pt'}
|
mode: OCF cache mode: {'wb', 'wt', 'pt'}
|
||||||
cache_bdev_name: name of underlying cache bdev
|
cache_bdev_name: name of underlying cache bdev
|
||||||
core_bdev_name: name of underlying core bdev
|
core_bdev_name: name of underlying core bdev
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user