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

engines/xnvme: only include entry-header ('libxnvme.h') #1673

Merged
merged 1 commit into from
Nov 20, 2023

Conversation

safl
Copy link
Contributor

@safl safl commented Nov 20, 2023

This changes how the xNVMe fio io-engine consumes the xNVMe library by only including the library-entry header "libxnvme.h".

From version 0.7.0 the xNVMe API headers are refactored to drop header guards on the individual headers and abide by the idiom of "headers must not include other headers".

The exception is the library-entry header "libxnvme.h". The library-entry-header includes all headers provided with xNVMe, which is a convenient approach to consuming the library. One where, in case the API namespace grows or shrinks, then the xNVMe fio io-engine need not change how it includes xNVMe.

However, since fio has consumed the main-entry header and individual headers, xNVMe has held back on removing the guards on _nvm, _zns, and _spec to avoid breaking the xNVMe fio engine. They will eventually be deprecated. Thus, this change to consume xNVMe in the manner intended from version v0.7.0 and onwards.

This changes how the xNVMe fio io-engine consumes the xNVMe library by
only including the library-entry header "libxnvme.h".

From version 0.7.0 the xNVMe API headers are refactored to drop header
guards on the individual headers and abide by the idiom of "headers must
not include other headers".

The exception is the library-entry header "libxnvme.h". The
library-entry-header includes all headers provided with xNVMe, which is
a convenient approach to consuming the library. One where, in case the
API namespace grows or shrinks, then the xNVMe fio io-engine need not
change how it includes xNVMe.

However, since fio has consumed the main-entry header and individual
headers, xNVMe has held back on removing the guards on _nvm, _zns, and
_spec to avoid breaking the xNVMe fio engine. They will eventually be
deprecated. Thus, this change to consume xNVMe in the manner intended
from version v0.7.0 and onwards.

Signed-off-by: Simon A. F. Lund <simon.lund@samsung.com>
@axboe axboe merged commit bdf99b6 into axboe:master Nov 20, 2023
10 checks passed
@axboe
Copy link
Owner

axboe commented Nov 20, 2023

Patch looks fine, but color me skeptical on removing header guards for xnvme. Not my project so don't really care, but seems like a bad idea and you're just going to be fielding silly issues because of it.

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