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

rgw_file: fix reversed return value of getattr #13895

Merged
merged 1 commit into from Mar 20, 2017

Conversation

guihecheng
Copy link

When ::getattr returns -ESTALE, rgw_getattr returns ESTALE,
which is a not expected postive.

Signed-off-by: Gui Hecheng guihecheng@cmss.chinamobile.com

When ::getattr returns -ESTALE, rgw_getattr returns ESTALE,
which is a not expected postive.

Signed-off-by: Gui Hecheng <guihecheng@cmss.chinamobile.com>
@guihecheng
Copy link
Author

@mattbenjamin any comments on this?

@mattbenjamin
Copy link
Contributor

mattbenjamin commented Mar 19, 2017

@guihecheng actually, I think that the pattern is evolving to be RGWLibFS:: (for all operations) should return an already sign-corrected result. As I read the code, RGWLibFS::getattr() will in fact return -ESTALE, so we don't want to sign-reverse it, right?

@mattbenjamin mattbenjamin self-requested a review March 19, 2017 15:51
@mattbenjamin mattbenjamin self-assigned this Mar 19, 2017
@guihecheng
Copy link
Author

@mattbenjamin yes, actually ganesha FSAL_RGW always take a negative retcode for errors, so here we should keep the negative one.

Copy link
Contributor

@mattbenjamin mattbenjamin left a comment

Choose a reason for hiding this comment

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

oh, ok, misread this, this is correct

@mattbenjamin mattbenjamin merged commit 8af0e58 into ceph:master Mar 20, 2017
@guihecheng guihecheng deleted the rgw_file-fix branch April 7, 2017 01:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants