mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 18:40:43 +03:00
Add no-upgrade featureflag
Adds a featureflag that is not enabled during upgrades unless listed explicitly. This is useful for features that could cause issues unless applied carefully; for example, a feature that could make a root pool unbootable if bootloaders don't yet have support for it. Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Reviewed-by: Alexander Motin <mav@FreeBSD.org> Reviewed-by: Tony Hutter <hutter2@llnl.gov> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Rob Norris <rob.norris@klarasystems.com> Reviewed-by: Allan Jude <allan@klarasystems.com> Signed-off-by: Paul Dagnelie <paul.dagnelie@klarasystems.com> Closes #17004
This commit is contained in:
committed by
Brian Behlendorf
parent
4c2a7f85d5
commit
e845be28e7
@@ -5093,9 +5093,10 @@ zpool_load_compat(const char *compat, boolean_t *features, char *report,
|
||||
/* special cases (unset), "" and "off" => enable all features */
|
||||
if (compat == NULL || compat[0] == '\0' ||
|
||||
strcmp(compat, ZPOOL_COMPAT_OFF) == 0) {
|
||||
if (features != NULL)
|
||||
if (features != NULL) {
|
||||
for (uint_t i = 0; i < SPA_FEATURES; i++)
|
||||
features[i] = B_TRUE;
|
||||
}
|
||||
if (report != NULL)
|
||||
strlcpy(report, gettext("all features enabled"), rlen);
|
||||
return (ZPOOL_COMPATIBILITY_OK);
|
||||
|
||||
@@ -484,7 +484,8 @@ check_status(nvlist_t *config, boolean_t isimport,
|
||||
}
|
||||
for (i = 0; i < SPA_FEATURES; i++) {
|
||||
zfeature_info_t *fi = &spa_feature_table[i];
|
||||
if (!fi->fi_zfs_mod_supported)
|
||||
if (!fi->fi_zfs_mod_supported ||
|
||||
(fi->fi_flags & ZFEATURE_FLAG_NO_UPGRADE))
|
||||
continue;
|
||||
if (c_features[i] && !nvlist_exists(feat, fi->fi_guid))
|
||||
return (ZPOOL_STATUS_FEAT_DISABLED);
|
||||
|
||||
Reference in New Issue
Block a user