-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Correct Linux 4.X group_info fields detection #13341
Conversation
Check for `struct group_info.nblocks` field existence instead of `struct group_info.gid` for Linux 4.9 API change. Fixes compilation for Linux longterm branches. Signed-off-by: szubersk <[email protected]>
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.
How exactly is this check failing in the longterm branches? I ask, because normally we try and write the configure tests to detect the new interface (->gid in this case), and then fallback to the legacy interface. This tends to work fairly well since the legacy interface is unlikely to change, and because it allows us to keep the check when we can finally retire the legacy compatibility code.
@@ -56,6 +56,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_CRED_USER_NS], [ | |||
],[ | |||
struct cred cr; |
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.
struct cred cr; | |
struct cred cr __attribute__ ((unused)); |
This works, but we've tried to use the __attribute__ ((unused))
in the m4 config files instead of (void)cr
.
Same change in ZFS_AC_KERNEL_SRC_GROUP_INFO_NBLOCKS
Please take OpenZFS master and Linux 4.9.310, run
This might be due to the minimalistic nature of the kernel I compiled. EDIT01
EDIT02
Enhancing the minimalistic config to the following form helps.
Thanks for helping catch the erorr. The |
Ahh, that makes sense. Thanks for taking a second look. We could add some additional checks to ensure the legacy interface exists. You'd still see the failure without |
Motivation and Context
Issues found while testing #13339.
Description
Check for
struct group_info.nblocks
field existence instead ofstruct group_info.gid
for Linux 4.9 API change.Fixes compilation for Linux longterm branches.
How Has This Been Tested?
$ make
Types of changes
Checklist:
Signed-off-by
.