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

fuse: handle errors appropriately when getting group list #21025

Closed
wants to merge 1 commit into from

Conversation

jtlayton
Copy link
Contributor

Currently, the GET_GROUPS macro just ignores errors that can occur when
attempting to get the list of groups. Change it to a real function that
returns an error when getting groups fails, and check for errors in the
callers.

Tracker: http://tracker.ceph.com/issues/23446
Signed-off-by: Jeff Layton jlayton@redhat.com

Currently, the GET_GROUPS macro just ignores errors that can occur when
attempting to get the list of groups. Change it to a real function that
returns an error when getting groups fails, and check for errors in the
callers.

Tracker: http://tracker.ceph.com/issues/23446
Signed-off-by: Jeff Layton <jlayton@redhat.com>
@jtlayton jtlayton added the cephfs Ceph File System label Mar 23, 2018
@jtlayton
Copy link
Contributor Author

Teuthology tests are running now:

http://pulpito.ceph.com/jlayton-2018-03-23_12:51:39-fs-wip-jlayton-23446-distro-basic-smithi/

@jtlayton
Copy link
Contributor Author

Retest this please

Copy link
Member

@joscollin joscollin left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@ukernel
Copy link
Contributor

ukernel commented Mar 24, 2018

getgroups() may return -ENOSYS. I think ceph-fuse shouldn't reply error in this case. besides, do we really need to reply error immediately. how about just set count to 0

@jtlayton
Copy link
Contributor Author

Thanks @ukernel.

That does make a lot more sense -- let's do that. We can have it log an error when fetching groups fails with a hard error too, which would make it easier to debug problems when they occur. I'll close this request for now, and reopen it once I re-roll the patch to do that.

@jtlayton jtlayton closed this Mar 24, 2018
@batrick
Copy link
Member

batrick commented Mar 27, 2018

I like the error checking in this patch so let's keep those parts. I agree that using an empty group list makes sense for -ENOSYS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-fix cephfs Ceph File System
Projects
None yet
4 participants