-
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
Bump libzfs.so revision #11817
Bump libzfs.so revision #11817
Conversation
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.
https://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
This looks wrong to me. We are in scenario 2 (in the bottom list on that page), right?
Programs using the previous version may use the new version as drop-in replacement, but programs using the new version may use APIs not present in the previous one. In other words, a program linking against the new version may fail with “unresolved symbols” if linking against the old version at runtime: set revision to 0, bump current and age.
This should be 4:0:0 -> 5:0:1.
It depends on exactly what we want to consider to be part of the library interface, and what we don't. Right now, the automated ABI checks consider any function listed in the header files (i.e. I wanted to open this PR to get some feedback on which approach to take. Bumping the version (as you suggest) seems like the right technical thing to do. It also probably means in practice we'll be bumping the libzfs version for each new OpenZFS release. i.e. OpenZFS 2.1 will provide a |
That sounds right at first glance.
4:0:0 -> 5:0:0 is only appropriate if you have broken backwards compatibility. That is, if OpenZFS is using semantic versioning, 4:0:0 -> 5:0:0 would be OpenZFS 2.0.0 -> OpenZFS 3.0.0. If you only extended the API (which is what you have described here), then it's 4:0:0 -> 5:0:1 and OpenZFS 2.0.0 -> OpenZFS 2.1.0. Put differently, the mapping between semver and libtool is current:micro:minor where current is incremented for both major and minor version bumps. This is how Pidgin/libpurple has handled this for years. (Whether OpenZFS is actually using semver or not is irrelevant. I'm just using it as semver is relatively familiar to a log of people.)
I'm not sure whether it is reasonable or not for libzfs to export private APIs for use by zpool. If it is, then packaging for zpool must tightly depending on the exact match of libzfs. That said, that is exactly what the Debian zfsutils-linux package is doing today.
Agreed. |
Bump the library versions as advised by the libtool guidelines. https://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html Two new functions were added but no existing functions were changed, so we increase the version and the age (version:revision:age). Added functions (2): - boolean_t zpool_is_draid_spare(const char *); - zpool_compat_status_t zpool_load_compat(const char *, boolean_t *, char *, char *); Additionally bump the libzpool.so version information. This library is for internal use but we still want to update the version to track major changes to the interfaces. The libzfsbootenv, libuutil, libnvpair and libzfs_core libraries have not been updated. Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
05a39c7
to
ae75012
Compare
I've gone ahead and updated the PR to bump the version and the age for libzfs.so as described in the libtool documentation. While I was at it I also bumped the version for libzpool.so (but not the age). This isn't a public library but since it has seen significant change it seemed appropriate to update it as well. The various other libraries remain fully compatible with previous versions. |
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.
LGTM, assuming that "significant change" for libzpool means backwards incompatibility. I did not verify that.
That's definitely the case. |
Not directly related to this merge, but can we guarantee interoperability between different kernel versions and library versions? I know that at least some header files are directly included in both the libraries and the kernel modules---suggesting that changes in those header files could break interoperability. Given how few programs external to ZFS use the C API, I think a more pressing concern may be kernel-library version interoperability. But, more directly: I agree with @rlaager that, if the changes are not backwards compatible, we need to bump the version. |
The changes to
So a version bump looks like the right thing to do.
We're in good shape here. The user / kernel interface is backwards compatible and older versions of the library will only exercise those backwards compatible interfaces. Furthermore, since the 0.8 release we've had infrastructure in place for the library to check what features are supported by the kernel and only use those which are supported by the kmods. So newer versions of the library will also interoperate with older kernel modules. A useful error message is printed if you try and use a feature not supported by the running kmods. |
Bump the library versions as advised by the libtool guidelines. https://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html Two new functions were added but no existing functions were changed, so we increase the version and the age (version:revision:age). Added functions (2): - boolean_t zpool_is_draid_spare(const char *); - zpool_compat_status_t zpool_load_compat(const char *, boolean_t *, char *, char *); Additionally bump the libzpool.so version information. This library is for internal use but we still want to update the version to track major changes to the interfaces. The libzfsbootenv, libuutil, libnvpair and libzfs_core libraries have not been updated. Reviewed-by: Richard Laager <rlaager@wiktel.com> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #11817
Bump the library versions as advised by the libtool guidelines. https://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html Two new functions were added but no existing functions were changed, so we increase the version and the age (version:revision:age). Added functions (2): - boolean_t zpool_is_draid_spare(const char *); - zpool_compat_status_t zpool_load_compat(const char *, boolean_t *, char *, char *); Additionally bump the libzpool.so version information. This library is for internal use but we still want to update the version to track major changes to the interfaces. The libzfsbootenv, libuutil, libnvpair and libzfs_core libraries have not been updated. Reviewed-by: Richard Laager <rlaager@wiktel.com> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes openzfs#11817
Bump the library versions as advised by the libtool guidelines. https://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html Two new functions were added but no existing functions were changed, so we increase the version and the age (version:revision:age). Added functions (2): - boolean_t zpool_is_draid_spare(const char *); - zpool_compat_status_t zpool_load_compat(const char *, boolean_t *, char *, char *); Additionally bump the libzpool.so version information. This library is for internal use but we still want to update the version to track major changes to the interfaces. The libzfsbootenv, libuutil, libnvpair and libzfs_core libraries have not been updated. Reviewed-by: Richard Laager <rlaager@wiktel.com> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes openzfs#11817
The ABI of libzfs and libzpool have breaking changes since last SONAME bump in commit fe6babc: libzfs: `zpool_print_unsup_feat` removed (used by zpool cmd). libzpool: multiple `ddt_*` symbols removed (used by zdb cmd). Bump them to avoid ABI breakage. See: openzfs#11817 Signed-off-by: Shengqi Chen <harry-chen@outlook.com>
The ABI of libzfs and libzpool have breaking changes since last SONAME bump in commit fe6babc: * libzfs: `zpool_print_unsup_feat` removed (used by zpool cmd). * libzpool: multiple `ddt_*` symbols removed (used by zdb cmd). Bump them to avoid ABI breakage. See: openzfs#11817 ZFS-CI-Type: quick Signed-off-by: Shengqi Chen <harry-chen@outlook.com>
The ABI of libzfs and libzpool have breaking changes since last SONAME bump in commit fe6babc: * libzfs: `zpool_print_unsup_feat` removed (used by zpool cmd). * libzpool: multiple `ddt_*` symbols removed (used by zdb cmd). Bump them to avoid ABI breakage. See: #11817 Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Shengqi Chen <harry-chen@outlook.com> Closes #16609
The ABI of libzfs and libzpool have breaking changes since last SONAME bump in commit fe6babc: * libzfs: `zpool_print_unsup_feat` removed (used by zpool cmd). * libzpool: multiple `ddt_*` symbols removed (used by zdb cmd). Bump them to avoid ABI breakage. See: openzfs#11817 Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Shengqi Chen <harry-chen@outlook.com> Closes openzfs#16609
Motivation and Context
Prior to releasing OpenZFS 2.1 it needs to be determined how we want to
bump the
libzfs.so
library version. This change proposes just bumping thelibrary revision since the changes do not modify any existing interface. The
OpenZFS 2.0 binaries can use the new library as a drop in replacement.
That said, there's a good argument to be made we should really be bumping
the version instead since the new features in 2.1 do require the updated library.
However, I'd like to avoid unnecessarily inflating the version if possible.
cc: @aerusso @rlaager
Description
The added functions and changes variables are used internally and
not part of the library interface. Bump the libzfs.so revision as
advised by the libtool guidelines due to the source change. The
specific changes are:
Added functions (2):
boolean_t *, char *, char *);
Changes variables (2):
How Has This Been Tested?
Locally compiled, and visually inspected the updated revision number.
Manual compatibility test is still needed.
Types of changes
Checklist:
Signed-off-by
.