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
Conversation
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.
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; |
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.
@dillaman we have if (r != -ENOENT)
block below.
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.
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
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.
D'oh -- sorry, never mind
efcf429
to
1cf16c2
Compare
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
1cf16c2
to
bed3356
Compare
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
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)
Signed-off-by: Jason Dillaman dillaman@redhat.com