From 0e25e2a6e266a14435477e3e9eb3a717d2cc0e5c Mon Sep 17 00:00:00 2001 From: Konrad Sztyber Date: Fri, 1 Jul 2022 09:32:09 +0200 Subject: [PATCH] bdev/compress: make lb_size optional in bdev_compress_create Treat it as zero if the user doesn't provide it. This will make it consistent with other RPCs and the behavior of that command in scripts/rpc.py. Signed-off-by: Konrad Sztyber Change-Id: Ic5505f853bc203fb1144ba3f1f44c736563a3677 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13529 Tested-by: SPDK CI Jenkins Community-CI: Broadcom CI Reviewed-by: Karol Latecki Reviewed-by: Jim Harris Reviewed-by: Ben Walker --- module/bdev/compress/vbdev_compress_rpc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/bdev/compress/vbdev_compress_rpc.c b/module/bdev/compress/vbdev_compress_rpc.c index 5e7877f5a..53966fd8d 100644 --- a/module/bdev/compress/vbdev_compress_rpc.c +++ b/module/bdev/compress/vbdev_compress_rpc.c @@ -130,7 +130,7 @@ free_rpc_construct_compress(struct rpc_construct_compress *r) static const struct spdk_json_object_decoder rpc_construct_compress_decoders[] = { {"base_bdev_name", offsetof(struct rpc_construct_compress, base_bdev_name), spdk_json_decode_string}, {"pm_path", offsetof(struct rpc_construct_compress, pm_path), spdk_json_decode_string}, - {"lb_size", offsetof(struct rpc_construct_compress, lb_size), spdk_json_decode_uint32}, + {"lb_size", offsetof(struct rpc_construct_compress, lb_size), spdk_json_decode_uint32, true}, }; /* Decode the parameters for this RPC method and properly construct the compress