-
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
libspl: declare aok extern in header #9752
Conversation
@dankamongmen It would be awesome if you would restore formatting on your PR description. If you haven't run ztest and zloop yourself, it might be prefered if you submitted it as a draft PR next time. No biggy, but it keeps clear which PR is expected to work and what isn't. :) Good luck with getting this working 👍 |
I believe this is done, thanks. |
Having looked at some of the build failures above, it appears that some of the testing objects need their own definitions of |
I see, and believe. Thank you! |
I think @jwk404 should be suited to answer this... |
For additional background information see #9610, but the intended purpose of this variable it so allow I agree, it really should be |
In addition to the changes above, I also added
to get it built, and the new -A feature still worked in zdb. |
Looks like most of the tests are passing with this latest, thanks @PaulZ-98 . PTAL. |
Codecov Report
@@ Coverage Diff @@
## master #9752 +/- ##
========================================
- Coverage 80% 79% -<1%
========================================
Files 385 385
Lines 121470 121470
========================================
- Hits 96787 96472 -315
- Misses 24683 24998 +315
Continue to review full report at Codecov.
|
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.
Since it looks like we only have a single exception with the edonr test code I'm good with this. Let's just explicitly initialize the global.
Rather than defining a new instance of 'aok' in every compilation unit which includes this header, there is a single instance defined in zone.c, and the header now only declares an extern. Signed-off-by: Nick Black <dankamongmen@gmail.com>
Rather than defining a new instance of 'aok' in every compilation unit which includes this header, there is a single instance defined in zone.c, and the header now only declares an extern. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Paul Zuchowski <pzuchowski@datto.com> Signed-off-by: Nick Black <dankamongmen@gmail.com> Closes openzfs#9752
Rather than defining a new instance of 'aok' in every compilation unit which includes this header, there is a single instance defined in zone.c, and the header now only declares an extern. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Paul Zuchowski <pzuchowski@datto.com> Signed-off-by: Nick Black <dankamongmen@gmail.com> Closes openzfs#9752
Rather than defining a new instance of 'aok' in every compilation unit which includes this header, there is a single instance defined in zone.c, and the header now only declares an extern. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Paul Zuchowski <pzuchowski@datto.com> Signed-off-by: Nick Black <dankamongmen@gmail.com> Closes openzfs#9752
Rather than defining a new instance of 'aok' in every compilation unit which includes this header, there is a single instance defined in zone.c, and the header now only declares an extern. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Paul Zuchowski <pzuchowski@datto.com> Signed-off-by: Nick Black <dankamongmen@gmail.com> Closes #9752
Motivation and Context
aok
is declared and defined inassert.h
. This causes anyone who ends up including libspl'sassert.h
to pick up a definition ofaok
, resulting in a situation like:Maybe this is intended, so that independent files can set their assert settings up independently, but I don't see any kind of use like that within ZoL (and would be questionable IMHO in any case). Instead, I create a single definition in
zone.c
.Description
How Has This Been Tested?
Recompiled and reinstalled ZoL on my Debian Unstable machine, and reboooted. All zpools were discovered and filesystems mounted. I then ran
make check
in a checkout, and it succeeded.Types of changes
Checklist:
Signed-off-by
.