Skip to content
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

Merged
merged 1 commit into from Dec 8, 2015
Merged

Conversation

vumrao
Copy link
Contributor

@vumrao vumrao commented Dec 7, 2015

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

@vumrao
Copy link
Contributor Author

vumrao commented Dec 7, 2015

@dillaman @jdurgin I have closed #5676. Please review this new PR for feature 12112.

@ghost
Copy link

ghost commented Dec 7, 2015

@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 ] 

@ghost ghost added rbd feature labels Dec 7, 2015
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"
Copy link
Member

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

@jdurgin
Copy link
Member

jdurgin commented Dec 8, 2015

looks good, just need to fix the test and one small comment

@vumrao
Copy link
Contributor Author

vumrao commented Dec 8, 2015

@dachary @jdurgin Thanks for your inputs.

I have fixed test cases and "cerr" suggestion also.

@vumrao
Copy link
Contributor Author

vumrao commented Dec 8, 2015

src/test/cli/rbd/help.t: failed
--- /home/jenkins/workspace/ceph/LABELS/ceph-ubuntu-14.04-jenkins/src/test/cli/rbd/help.t
+++ ./src/test/cli/rbd/help.t.err
@@ -122,7 +122,7 @@

rbd help clone
usage: rbd clone [--pool ] [--image ] [--snap ]

  •               [--dest-pool <dest-pool>] [--dest <dest>] [--order <order>]
    
  •              [--dest-pool <dest-pool>] [--dest <dest>] [--order <order>] 
                [--object-size <object-size>] 
    

Again it is failing at same place. Looking into this one.

@vumrao vumrao force-pushed the wip-12112-vumrao branch 2 times, most recently from 187f081 to 2484b44 Compare December 8, 2015 06:35
[--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>
Copy link

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>
@jdurgin
Copy link
Member

jdurgin commented Dec 8, 2015

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.

jdurgin added a commit that referenced this pull request Dec 8, 2015
rbd: add --object-size option, deprecate --order

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
@jdurgin jdurgin merged commit f9f4d5c into ceph:master Dec 8, 2015
@vumrao
Copy link
Contributor Author

vumrao commented Dec 9, 2015

@jdurgin Thank you :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants