OpenZFS 7304 - zfs filesystem/snapshot counts should be read-only
Authored by: Jerry Jelinek <jerry.jelinek@joyent.com> Reviewed by: Garrett D'Amore <garrett@damore.org> Reviewed by: Matthew Ahrens <mahrens@delphix.com> Approved by: Dan McDonald <danmcd@omniti.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Ported-by: George Melikov <mail@gmelikov.ru> OpenZFS-issue: https://www.illumos.org/issues/7304 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/007a6c1 Closes #5624
This commit is contained in:
parent
3cbe6b29f5
commit
911c41af2d
@ -22,6 +22,7 @@
|
|||||||
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||||
* Copyright (c) 2011, 2014 by Delphix. All rights reserved.
|
* Copyright (c) 2011, 2014 by Delphix. All rights reserved.
|
||||||
* Copyright (c) 2013 by Saso Kiselkov. All rights reserved.
|
* Copyright (c) 2013 by Saso Kiselkov. All rights reserved.
|
||||||
|
* Copyright 2016, Joyent, Inc.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Portions Copyright 2010 Robert Milkowski */
|
/* Portions Copyright 2010 Robert Milkowski */
|
||||||
@ -432,6 +433,12 @@ zfs_prop_init(void)
|
|||||||
PROP_READONLY, ZFS_TYPE_DATASET, "<size>", "LUSED");
|
PROP_READONLY, ZFS_TYPE_DATASET, "<size>", "LUSED");
|
||||||
zprop_register_number(ZFS_PROP_LOGICALREFERENCED, "logicalreferenced",
|
zprop_register_number(ZFS_PROP_LOGICALREFERENCED, "logicalreferenced",
|
||||||
0, PROP_READONLY, ZFS_TYPE_DATASET, "<size>", "LREFER");
|
0, PROP_READONLY, ZFS_TYPE_DATASET, "<size>", "LREFER");
|
||||||
|
zprop_register_number(ZFS_PROP_FILESYSTEM_COUNT, "filesystem_count",
|
||||||
|
UINT64_MAX, PROP_READONLY, ZFS_TYPE_FILESYSTEM,
|
||||||
|
"<count>", "FSCOUNT");
|
||||||
|
zprop_register_number(ZFS_PROP_SNAPSHOT_COUNT, "snapshot_count",
|
||||||
|
UINT64_MAX, PROP_READONLY, ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME,
|
||||||
|
"<count>", "SSCOUNT");
|
||||||
|
|
||||||
/* default number properties */
|
/* default number properties */
|
||||||
zprop_register_number(ZFS_PROP_QUOTA, "quota", 0, PROP_DEFAULT,
|
zprop_register_number(ZFS_PROP_QUOTA, "quota", 0, PROP_DEFAULT,
|
||||||
@ -452,12 +459,6 @@ zfs_prop_init(void)
|
|||||||
zprop_register_number(ZFS_PROP_SNAPSHOT_LIMIT, "snapshot_limit",
|
zprop_register_number(ZFS_PROP_SNAPSHOT_LIMIT, "snapshot_limit",
|
||||||
UINT64_MAX, PROP_DEFAULT, ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME,
|
UINT64_MAX, PROP_DEFAULT, ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME,
|
||||||
"<count> | none", "SSLIMIT");
|
"<count> | none", "SSLIMIT");
|
||||||
zprop_register_number(ZFS_PROP_FILESYSTEM_COUNT, "filesystem_count",
|
|
||||||
UINT64_MAX, PROP_DEFAULT, ZFS_TYPE_FILESYSTEM,
|
|
||||||
"<count>", "FSCOUNT");
|
|
||||||
zprop_register_number(ZFS_PROP_SNAPSHOT_COUNT, "snapshot_count",
|
|
||||||
UINT64_MAX, PROP_DEFAULT, ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME,
|
|
||||||
"<count>", "SSCOUNT");
|
|
||||||
|
|
||||||
/* inherit number properties */
|
/* inherit number properties */
|
||||||
zprop_register_number(ZFS_PROP_RECORDSIZE, "recordsize",
|
zprop_register_number(ZFS_PROP_RECORDSIZE, "recordsize",
|
||||||
|
Loading…
Reference in New Issue
Block a user