Project

General

Profile

Bug #7604

if volblocksize property is the default, it displays as "-" rather than 8K

Added by Prakash Surya almost 3 years ago. Updated almost 3 years ago.

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

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

Description

If a zvol has the default setting for the "volblocksize" property, it is
8KB. However, it is displayed as "-" (not present), rather than "8K".

The problem was introduced by:

commit 25228e830e86924a41243343b1de9daf2d7dd43a
Author: Matthew Ahrens <>
Date: Thu Nov 17 14:37:24 2016 -0800
7571 non-present readonly numeric ZFS props do not have default value

which changed changed get_numeric_property() to indicate that readonly
default properties are not present. However, zfs_prop_readonly() returns
TRUE for both readonly and set-once properties (e.g. volblocksize).

Amusingly, that commit essentially reverted:

6900484 default volblocksize is no longer being reported correctly

from November 2009. However, that change was not correct either; the
correct solution is to only do this check for "truly readonly" (i.e. not
setonce) properties.

$ zfs list -t volume -o name,volblocksize
NAME VOLBLOCK
domain0/group-100/appdata_container-101/appdata_windows_timeflow-102/archive -
domain0/group-100/appdata_container-101/appdata_windows_timeflow-102/datafile -
domain0/group-100/appdata_container-101/appdata_windows_timeflow-102/external -
rpool/dump 128K
rpool/swap 4K
rpool/swap1

Related issues

Related to illumos gate - Bug #7571: non-present readonly numeric ZFS props do not have default valueClosed2016-11-11

Actions

History

#1

Updated by Robert Mustacchi almost 3 years ago

  • Related to Bug #7571: non-present readonly numeric ZFS props do not have default value added
#2

Updated by Electric Monk almost 3 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

git commit 4d86c0eab246bdfddc2dd52410ba808433bd6266

commit  4d86c0eab246bdfddc2dd52410ba808433bd6266
Author: Matthew Ahrens <mahrens@delphix.com>
Date:   2016-11-29T03:49:23.000Z

    7604 if volblocksize property is the default, it displays as "-" rather than 8K
    Reviewed by: Pavel Zakharov <pavel.zakharov@delphix.com>
    Reviewed by: Paul Dagnelie <pcd@delphix.com>
    Reviewed by: John Kennedy <john.kennedy@delphix.com>
    Reviewed by: George Wilson <george.wilson@delphix.com>
    Approved by: Robert Mustacchi <rm@joyent.com>

Also available in: Atom PDF