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

cls_rbd: change object_map_update to return 0 on success, add logging #6467

Merged
merged 1 commit into from Nov 6, 2015

Conversation

fullerdj
Copy link
Contributor

@fullerdj fullerdj commented Nov 5, 2015

The rbd_object_map_update class method returns the size of the data read
from the object map when no update is necessary. Change this to return 0
on success. Add error logging to differentiate error cases.

Signed-off-by: Douglas Fuller dfuller@redhat.com

@fullerdj fullerdj closed this Nov 5, 2015
@fullerdj fullerdj reopened this Nov 5, 2015
@jdurgin
Copy link
Member

jdurgin commented Nov 5, 2015

lgtm

}

if (r > 0) {
Copy link

Choose a reason for hiding this comment

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

Good catch --- minor comment: can we change this to the following?

if (r < 0) {
  return r;
}
return 0;

The rbd_object_map_update class method returns the size of the data read
from the object map when no update is necessary. Change this to return 0
on success. Add error logging to differentiate error cases.

Signed-off-by: Douglas Fuller <dfuller@redhat.com>
@fullerdj
Copy link
Contributor Author

fullerdj commented Nov 6, 2015

@dillaman changed.

@dillaman
Copy link

dillaman commented Nov 6, 2015

LGTM

dillaman pushed a commit that referenced this pull request Nov 6, 2015
cls_rbd: change object_map_update to return 0 on success, add logging

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
@dillaman dillaman merged commit b55a41b into ceph:master Nov 6, 2015
@fullerdj fullerdj deleted the wip-13697 branch November 7, 2015 03:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants