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 : fix clone isssue #6334

Merged
merged 1 commit into from Nov 4, 2015

Conversation

Projects
None yet
3 participants
@xinxinsh
Copy link
Member

xinxinsh commented Oct 21, 2015

rbd CLI : rbd clone --image-feature layering rbd/test@snap rbd/clone

output : rbd: image format can only be set when creating or importing an image

@xinxinsh xinxinsh force-pushed the xinxinsh:wip-13533 branch from 672b8b1 to ea0b562 Oct 21, 2015

@dillaman

This comment has been minimized.

Copy link
Contributor

dillaman commented Oct 21, 2015

@xinxinsh Please separate these two commits into two PRs since they are unrelated.

@dillaman

This comment has been minimized.

Copy link
Contributor

dillaman commented Oct 21, 2015

@xinxinsh The proposed change would mean that create/import ops are no longer forced to image format 2 when image features are specified. How about moving this section of code:

  if (features != 0 && !format_specified) {
    format = 2;
    format_specified = true;
  } else if (features == 0) {
    features = g_conf->rbd_default_features;
  }

down and combine with this section of code:

  if (!format_specified)
    format = g_conf->rbd_default_format;

but modify it so that it only manipulates format/format_specified during create/import operations?

@xinxinsh xinxinsh force-pushed the xinxinsh:wip-13533 branch from ea0b562 to 6887e4a Oct 21, 2015

@xinxinsh

This comment has been minimized.

Copy link
Member Author

xinxinsh commented Oct 21, 2015

@dillaman updated

@dillaman dillaman added common rbd and removed rbd common labels Oct 21, 2015

@dillaman

This comment has been minimized.

Copy link
Contributor

dillaman commented Nov 2, 2015

My only comment is that "do_clone" should always apply RBD_FEATURE_LAYERING to the features bitset. Otherwise, we see the following:

$ ./rbd clone --image-feature object-map --image-feature exclusive-lock foo@1 goo
rbd: clone error: (22) Invalid argument
xinxin shu
rbd: fix clone issue when we specify image feature
Fixes: #13553

Signed-off-by: xinxin shu <xinxin.shu@intel.com>

@xinxinsh xinxinsh force-pushed the xinxinsh:wip-13533 branch from 6887e4a to da48dbb Nov 3, 2015

@xinxinsh

This comment has been minimized.

Copy link
Member Author

xinxinsh commented Nov 3, 2015

@dillaman , updated, pls help review

@dillaman

This comment has been minimized.

Copy link
Contributor

dillaman commented Nov 3, 2015

lgtm

dillaman added a commit that referenced this pull request Nov 4, 2015

Merge pull request #6334 from xinxinsh/wip-13533
rbd : fix clone isssue

Reviewed-by: Jason Dillaman <dillaman@redhat.com>

@dillaman dillaman merged commit 0d299c9 into ceph:master Nov 4, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.