-
Notifications
You must be signed in to change notification settings - Fork 279
cephfs: Use wrappers to handle the ABI changes with chown APIs #1127
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
Conversation
82c4157 to
19b39bc
Compare
|
OK, so Go is being pickier than C is in this case? OK seems reasonable. I still think it was a good idea to warn the cephfs team so we don't get disruptive changes in the future. |
Yes. |
19b39bc to
b329416
Compare
|
Something is wrong with GitHub CI. I'll check later. |
|
@Mergifyio rebase |
CephStatx struct returned by mount.Statx() already contains uint32 type converted Uid and Gid data members. Signed-off-by: Anoop C S <anoopcs@cryptolab.net>
Data types for few of the function parameters from chown() family of
APIs recently changed causing cephfs package builds to fail due to
incorrect type cast.
cephfs/file.go:287:99: cannot use _Ctype_int(user) (value of int32 type
_Ctype_int) as _Ctype_uid_t value in variable declaration
cephfs/file.go:287:112: cannot use _Ctype_int(group) (value of int32 type
_Ctype_int) as _Ctype_gid_t value in variable declaration
cephfs/permissions.go:29:67: cannot use _Ctype_int(user) (value of int32 type
_Ctype_int) as _Ctype_uid_t value in variable declaration
cephfs/permissions.go:29:80: cannot use _Ctype_int(group) (value of int32 type
_Ctype_int) as _Ctype_gid_t value in variable declaration
cephfs/permissions.go:38:68: cannot use _Ctype_int(user) (value of int32 type
_Ctype_int) as _Ctype_uid_t value in variable declaration
cephfs/permissions.go:38:81: cannot use _Ctype_int(group) (value of int32 type
_Ctype_int) as _Ctype_gid_t value in variable declaration
Leaning on C's implicit type conversion, introduce wrappers to act as an
intermediary for calling the underlying APIs.
Signed-off-by: Anoop C S <anoopcs@cryptolab.net>
✅ Branch has been successfully rebased |
b329416 to
19f29a7
Compare
nixpanic
left a comment
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.
I'm a little surprised this doesn't throw a warning, but I like its simplicity. Thanks!
phlogistonjohn
left a comment
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.
looks ok to me
Create backward compatible wrappers to cope with the change in ABI for chown family of APIs counting on the implicit type conversion from C.
fixes #1119