Commit 240b243a authored by yupeng's avatar yupeng Committed by Tomasz Zawadzki
Browse files

bdev: add doc for bdev_auto_examine



Explain the bdev_auto_examine parameter of the bdev_set_options rpc.
Add bdev_auto_examine parameter for the bdev_set_options
in the python rpc client.

Signed-off-by: default avatarPeng Yu <yupeng0921@gmail.com>
Change-Id: I268cd5c01129180467967c2ebfffa7c3ba7e5b1a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2580


Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
parent c84b3ccc
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -731,6 +731,7 @@ Name | Optional | Type | Description
----------------------- | -------- | ----------- | -----------
bdev_io_pool_size       | Optional | number      | Number of spdk_bdev_io structures in shared buffer pool
bdev_io_cache_size      | Optional | number      | Maximum number of spdk_bdev_io structures cached per thread
bdev_auto_examine       | Optional | boolean     | If set to false, the bdev layer will not examine every disks automatically

### Example

+6 −1
Original line number Diff line number Diff line
@@ -158,12 +158,17 @@ if __name__ == "__main__":
    def bdev_set_options(args):
        rpc.bdev.bdev_set_options(args.client,
                                  bdev_io_pool_size=args.bdev_io_pool_size,
                                  bdev_io_cache_size=args.bdev_io_cache_size)
                                  bdev_io_cache_size=args.bdev_io_cache_size,
                                  bdev_auto_examine=args.bdev_auto_examine)

    p = subparsers.add_parser('bdev_set_options', aliases=['set_bdev_options'],
                              help="""Set options of bdev subsystem""")
    p.add_argument('-p', '--bdev-io-pool-size', help='Number of bdev_io structures in shared buffer pool', type=int)
    p.add_argument('-c', '--bdev-io-cache-size', help='Maximum number of bdev_io structures cached per thread', type=int)
    group = p.add_mutually_exclusive_group()
    group.add_argument('-e', '--enable-auto-examine', dest='bdev_auto_examine', help='Allow to auto examine', action='store_true')
    group.add_argument('-d', '--disable-auto-examine', dest='bdev_auto_examine', help='Not allow to auto examine', action='store_false')
    p.set_defaults(bdev_auto_examine=True)
    p.set_defaults(func=bdev_set_options)

    def bdev_compress_create(args):
+4 −1
Original line number Diff line number Diff line
@@ -2,12 +2,13 @@ from .helpers import deprecated_alias


@deprecated_alias('set_bdev_options')
def bdev_set_options(client, bdev_io_pool_size=None, bdev_io_cache_size=None):
def bdev_set_options(client, bdev_io_pool_size=None, bdev_io_cache_size=None, bdev_auto_examine=None):
    """Set parameters for the bdev subsystem.

    Args:
        bdev_io_pool_size: number of bdev_io structures in shared buffer pool (optional)
        bdev_io_cache_size: maximum number of bdev_io structures cached per thread (optional)
        bdev_auto_examine: if set to false, the bdev layer will not examine every disks automatically (optional)
    """
    params = {}

@@ -15,6 +16,8 @@ def bdev_set_options(client, bdev_io_pool_size=None, bdev_io_cache_size=None):
        params['bdev_io_pool_size'] = bdev_io_pool_size
    if bdev_io_cache_size:
        params['bdev_io_cache_size'] = bdev_io_cache_size
    if bdev_auto_examine is not None:
        params["bdev_auto_examine"] = bdev_auto_examine

    return client.call('bdev_set_options', params)