From a1c00096dd636366a20536a7cfb466334f4b6aec Mon Sep 17 00:00:00 2001 From: WANGHAILIANG Date: Fri, 19 Jun 2020 17:01:54 +0800 Subject: [PATCH] example/hello_blob: Drop .ini config in favor of json Change-Id: Iea222f4ef072676cbb5e9014a7d98ac08a4e617a Signed-off-by: WANGHAILIANG Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2967 Tested-by: SPDK CI Jenkins Community-CI: Mellanox Build Bot Reviewed-by: Ben Walker Reviewed-by: Tomasz Zawadzki --- autotest.sh | 2 +- examples/blob/hello_world/hello_blob.c | 2 +- examples/blob/hello_world/hello_blob.conf | 3 --- examples/blob/hello_world/hello_blob.json | 17 +++++++++++++++++ 4 files changed, 19 insertions(+), 5 deletions(-) delete mode 100644 examples/blob/hello_world/hello_blob.conf create mode 100644 examples/blob/hello_world/hello_blob.json diff --git a/autotest.sh b/autotest.sh index b24dbffea..7148f70a2 100755 --- a/autotest.sh +++ b/autotest.sh @@ -217,7 +217,7 @@ if [ $SPDK_RUN_FUNCTIONAL_TEST -eq 1 ]; then run_test "blobstore" ./test/blobstore/blobstore.sh run_test "blobfs" ./test/blobfs/blobfs.sh run_test "hello_blob" $SPDK_EXAMPLE_DIR/hello_blob \ - examples/blob/hello_world/hello_blob.conf + examples/blob/hello_world/hello_blob.json fi if [ $SPDK_TEST_NVMF -eq 1 ]; then diff --git a/examples/blob/hello_world/hello_blob.c b/examples/blob/hello_world/hello_blob.c index b62e446b4..41730ce86 100644 --- a/examples/blob/hello_world/hello_blob.c +++ b/examples/blob/hello_world/hello_blob.c @@ -459,7 +459,7 @@ main(int argc, char **argv) * specify a name for the app. */ opts.name = "hello_blob"; - opts.config_file = argv[1]; + opts.json_config_file = argv[1]; /* diff --git a/examples/blob/hello_world/hello_blob.conf b/examples/blob/hello_world/hello_blob.conf deleted file mode 100644 index 3fa7e9d9a..000000000 --- a/examples/blob/hello_world/hello_blob.conf +++ /dev/null @@ -1,3 +0,0 @@ -[Malloc] - NumberOfLuns 1 - LunSizeInMB 16 diff --git a/examples/blob/hello_world/hello_blob.json b/examples/blob/hello_world/hello_blob.json new file mode 100644 index 000000000..10ded9d47 --- /dev/null +++ b/examples/blob/hello_world/hello_blob.json @@ -0,0 +1,17 @@ +{ + "subsystems": [ + { + "subsystem": "bdev", + "config": [ + { + "method": "bdev_malloc_create", + "params": { + "name": "Malloc0", + "num_blocks": 32768, + "block_size": 512 + } + } + ] + } + ] +}