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: 'trash list --long' will return a failure on non-cloned images #19540

Merged
merged 1 commit into from Dec 15, 2017

Conversation

dillaman
Copy link

Signed-off-by: Jason Dillaman dillaman@redhat.com

Copy link
Contributor

@trociny trociny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks you meant '--long' in the log message.

@@ -236,8 +236,12 @@ int do_list(librbd::RBD &rbd, librados::IoCtx& io_ctx, bool long_flag,

std::string pool, image, snap, parent;
r = im.parent_info(&pool, &image, &snap);
if (r < 0 && r != -ENOENT)
if (r == -ENOENT) {
r = 0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dillaman we have if (r != -ENOENT) block below.

Copy link
Author

@dillaman dillaman Dec 15, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah -- but since it doesn't exit and doesn't clear the error code, that -ENOENT error code will be returned when the function exits here: https://github.com/ceph/ceph/pull/19540/files#diff-8a78f96557c8ae5b23b41bc6330c430bR286

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

D'oh -- sorry, never mind

@dillaman dillaman changed the title rbd: 'trash list --all' will return a failure on non-cloned images rbd: 'trash list --long' will return a failure on non-cloned images Dec 15, 2017
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Copy link
Contributor

@trociny trociny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@trociny trociny merged commit 18b9219 into ceph:master Dec 15, 2017
@dillaman dillaman deleted the wip-rbd-trash-list-enoent branch December 15, 2017 17:19
runsisi pushed a commit to runsisi/ceph that referenced this pull request Mar 20, 2018
rbd: 'trash list --long' will return a failure on non-cloned images

Reviewed-by: Mykola Golub <to.my.trociny@gmail.com>
(cherry picked from commit 18b9219)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants