Project

General

Profile

Bug #7304

zfs filesystem/snapshot counts should be read-only

Added by Jerry Jelinek about 3 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
zfs - Zettabyte File System
Start date:
2016-08-15
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:

Description

These properties are settable, but in reality they are maintained internally and should be read-only.

History

#1

Updated by Jerry Jelinek about 3 years ago

Here is the proposed fix:

--- a/usr/src/common/zfs/zfs_prop.c
+++ b/usr/src/common/zfs/zfs_prop.c
@@ -405,10 +405,10 @@ zfs_prop_init(void)
            UINT64_MAX, PROP_DEFAULT, ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME,
            "<count> | none", "SSLIMIT");
        zprop_register_number(ZFS_PROP_FILESYSTEM_COUNT, "filesystem_count",
-           UINT64_MAX, PROP_DEFAULT, ZFS_TYPE_FILESYSTEM,
+           UINT64_MAX, PROP_READONLY, ZFS_TYPE_FILESYSTEM,
            "<count>", "FSCOUNT");
        zprop_register_number(ZFS_PROP_SNAPSHOT_COUNT, "snapshot_count",
-           UINT64_MAX, PROP_DEFAULT, ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME,
+           UINT64_MAX, PROP_READONLY, ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME,
            "<count>", "SSCOUNT");

        /* inherit number properties */

#2

Updated by Jerry Jelinek about 3 years ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 90
  • Tags deleted (needs-triage)
#3

Updated by Electric Monk about 3 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 90 to 100

git commit 007a6c1f69652d7e3f2d2012a9332221d430491b

commit  007a6c1f69652d7e3f2d2012a9332221d430491b
Author: Jerry Jelinek <jerry.jelinek@joyent.com>
Date:   2016-09-06T20:41:11.000Z

    7304 zfs filesystem/snapshot counts should be read-only
    Reviewed by: Garrett D'Amore <garrett@damore.org>
    Reviewed by: Matthew Ahrens <mahrens@delphix.com>
    Approved by: Dan McDonald <danmcd@omniti.com>

Also available in: Atom PDF