From 6e770cf8d6002dbc498a468c4df49bfc088e77e9 Mon Sep 17 00:00:00 2001 From: Mike Gerdts Date: Thu, 15 Dec 2022 11:48:58 -0600 Subject: [PATCH] lib/lvol: bad cluster size error message As spdk_lvs_init() validates arguments, it uses o->cluster_sz in a comparison but misleadingly prints opts.cluster_sz in the error message. This changes the error message to print cluster_sz from the proper structure. Signed-off-by: Mike Gerdts Change-Id: I810bf9ad4a24ed7cc844c2835e0edda988cb2cbe Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15970 Tested-by: SPDK CI Jenkins Reviewed-by: Jim Harris Reviewed-by: Shuhei Matsumoto --- lib/lvol/lvol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/lvol/lvol.c b/lib/lvol/lvol.c index fe31218e0..bdb47aaa5 100644 --- a/lib/lvol/lvol.c +++ b/lib/lvol/lvol.c @@ -562,7 +562,7 @@ spdk_lvs_init(struct spdk_bs_dev *bs_dev, struct spdk_lvs_opts *o, if (o->cluster_sz < bs_dev->blocklen) { SPDK_ERRLOG("Cluster size %" PRIu32 " is smaller than blocklen %" PRIu32 "\n", - opts.cluster_sz, bs_dev->blocklen); + o->cluster_sz, bs_dev->blocklen); return -EINVAL; } total_clusters = bs_dev->blockcnt / (o->cluster_sz / bs_dev->blocklen);