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. Change-Id: Ic2e1c8d2905cb51fc13c080aa7b7a4dfd7d9387f Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/455628 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> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This commit is contained in:
parent
9686948334
commit
1e0e0ea1fc
@ -779,14 +779,14 @@ Example response:
|
||||
|
||||
Construct new OCF bdev.
|
||||
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
|
||||
|
||||
Name | Optional | Type | Description
|
||||
----------------------- | -------- | ----------- | -----------
|
||||
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
|
||||
core_bdev_name | Required | string | Name of underlying core bdev
|
||||
|
||||
|
@ -184,7 +184,7 @@ if __name__ == "__main__":
|
||||
p = subparsers.add_parser('construct_ocf_bdev',
|
||||
help='Add an OCF block device')
|
||||
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('core_bdev_name', help='Name of unerlying core 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:
|
||||
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
|
||||
core_bdev_name: name of underlying core bdev
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user