Commit 0965d63d authored by Karol Latecki's avatar Karol Latecki Committed by Darek Stojaczyk
Browse files

bdev/lvol: remove optional flag for lvol_name in construct call



lvol_name is not an optional argument when creating a lvol bdev.
Also removing unnecessary if block.

Change-Id: I7d5790d648bce7f02bfed34bd714162d3ccb10ab
Signed-off-by: default avatarKarol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/461861


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarDarek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
parent 75711828
Loading
Loading
Loading
Loading
+1 −7
Original line number Diff line number Diff line
@@ -346,7 +346,7 @@ free_rpc_construct_lvol_bdev(struct rpc_construct_lvol_bdev *req)
static const struct spdk_json_object_decoder rpc_construct_lvol_bdev_decoders[] = {
	{"uuid", offsetof(struct rpc_construct_lvol_bdev, uuid), spdk_json_decode_string, true},
	{"lvs_name", offsetof(struct rpc_construct_lvol_bdev, lvs_name), spdk_json_decode_string, true},
	{"lvol_name", offsetof(struct rpc_construct_lvol_bdev, lvol_name), spdk_json_decode_string, true},
	{"lvol_name", offsetof(struct rpc_construct_lvol_bdev, lvol_name), spdk_json_decode_string},
	{"size", offsetof(struct rpc_construct_lvol_bdev, size), spdk_json_decode_uint64},
	{"thin_provision", offsetof(struct rpc_construct_lvol_bdev, thin_provision), spdk_json_decode_bool, true},
	{"clear_method", offsetof(struct rpc_construct_lvol_bdev, clear_method), spdk_json_decode_string, true},
@@ -400,12 +400,6 @@ spdk_rpc_construct_lvol_bdev(struct spdk_jsonrpc_request *request,
		goto invalid;
	}

	if (req.lvol_name == NULL) {
		SPDK_INFOLOG(SPDK_LOG_LVOL_RPC, "no bdev name\n");
		rc = -EINVAL;
		goto invalid;
	}

	if (req.clear_method != NULL) {
		if (!strcasecmp(req.clear_method, "none")) {
			clear_method = LVOL_CLEAR_WITH_NONE;