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

errno is set to EINVAL on successful writes #11

Merged
merged 1 commit into from
Dec 7, 2015

Conversation

prashanthpai
Copy link
Contributor

Signed-off-by: Prashanth Pai ppai@redhat.com

Signed-off-by: Prashanth Pai <ppai@redhat.com>
@prashanthpai
Copy link
Contributor Author

Snippet to reproduce the bug: https://gist.github.com/prashanthpai/c89f096698faf89490cb

// FIXME: errno is set to EINVAL even though write is successful. This
// is probably a bug. Remove this workaround when that gets fixed.
err = nil
}
Copy link
Member

Choose a reason for hiding this comment

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

Is this a bug with gfapi itself? If there is a bug-id associated with this for gfapi, please mention it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Haven't looked into it yet but made a note of it and plan to do it later. I'm certain that the bug is not in the go bindings. The behavior is easily observable: https://gist.github.com/prashanthpai/c89f096698faf89490cb

@prashanthpai
Copy link
Contributor Author

ret, err := C.glfs_set_logging(v.fs, nil, C.int(logLevel))
return int(ret), err

This also results in ret being 0, errno set to ENOENT and hence err returned is not nil.
Just making a note here so that I don't forget.

@kshlm
Copy link
Member

kshlm commented Dec 7, 2015

I opened an issue #14 to track the workaround. I'll merge this now.

Thanks.

kshlm added a commit that referenced this pull request Dec 7, 2015
errno is set to EINVAL on successful writes
@kshlm kshlm merged commit 6e4d590 into gluster:master Dec 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants