New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rbd : make option --stripe-unit w/ B/K/M work. #12407
Conversation
@@ -270,7 +270,7 @@ void add_create_image_options(po::options_description *opt, | |||
(IMAGE_FEATURES.c_str(), po::value<ImageFeatures>()->composing(), | |||
("image features\n" + get_short_features_help(true)).c_str()) | |||
(IMAGE_SHARED.c_str(), po::bool_switch(), "shared image") | |||
(IMAGE_STRIPE_UNIT.c_str(), po::value<uint64_t>(), "stripe unit") | |||
(IMAGE_STRIPE_UNIT.c_str(), po::value<ImageObjectSize>(), "stripe unit") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: can you update the description to document that it accepts B/K/M (like object size above)? You will need to update the cli test due to the help test change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@majianpeng Still need to update the text here (to match the updated help.t
test case)
a024dca
to
34c8e5a
Compare
@dillaman . The 'man rbd' always said --stripe-unit can w/ B/K/M. I don't find other test case. |
Nit: can you remove the extra space between "rbd" and the colon in your commit title? |
34c8e5a
to
b075256
Compare
@dillaman . update |
b075256
to
9d112c1
Compare
@@ -270,7 +270,7 @@ void add_create_image_options(po::options_description *opt, | |||
(IMAGE_FEATURES.c_str(), po::value<ImageFeatures>()->composing(), | |||
("image features\n" + get_short_features_help(true)).c_str()) | |||
(IMAGE_SHARED.c_str(), po::bool_switch(), "shared image") | |||
(IMAGE_STRIPE_UNIT.c_str(), po::value<uint64_t>(), "stripe unit") | |||
(IMAGE_STRIPE_UNIT.c_str(), po::value<ImageObjectSize>(), "stripe unit in B/K/M") | |||
(IMAGE_STRIPE_COUNT.c_str(), po::value<uint64_t>(), "stripe count") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In fact, if used wrong format. It don't show "stripe unit in B/K/M". It only print IMAGE_STRIEP_UNIT.c_str().
@majianpeng If you look at the build log, you can see that there are several additional places within help.t that need to be updated. |
9d112c1
to
c5ce82e
Compare
@dillaman . Run the failed test on my machine, it passed. |
As 'man rbd' said: --stripe-unit size-in-B/K/M. But w/ B/K/M, the command failed and said invalid options. So fix it. Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
As 'man rbd' said: --stripe-unit size-in-B/K/M. But w/ B/K/M, the
command failed and said invalid options. So fix it.
Signed-off-by: Jianpeng Ma jianpeng.ma@intel.com