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: add --object-size option #6830
Conversation
@vumrao the relevant part of the bot report is around @@ -206,8 +210,9 @@ rbd help create usage: rbd create [--pool ] [--image ] [--image-format ] [--new-format] - [--object-size ] [--image-feature ] - [--image-shared] [--stripe-unit ] + [--order ] [--object-size ] + [--image-feature ] [--image-shared] + [--stripe-unit ] [--stripe-count ] [--journal-splay-width ] [--journal-object-size ] |
bool features_specified = false; | ||
|
||
if (vm.count(at::IMAGE_ORDER)) { | ||
order = vm[at::IMAGE_ORDER].as<uint64_t>(); | ||
std::cout << "rbd: --order is deprecated, use --object-size" |
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.
s/cout/cerr/ to match other deprecation warnings
looks good, just need to fix the test and one small comment |
a613000
to
395cdf0
Compare
187f081
to
2484b44
Compare
2484b44
to
ea4b3c4
Compare
[--image-shared] [--stripe-unit <stripe-unit>] | ||
[--order <order>] [--object-size <object-size>] | ||
[--image-feature <image-feature>] [--image-shared] | ||
[--stripe-unit <stripe-unit>] | ||
[--stripe-count <stripe-count>] | ||
[--journal-splay-width <journal-splay-width>] | ||
[--journal-object-size <journal-object-size>] | ||
[--journal-pool <journal-pool>] --size <size> |
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.
You can remove the withe space change below.
Object size can be specified when creating an image with the --order option, as a number of bits in the size. This patch is adding new option --object-size. This new option will specify object size directly for example --object-size 2M. It would be easier to use. --order is still present for backwards compatibility. For simplicity, we are rounding up the object size to the nearest power of 2. Fixes ceph#12112 Signed-off-by: Vikhyat Umrao <vumrao@redhat.com>
ea4b3c4
to
71690e7
Compare
Can you switch src/test/cli-integration/rbd/defaults.t to use --object-size instead of --order as well? the deprecation message will make it fail otherwise. Nevermind, you did that already. |
rbd: add --object-size option, deprecate --order Reviewed-by: Josh Durgin <jdurgin@redhat.com>
@jdurgin Thank you :) |
Object size can be specified when creating an image with the --order option,
as a number of bits in the size.
This patch is adding new option --object-size. This new option will specify
object size directly for example --object-size 2M.
It would be easier to use. --order is still present for backwards compatibility.
For simplicity, we are rounding up the object size to the nearest power of 2.
Fixes #12112
Signed-off-by: Vikhyat Umrao vumrao@redhat.com