diff options
author | Ryan Moeller <[email protected]> | 2020-02-04 11:40:08 -0500 |
---|---|---|
committer | GitHub <[email protected]> | 2020-02-04 08:40:07 -0800 |
commit | 8c4987c489c842a7dcd2356bdfd53e2aacc33316 (patch) | |
tree | 0a08a1cd7d9a3bae4c1c56667dccfdd2bb73e604 /module/zcommon/zfs_prop.c | |
parent | 07bc2bc2319655c0a9dd92f4a732467bfeac4874 (diff) |
Restore aclmode and remove acltype on FreeBSD
This replaces the placeholder ZFS_PROP_PRIVATE with ZFS_PROP_ACLMODE,
matching what is done in the NFSv4 ACLs PR (#9709).
On FreeBSD we hide ZFS_PROP_ACLTYPE, while on Linux we hide
ZFS_PROP_ACLMODE.
The tests already assume this arrangement.
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Alexander Motin <[email protected]>
Signed-off-by: Ryan Moeller <[email protected]>
Closes #9913
Diffstat (limited to 'module/zcommon/zfs_prop.c')
-rw-r--r-- | module/zcommon/zfs_prop.c | 29 |
1 files changed, 26 insertions, 3 deletions
diff --git a/module/zcommon/zfs_prop.c b/module/zcommon/zfs_prop.c index 506a9bdfe..8dfadfaaf 100644 --- a/module/zcommon/zfs_prop.c +++ b/module/zcommon/zfs_prop.c @@ -160,6 +160,14 @@ zfs_prop_init(void) { NULL } }; + static zprop_index_t acl_mode_table[] = { + { "discard", ZFS_ACL_DISCARD }, + { "groupmask", ZFS_ACL_GROUPMASK }, + { "passthrough", ZFS_ACL_PASSTHROUGH }, + { "restricted", ZFS_ACL_RESTRICTED }, + { NULL } + }; + static zprop_index_t acltype_table[] = { { "off", ZFS_ACLTYPE_OFF }, { "disabled", ZFS_ACLTYPE_OFF }, @@ -330,9 +338,16 @@ zfs_prop_init(void) zprop_register_index(ZFS_PROP_SNAPDEV, "snapdev", ZFS_SNAPDEV_HIDDEN, PROP_INHERIT, ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME, "hidden | visible", "SNAPDEV", snapdev_table); +#ifdef __FreeBSD__ + zprop_register_index(ZFS_PROP_ACLMODE, "aclmode", ZFS_ACL_DISCARD, + PROP_INHERIT, ZFS_TYPE_FILESYSTEM, + "discard | groupmask | passthrough | restricted", "ACLMODE", + acl_mode_table); +#else zprop_register_index(ZFS_PROP_ACLTYPE, "acltype", ZFS_ACLTYPE_OFF, PROP_INHERIT, ZFS_TYPE_FILESYSTEM | ZFS_TYPE_SNAPSHOT, "noacl | posixacl", "ACLTYPE", acltype_table); +#endif zprop_register_index(ZFS_PROP_ACLINHERIT, "aclinherit", ZFS_ACL_RESTRICTED, PROP_INHERIT, ZFS_TYPE_FILESYSTEM, "discard | noallow | restricted | passthrough | passthrough-x", @@ -602,9 +617,17 @@ zfs_prop_init(void) * that we don't have to change the values of the zfs_prop_t enum, or * have NULL pointers in the zfs_prop_table[]. */ - zprop_register_hidden(ZFS_PROP_PRIVATE, "priv_prop", - PROP_TYPE_NUMBER, PROP_READONLY, ZFS_TYPE_FILESYSTEM, - "PRIV_PROP"); +#ifdef __FreeBSD__ + zprop_register_impl(ZFS_PROP_ACLTYPE, "acltype", PROP_TYPE_INDEX, + ZFS_ACLTYPE_OFF, NULL, PROP_INHERIT, + ZFS_TYPE_FILESYSTEM | ZFS_TYPE_SNAPSHOT, + "noacl | posixacl", "ACLTYPE", B_FALSE, B_FALSE, acltype_table); +#else + zprop_register_impl(ZFS_PROP_ACLMODE, "aclmode", PROP_TYPE_INDEX, + ZFS_ACL_DISCARD, NULL, PROP_INHERIT, ZFS_TYPE_FILESYSTEM, + "discard | groupmask | passthrough | restricted", "ACLMODE", + B_FALSE, B_FALSE, acl_mode_table); +#endif zprop_register_hidden(ZFS_PROP_REMAPTXG, "remaptxg", PROP_TYPE_NUMBER, PROP_READONLY, ZFS_TYPE_DATASET, "REMAPTXG"); |