From 911c41af2d7642fd25b563315c8d9e79b2dd1511 Mon Sep 17 00:00:00 2001 From: George Melikov Date: Mon, 23 Jan 2017 21:17:35 +0300 Subject: OpenZFS 7304 - zfs filesystem/snapshot counts should be read-only Authored by: Jerry Jelinek Reviewed by: Garrett D'Amore Reviewed by: Matthew Ahrens Approved by: Dan McDonald Reviewed-by: Brian Behlendorf Ported-by: George Melikov OpenZFS-issue: https://www.illumos.org/issues/7304 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/007a6c1 Closes #5624 --- module/zcommon/zfs_prop.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'module/zcommon/zfs_prop.c') diff --git a/module/zcommon/zfs_prop.c b/module/zcommon/zfs_prop.c index 06e4854e4..82641b490 100644 --- a/module/zcommon/zfs_prop.c +++ b/module/zcommon/zfs_prop.c @@ -22,6 +22,7 @@ * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011, 2014 by Delphix. All rights reserved. * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. + * Copyright 2016, Joyent, Inc. */ /* Portions Copyright 2010 Robert Milkowski */ @@ -432,6 +433,12 @@ zfs_prop_init(void) PROP_READONLY, ZFS_TYPE_DATASET, "", "LUSED"); zprop_register_number(ZFS_PROP_LOGICALREFERENCED, "logicalreferenced", 0, PROP_READONLY, ZFS_TYPE_DATASET, "", "LREFER"); + zprop_register_number(ZFS_PROP_FILESYSTEM_COUNT, "filesystem_count", + UINT64_MAX, PROP_READONLY, ZFS_TYPE_FILESYSTEM, + "", "FSCOUNT"); + zprop_register_number(ZFS_PROP_SNAPSHOT_COUNT, "snapshot_count", + UINT64_MAX, PROP_READONLY, ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME, + "", "SSCOUNT"); /* default number properties */ 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", UINT64_MAX, PROP_DEFAULT, ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME, " | none", "SSLIMIT"); - zprop_register_number(ZFS_PROP_FILESYSTEM_COUNT, "filesystem_count", - UINT64_MAX, PROP_DEFAULT, ZFS_TYPE_FILESYSTEM, - "", "FSCOUNT"); - zprop_register_number(ZFS_PROP_SNAPSHOT_COUNT, "snapshot_count", - UINT64_MAX, PROP_DEFAULT, ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME, - "", "SSCOUNT"); /* inherit number properties */ zprop_register_number(ZFS_PROP_RECORDSIZE, "recordsize", -- cgit v1.2.3