diff options
author | Kefu Chai <kchai@redhat.com> | 2018-11-12 04:04:54 +0100 |
---|---|---|
committer | Kefu Chai <kchai@redhat.com> | 2018-11-15 07:34:03 +0100 |
commit | 5b70ba8cdfd1e3adfd2f8d4b57e35428a3b3d7bd (patch) | |
tree | 2ccda02bc7543392d6105c363e32bb11f221cbc0 /src/erasure-code/jerasure | |
parent | tests: do not check for invalid k/m combinations (diff) | |
download | ceph-5b70ba8cdfd1e3adfd2f8d4b57e35428a3b3d7bd.tar.xz ceph-5b70ba8cdfd1e3adfd2f8d4b57e35428a3b3d7bd.zip |
erasure-code: return error using `ss` not derr
log is not very visible from user's perspective. we'd better return the
error message using the input parameter, if the technique is
unsupported.
also, remove the trailing newline, as `ss` will be sent back to user,
it's the the front-end's responsibility to format the error message.
Signed-off-by: Kefu Chai <kchai@redhat.com>
Diffstat (limited to 'src/erasure-code/jerasure')
-rw-r--r-- | src/erasure-code/jerasure/ErasureCodePluginJerasure.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/erasure-code/jerasure/ErasureCodePluginJerasure.cc b/src/erasure-code/jerasure/ErasureCodePluginJerasure.cc index 966c765565d..353b71b804e 100644 --- a/src/erasure-code/jerasure/ErasureCodePluginJerasure.cc +++ b/src/erasure-code/jerasure/ErasureCodePluginJerasure.cc @@ -54,11 +54,10 @@ int ErasureCodePluginJerasure::factory(const std::string& directory, } else if (t == "liber8tion") { interface = new ErasureCodeJerasureLiber8tion(); } else { - derr << "technique=" << t << " is not a valid coding technique. " + *ss << "technique=" << t << " is not a valid coding technique. " << " Choose one of the following: " << "reed_sol_van, reed_sol_r6_op, cauchy_orig, " - << "cauchy_good, liberation, blaum_roth, liber8tion" - << dendl; + << "cauchy_good, liberation, blaum_roth, liber8tion"; return -ENOENT; } dout(20) << __func__ << ": " << profile << dendl; |