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

Prefer org.openzfs for features and properties #10003

Merged
merged 1 commit into from
Feb 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions include/sys/fs/zfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -591,8 +591,8 @@ typedef struct zpool_load_policy {

/*
* The following are configuration names used in the nvlist describing a pool's
* configuration. New on-disk names should be prefixed with "<reverse-DNS>:"
* (e.g. "org.open-zfs:") to avoid conflicting names being developed
* configuration. New on-disk names should be prefixed with "<reversed-DNS>:"
* (e.g. "org.openzfs:") to avoid conflicting names being developed
* independently.
*/
#define ZPOOL_CONFIG_VERSION "version"
Expand Down
2 changes: 1 addition & 1 deletion man/man5/zpool-features.5
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ this set may include unsupported features.
.sp
.LP
Every feature has a GUID of the form \fIcom.example:feature_name\fR. The
reverse DNS name ensures that the feature's GUID is unique across all ZFS
reversed DNS name ensures that the feature's GUID is unique across all ZFS
implementations. When unsupported features are encountered on a pool they will
be identified by their GUIDs. Refer to the documentation for the ZFS
implementation that created the pool for information about those features.
Expand Down
15 changes: 13 additions & 2 deletions module/zcommon/zfeature_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,19 @@ zfeature_register(spa_feature_t fid, const char *guid, const char *name,
feature->fi_zfs_mod_supported = zfs_mod_supported_feature(guid);
}

/*
* Every feature has a GUID of the form com.example:feature_name. The
* reversed DNS name ensures that the feature's GUID is unique across all ZFS
* implementations. This allows companies to independently develop and
* release features. Examples include org.delphix and org.datto. Previously,
* features developed on one implementation have used that implementation's
* domain name (e.g. org.illumos and org.zfsonlinux). Use of the org.openzfs
* domain name is recommended for new features which are developed by the
* OpenZFS community and its platforms. This domain may optionally be used by
* companies developing features for initial release through an OpenZFS
* implementation. Use of the org.openzfs domain requires reserving the
* feature name in advance with the OpenZFS project.
*/
void
zpool_feature_init(void)
{
Expand Down Expand Up @@ -548,12 +561,10 @@ zpool_feature_init(void)
ZFEATURE_TYPE_BOOLEAN, project_quota_deps);
}

{
zfeature_register(SPA_FEATURE_ALLOCATION_CLASSES,
"org.zfsonlinux:allocation_classes", "allocation_classes",
"Support for separate allocation classes.",
ZFEATURE_FLAG_READONLY_COMPAT, ZFEATURE_TYPE_BOOLEAN, NULL);
}

zfeature_register(SPA_FEATURE_RESILVER_DEFER,
"com.datto:resilver_defer", "resilver_defer",
Expand Down
20 changes: 10 additions & 10 deletions tests/zfs-tests/tests/functional/cli_root/zfs_send/zfs_send-b.ksh
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ log_must zfs snapshot "$SENDFS@s1"
log_must zfs bookmark "$SENDFS@s1" "$SENDFS#bm"
log_must zfs snapshot "$SENDFS@s2"
log_must zfs set "compression=gzip" $SENDFS
log_must zfs set "org.zfsonlinux:prop=val" $SENDFS
log_must zfs set "org.zfsonlinux:snapprop=val" "$SENDFS@s1"
log_must zfs set "org.openzfs:prop=val" $SENDFS
log_must zfs set "org.openzfs:snapprop=val" "$SENDFS@s1"

# 2. Verify command line options interact with '-b' correctly
typeset opts=("" "p" "Rp" "cew" "nv" "D" "DLPRcenpvw")
Expand All @@ -78,21 +78,21 @@ for opt in ${opts[@]}; do
# NOTE: override "received" values and set some new properties as well
log_must zfs set "compression=lz4" $BACKUP
log_must zfs set "exec=off" $BACKUP
log_must zfs set "org.zfsonlinux:prop=newval" $BACKUP
log_must zfs set "org.zfsonlinux:newprop=newval" $BACKUP
log_must zfs set "org.zfsonlinux:snapprop=newval" "$BACKUP@s1"
log_must zfs set "org.zfsonlinux:newsnapprop=newval" "$BACKUP@s1"
log_must zfs set "org.openzfs:prop=newval" $BACKUP
log_must zfs set "org.openzfs:newprop=newval" $BACKUP
log_must zfs set "org.openzfs:snapprop=newval" "$BACKUP@s1"
log_must zfs set "org.openzfs:newsnapprop=newval" "$BACKUP@s1"

# 5. Restore the "backup" dataset to a new destination
log_must eval "zfs send -b$opt $BACKUP@s1 | zfs recv $RESTORE"

# 6. Verify only original (received) properties are sent from "backup"
log_must eval "check_prop_source $RESTORE compression gzip received"
log_must eval "check_prop_source $RESTORE org.zfsonlinux:prop val received"
log_must eval "check_prop_source $RESTORE@s1 org.zfsonlinux:snapprop val received"
log_must eval "check_prop_source $RESTORE org.openzfs:prop val received"
log_must eval "check_prop_source $RESTORE@s1 org.openzfs:snapprop val received"
log_must eval "check_prop_source $RESTORE exec on default"
log_must eval "check_prop_missing $RESTORE org.zfsonlinux:newprop"
log_must eval "check_prop_missing $RESTORE@s1 org.zfsonlinux:newsnapprop"
log_must eval "check_prop_missing $RESTORE org.openzfs:newprop"
log_must eval "check_prop_missing $RESTORE@s1 org.openzfs:newsnapprop"

# cleanup
log_must zfs destroy -r $BACKUP
Expand Down