Flex non-pretty-printed properties and raw-/pretty-print remaining ones
Before: nabijaczleweli@tarta:~/store/code/zfs$ /sbin/zpool list -Td -o name,size,alloc,free,ckpoint,expandsz,guid,load_guid,frag,cap,dedup,health,altroot,guid,dedupditto,load_guid,maxblocksize,maxdnodesize 2>/dev/null Sun 20 Feb 03:57:44 CET 2022 NAME SIZE ALLOC FREE CKPOINT EXPANDSZ GUID LOAD_GUID FRAG CAP DEDUP HEALTH ALTROOT GUID DEDUPDITTO LOAD_GUID MAXBLOCKSIZE MAXDNODESIZE filling 25.5T 6.52T 18.9T - 64M 11512889483096932869 11656109927366648364 1% 25% 1.00x ONLINE - 11512889483096932869 0 11656109927366648364 1048576 16384 tarta-boot 240M 50.6M 189M - - 2372068846917849656 7752280792179633787 12% 21% 1.00x ONLINE - 2372068846917849656 0 7752280792179633787 1048576 512 tarta-zoot 55.5G 6.42G 49.1G - - 12971868889665384604 8622632123393589527 17% 11% 1.00x ONLINE - 12971868889665384604 0 8622632123393589527 1048576 16384 nabijaczleweli@tarta:~/store/code/zfs$ /sbin/zfs list -o name,guid,keyguid,ivsetguid,createtxg,objsetid,pbkdf2iters,refratio -r tarta-zoot NAME GUID KEYGUID IVSETGUID CREATETXG OBJSETID PBKDF2ITERS REFRATIO tarta-zoot 1110930838977259561 659P - 1 54 0 1.03x tarta-zoot/PAGEFILE.SYS 2202570496672997800 3.20E - 2163 1539 0 1.07x tarta-zoot/dupa 16941280502417785695 9.81E - 2274707 1322 1000000000000 1.00x tarta-zoot/etc 17029963068508333530 12.9E - 3663 1087 0 1.52x tarta-zoot/home 3508163802370032575 8.50E - 3664 294 0 1.00x tarta-zoot/home/misio 7283672744014848555 13.0E - 3665 302 0 2.28x tarta-zoot/home/nabijaczleweli 12286744508078616303 5.15E - 3666 200 0 2.05x tarta-zoot/home/nabijaczleweli/tftp 13551632689932817643 5.16E - 3667 1095 0 1.00x tarta-zoot/home/root 5203106193060067946 15.4E - 3668 698 0 2.86x tarta-zoot/home/shared-config 8866040021005142194 14.5E - 3670 2069 0 1.20x tarta-zoot/home/tymek 9472751824283011822 4.56E - 3671 1202 0 1.32x tarta-zoot/oldboot 10460192444135730377 13.8E - 2268398 1232 0 1.01x tarta-zoot/opt 9945621324983170410 5.84E - 3672 1210 0 1.00x tarta-zoot/opt/icecc 13178238931846132425 9.04E - 3673 1103 0 2.83x tarta-zoot/opt/swtpm 10172962421514870859 4.13E - 825669 145132 0 1.87x tarta-zoot/srv 217179989022738337 3.90E - 3674 2469 0 1.00x tarta-zoot/usr 12214213243060765090 15.0E - 3675 2477 0 2.58x tarta-zoot/usr/local 7542700368693813134 941P - 3676 2484 0 2.33x tarta-zoot/var 13414177124447929530 10.2E - 3677 2492 0 1.57x tarta-zoot/var/lib 6969944550407159241 5.28E - 3678 2499 0 2.34x tarta-zoot/var/tmp 6399468088048343912 1.34E - 3679 1218 0 3.95x After: nabijaczleweli@tarta:~/store/code/zfs$ cmd/zpool/zpool list -Td -o name,size,alloc,free,ckpoint,expandsz,guid,load_guid,frag,cap,dedup,health,altroot,guid,dedupditto,load_guid,maxblocksize,maxdnodesize 2>/dev/null Sun 20 Feb 03:57:42 CET 2022 NAME SIZE ALLOC FREE CKPOINT EXPANDSZ GUID LOAD_GUID FRAG CAP DEDUP HEALTH ALTROOT GUID DEDUPDITTO LOAD_GUID MAXBLOCKSIZE MAXDNODESIZE filling 25.5T 6.52T 18.9T - 64M 11512889483096932869 11656109927366648364 1% 25% 1.00x ONLINE - 11512889483096932869 0 11656109927366648364 1M 16K tarta-boot 240M 50.6M 189M - - 2372068846917849656 7752280792179633787 12% 21% 1.00x ONLINE - 2372068846917849656 0 7752280792179633787 1M 512 tarta-zoot 55.5G 6.42G 49.1G - - 12971868889665384604 8622632123393589527 17% 11% 1.00x ONLINE - 12971868889665384604 0 8622632123393589527 1M 16K nabijaczleweli@tarta:~/store/code/zfs$ cmd/zfs/zfs list -o name,guid,keyguid,ivsetguid,createtxg,objsetid,pbkdf2iters,refratio -r tarta-zoot NAME GUID KEYGUID IVSETGUID CREATETXG OBJSETID PBKDF2ITERS REFRATIO tarta-zoot 1110930838977259561 741529699813639505 - 1 54 0 1.03x tarta-zoot/PAGEFILE.SYS 2202570496672997800 3689529982640017884 - 2163 1539 0 1.07x tarta-zoot/dupa 16941280502417785695 11312442953423259518 - 2274707 1322 1000000000000 1.00x tarta-zoot/etc 17029963068508333530 14852574366795347233 - 3663 1087 0 1.52x tarta-zoot/home 3508163802370032575 9802810070759776956 - 3664 294 0 1.00x tarta-zoot/home/misio 7283672744014848555 14983161489316798151 - 3665 302 0 2.28x tarta-zoot/home/nabijaczleweli 12286744508078616303 5937870537299886218 - 3666 200 0 2.05x tarta-zoot/home/nabijaczleweli/tftp 13551632689932817643 5950522828900813054 - 3667 1095 0 1.00x tarta-zoot/home/root 5203106193060067946 17718025091255443518 - 3668 698 0 2.86x tarta-zoot/home/shared-config 8866040021005142194 16716354482778968577 - 3670 2069 0 1.20x tarta-zoot/home/tymek 9472751824283011822 5251854710505749954 - 3671 1202 0 1.32x tarta-zoot/oldboot 10460192444135730377 15894065034622168157 - 2268398 1232 0 1.01x tarta-zoot/opt 9945621324983170410 6737735639539098405 - 3672 1210 0 1.00x tarta-zoot/opt/icecc 13178238931846132425 10425145983015238428 - 3673 1103 0 2.83x tarta-zoot/opt/swtpm 10172962421514870859 4764783754852521469 - 825669 145132 0 1.87x tarta-zoot/srv 217179989022738337 4492810461439647259 - 3674 2469 0 1.00x tarta-zoot/usr 12214213243060765090 17306702395865262834 - 3675 2477 0 2.58x tarta-zoot/usr/local 7542700368693813134 1059954157997659784 - 3676 2484 0 2.33x tarta-zoot/var 13414177124447929530 11764397504176937123 - 3677 2492 0 1.57x tarta-zoot/var/lib 6969944550407159241 6084753728494937404 - 3678 2499 0 2.34x tarta-zoot/var/tmp 6399468088048343912 1548692824635344277 - 3679 1218 0 3.95x Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #13122 Closes #13125
This commit is contained in:
parent
a9a89755fa
commit
be8e1d81bf
|
@ -76,10 +76,11 @@ typedef struct {
|
|||
/* fs | vol | snap; or pool */
|
||||
const char *pd_values; /* string telling acceptable values */
|
||||
const char *pd_colname; /* column header for "zfs list" */
|
||||
boolean_t pd_rightalign; /* column alignment for "zfs list" */
|
||||
boolean_t pd_visible; /* do we list this property with the */
|
||||
boolean_t pd_rightalign: 1; /* column alignment for "zfs list" */
|
||||
boolean_t pd_visible: 1; /* do we list this property with the */
|
||||
/* "zfs get" help message */
|
||||
boolean_t pd_zfs_mod_supported; /* supported by running zfs module */
|
||||
boolean_t pd_zfs_mod_supported: 1; /* supported by running zfs module */
|
||||
boolean_t pd_always_flex: 1; /* never fixed-width */
|
||||
const zprop_index_t *pd_table; /* for index properties, a table */
|
||||
/* defining the possible values */
|
||||
size_t pd_table_size; /* number of entries in pd_table[] */
|
||||
|
@ -112,19 +113,20 @@ _ZFS_PROP_H zprop_desc_t *vdev_prop_get_table(void);
|
|||
*/
|
||||
_ZFS_PROP_H void zprop_register_impl(int, const char *, zprop_type_t, uint64_t,
|
||||
const char *, zprop_attr_t, int, const char *, const char *,
|
||||
boolean_t, boolean_t, const zprop_index_t *,
|
||||
boolean_t, boolean_t, boolean_t, const zprop_index_t *,
|
||||
const struct zfs_mod_supported_features *);
|
||||
_ZFS_PROP_H void zprop_register_string(int, const char *, const char *,
|
||||
zprop_attr_t attr, int, const char *, const char *,
|
||||
const struct zfs_mod_supported_features *);
|
||||
_ZFS_PROP_H void zprop_register_number(int, const char *, uint64_t,
|
||||
zprop_attr_t, int, const char *, const char *,
|
||||
zprop_attr_t, int, const char *, const char *, boolean_t,
|
||||
const struct zfs_mod_supported_features *);
|
||||
_ZFS_PROP_H void zprop_register_index(int, const char *, uint64_t, zprop_attr_t,
|
||||
int, const char *, const char *, const zprop_index_t *,
|
||||
const struct zfs_mod_supported_features *);
|
||||
_ZFS_PROP_H void zprop_register_hidden(int, const char *, zprop_type_t,
|
||||
zprop_attr_t, int, const char *, const struct zfs_mod_supported_features *);
|
||||
zprop_attr_t, int, const char *, boolean_t,
|
||||
const struct zfs_mod_supported_features *);
|
||||
|
||||
/*
|
||||
* Common routines for zfs and zpool property management
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
<dependency name='libm.so.6'/>
|
||||
<dependency name='libcrypto.so.1.1'/>
|
||||
<dependency name='libz.so.1'/>
|
||||
<dependency name='libdl.so.2'/>
|
||||
<dependency name='libpthread.so.0'/>
|
||||
<dependency name='libc.so.6'/>
|
||||
<dependency name='ld-linux-x86-64.so.2'/>
|
||||
|
@ -907,7 +908,7 @@
|
|||
</abi-instr>
|
||||
<abi-instr address-size='64' path='assert.c' language='LANG_C99'>
|
||||
<function-decl name='libspl_set_assert_ok' mangled-name='libspl_set_assert_ok' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='libspl_set_assert_ok'>
|
||||
<parameter type-id='f58c8277' name='val'/>
|
||||
<parameter type-id='c19b74c3' name='val'/>
|
||||
<return type-id='48b5725f'/>
|
||||
</function-decl>
|
||||
<function-decl name='libspl_assertf' mangled-name='libspl_assertf' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='libspl_assertf'>
|
||||
|
@ -970,6 +971,11 @@
|
|||
<parameter type-id='64698d33' name='target'/>
|
||||
<return type-id='48b5725f'/>
|
||||
</function-decl>
|
||||
<function-decl name='atomic_add_ptr' mangled-name='atomic_add_ptr' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='atomic_add_ptr'>
|
||||
<parameter type-id='fe09dd29' name='target'/>
|
||||
<parameter type-id='79a0948f' name='bits'/>
|
||||
<return type-id='48b5725f'/>
|
||||
</function-decl>
|
||||
<function-decl name='atomic_add_8' mangled-name='atomic_add_8' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='atomic_add_8'>
|
||||
<parameter type-id='aa323ea4' name='target'/>
|
||||
<parameter type-id='ee31ee44' name='bits'/>
|
||||
|
@ -990,7 +996,7 @@
|
|||
<parameter type-id='bd54fe1a' name='bits'/>
|
||||
<return type-id='48b5725f'/>
|
||||
</function-decl>
|
||||
<function-decl name='atomic_add_ptr' mangled-name='atomic_add_ptr' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='atomic_add_ptr'>
|
||||
<function-decl name='atomic_sub_ptr' mangled-name='atomic_sub_ptr' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='atomic_sub_ptr'>
|
||||
<parameter type-id='fe09dd29' name='target'/>
|
||||
<parameter type-id='79a0948f' name='bits'/>
|
||||
<return type-id='48b5725f'/>
|
||||
|
@ -1015,11 +1021,6 @@
|
|||
<parameter type-id='bd54fe1a' name='bits'/>
|
||||
<return type-id='48b5725f'/>
|
||||
</function-decl>
|
||||
<function-decl name='atomic_sub_ptr' mangled-name='atomic_sub_ptr' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='atomic_sub_ptr'>
|
||||
<parameter type-id='fe09dd29' name='target'/>
|
||||
<parameter type-id='79a0948f' name='bits'/>
|
||||
<return type-id='48b5725f'/>
|
||||
</function-decl>
|
||||
<function-decl name='atomic_or_8' mangled-name='atomic_or_8' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='atomic_or_8'>
|
||||
<parameter type-id='aa323ea4' name='target'/>
|
||||
<parameter type-id='b96825af' name='bits'/>
|
||||
|
@ -1092,6 +1093,11 @@
|
|||
<parameter type-id='64698d33' name='target'/>
|
||||
<return type-id='ee1f298e'/>
|
||||
</function-decl>
|
||||
<function-decl name='atomic_add_ptr_nv' mangled-name='atomic_add_ptr_nv' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='atomic_add_ptr_nv'>
|
||||
<parameter type-id='fe09dd29' name='target'/>
|
||||
<parameter type-id='79a0948f' name='bits'/>
|
||||
<return type-id='eaa32e2f'/>
|
||||
</function-decl>
|
||||
<function-decl name='atomic_add_8_nv' mangled-name='atomic_add_8_nv' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='atomic_add_8_nv'>
|
||||
<parameter type-id='aa323ea4' name='target'/>
|
||||
<parameter type-id='ee31ee44' name='bits'/>
|
||||
|
@ -1112,7 +1118,7 @@
|
|||
<parameter type-id='bd54fe1a' name='bits'/>
|
||||
<return type-id='ee1f298e'/>
|
||||
</function-decl>
|
||||
<function-decl name='atomic_add_ptr_nv' mangled-name='atomic_add_ptr_nv' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='atomic_add_ptr_nv'>
|
||||
<function-decl name='atomic_sub_ptr_nv' mangled-name='atomic_sub_ptr_nv' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='atomic_sub_ptr_nv'>
|
||||
<parameter type-id='fe09dd29' name='target'/>
|
||||
<parameter type-id='79a0948f' name='bits'/>
|
||||
<return type-id='eaa32e2f'/>
|
||||
|
@ -1137,11 +1143,6 @@
|
|||
<parameter type-id='bd54fe1a' name='bits'/>
|
||||
<return type-id='ee1f298e'/>
|
||||
</function-decl>
|
||||
<function-decl name='atomic_sub_ptr_nv' mangled-name='atomic_sub_ptr_nv' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='atomic_sub_ptr_nv'>
|
||||
<parameter type-id='fe09dd29' name='target'/>
|
||||
<parameter type-id='79a0948f' name='bits'/>
|
||||
<return type-id='eaa32e2f'/>
|
||||
</function-decl>
|
||||
<function-decl name='atomic_or_8_nv' mangled-name='atomic_or_8_nv' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='atomic_or_8_nv'>
|
||||
<parameter type-id='aa323ea4' name='target'/>
|
||||
<parameter type-id='b96825af' name='bits'/>
|
||||
|
@ -1182,6 +1183,12 @@
|
|||
<parameter type-id='ee1f298e' name='bits'/>
|
||||
<return type-id='ee1f298e'/>
|
||||
</function-decl>
|
||||
<function-decl name='atomic_cas_ptr' mangled-name='atomic_cas_ptr' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='atomic_cas_ptr'>
|
||||
<parameter type-id='fe09dd29' name='target'/>
|
||||
<parameter type-id='eaa32e2f' name='exp'/>
|
||||
<parameter type-id='eaa32e2f' name='des'/>
|
||||
<return type-id='eaa32e2f'/>
|
||||
</function-decl>
|
||||
<function-decl name='atomic_cas_8' mangled-name='atomic_cas_8' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='atomic_cas_8'>
|
||||
<parameter type-id='aa323ea4' name='target'/>
|
||||
<parameter type-id='b96825af' name='exp'/>
|
||||
|
@ -1206,12 +1213,6 @@
|
|||
<parameter type-id='ee1f298e' name='des'/>
|
||||
<return type-id='ee1f298e'/>
|
||||
</function-decl>
|
||||
<function-decl name='atomic_cas_ptr' mangled-name='atomic_cas_ptr' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='atomic_cas_ptr'>
|
||||
<parameter type-id='fe09dd29' name='target'/>
|
||||
<parameter type-id='eaa32e2f' name='exp'/>
|
||||
<parameter type-id='eaa32e2f' name='des'/>
|
||||
<return type-id='eaa32e2f'/>
|
||||
</function-decl>
|
||||
<function-decl name='atomic_swap_8' mangled-name='atomic_swap_8' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='atomic_swap_8'>
|
||||
<parameter type-id='aa323ea4' name='target'/>
|
||||
<parameter type-id='b96825af' name='bits'/>
|
||||
|
@ -1854,8 +1855,8 @@
|
|||
</function-decl>
|
||||
</abi-instr>
|
||||
<abi-instr address-size='64' path='../../module/zcommon/zfeature_common.c' language='LANG_C99'>
|
||||
<array-type-def dimensions='1' type-id='83f29ca2' size-in-bits='15680' id='d96379d0'>
|
||||
<subrange length='35' type-id='7359adad' id='6a6a7e00'/>
|
||||
<array-type-def dimensions='1' type-id='83f29ca2' size-in-bits='15680' id='9d60dcc5'>
|
||||
<subrange length='35' type-id='7359adad' id='6e6845b5'/>
|
||||
</array-type-def>
|
||||
<enum-decl name='spa_feature' id='33ecb627'>
|
||||
<underlying-type type-id='9cac1fee'/>
|
||||
|
@ -1953,7 +1954,7 @@
|
|||
<qualified-type-def type-id='3eee3342' const='yes' id='0c1d5bbb'/>
|
||||
<pointer-type-def type-id='0c1d5bbb' size-in-bits='64' id='a3372543'/>
|
||||
<pointer-type-def type-id='d6618c78' size-in-bits='64' id='a8425263'/>
|
||||
<var-decl name='spa_feature_table' type-id='d96379d0' mangled-name='spa_feature_table' visibility='default' elf-symbol-id='spa_feature_table'/>
|
||||
<var-decl name='spa_feature_table' type-id='9d60dcc5' mangled-name='spa_feature_table' visibility='default' elf-symbol-id='spa_feature_table'/>
|
||||
<var-decl name='zfeature_checks_disable' type-id='c19b74c3' mangled-name='zfeature_checks_disable' visibility='default' elf-symbol-id='zfeature_checks_disable'/>
|
||||
<function-decl name='zfeature_is_valid_guid' mangled-name='zfeature_is_valid_guid' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='zfeature_is_valid_guid'>
|
||||
<parameter type-id='80f4b756' name='name'/>
|
||||
|
@ -2488,7 +2489,7 @@
|
|||
</data-member>
|
||||
</class-decl>
|
||||
<typedef-decl name='zprop_index_t' type-id='87957af9' id='64636ce3'/>
|
||||
<class-decl name='zprop_desc_t' size-in-bits='704' is-struct='yes' naming-typedef-id='ffa52b96' visibility='default' id='bbff5e4b'>
|
||||
<class-decl name='zprop_desc_t' size-in-bits='640' is-struct='yes' naming-typedef-id='ffa52b96' visibility='default' id='bbff5e4b'>
|
||||
<data-member access='public' layout-offset-in-bits='0'>
|
||||
<var-decl name='pd_name' type-id='80f4b756' visibility='default'/>
|
||||
</data-member>
|
||||
|
@ -2519,16 +2520,19 @@
|
|||
<data-member access='public' layout-offset-in-bits='448'>
|
||||
<var-decl name='pd_rightalign' type-id='c19b74c3' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='480'>
|
||||
<data-member access='public' layout-offset-in-bits='449'>
|
||||
<var-decl name='pd_visible' type-id='c19b74c3' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='512'>
|
||||
<data-member access='public' layout-offset-in-bits='450'>
|
||||
<var-decl name='pd_zfs_mod_supported' type-id='c19b74c3' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='576'>
|
||||
<data-member access='public' layout-offset-in-bits='451'>
|
||||
<var-decl name='pd_always_flex' type-id='c19b74c3' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='512'>
|
||||
<var-decl name='pd_table' type-id='c8bc397b' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='640'>
|
||||
<data-member access='public' layout-offset-in-bits='576'>
|
||||
<var-decl name='pd_table_size' type-id='b59d7dce' visibility='default'/>
|
||||
</data-member>
|
||||
</class-decl>
|
||||
|
@ -2798,6 +2802,7 @@
|
|||
<parameter type-id='80f4b756' name='colname'/>
|
||||
<parameter type-id='c19b74c3' name='rightalign'/>
|
||||
<parameter type-id='c19b74c3' name='visible'/>
|
||||
<parameter type-id='c19b74c3' name='flex'/>
|
||||
<parameter type-id='c8bc397b' name='idx_tbl'/>
|
||||
<parameter type-id='a3372543' name='sfeatures'/>
|
||||
<return type-id='48b5725f'/>
|
||||
|
@ -2821,6 +2826,7 @@
|
|||
<parameter type-id='95e97e5e' name='objset_types'/>
|
||||
<parameter type-id='80f4b756' name='values'/>
|
||||
<parameter type-id='80f4b756' name='colname'/>
|
||||
<parameter type-id='c19b74c3' name='flex'/>
|
||||
<parameter type-id='a3372543' name='sfeatures'/>
|
||||
<return type-id='48b5725f'/>
|
||||
</function-decl>
|
||||
|
@ -2843,6 +2849,7 @@
|
|||
<parameter type-id='999701cc' name='attr'/>
|
||||
<parameter type-id='95e97e5e' name='objset_types'/>
|
||||
<parameter type-id='80f4b756' name='colname'/>
|
||||
<parameter type-id='c19b74c3' name='flex'/>
|
||||
<parameter type-id='a3372543' name='sfeatures'/>
|
||||
<return type-id='48b5725f'/>
|
||||
</function-decl>
|
||||
|
@ -2991,6 +2998,7 @@
|
|||
<typedef-decl name='dmu_objset_stats_t' type-id='098f0221' id='b2c14f17'/>
|
||||
<enum-decl name='zfs_type_t' naming-typedef-id='2e45de5d' id='5d8f7321'>
|
||||
<underlying-type type-id='9cac1fee'/>
|
||||
<enumerator name='ZFS_TYPE_INVALID' value='0'/>
|
||||
<enumerator name='ZFS_TYPE_FILESYSTEM' value='1'/>
|
||||
<enumerator name='ZFS_TYPE_SNAPSHOT' value='2'/>
|
||||
<enumerator name='ZFS_TYPE_VOLUME' value='4'/>
|
||||
|
@ -3360,13 +3368,13 @@
|
|||
</function-decl>
|
||||
<function-decl name='zfs_crypto_attempt_load_keys' mangled-name='zfs_crypto_attempt_load_keys' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='zfs_crypto_attempt_load_keys'>
|
||||
<parameter type-id='b0382bb3' name='hdl'/>
|
||||
<parameter type-id='26a90f95' name='fsname'/>
|
||||
<parameter type-id='80f4b756' name='fsname'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='zfs_crypto_load_key' mangled-name='zfs_crypto_load_key' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='zfs_crypto_load_key'>
|
||||
<parameter type-id='9200a744' name='zhp'/>
|
||||
<parameter type-id='c19b74c3' name='noop'/>
|
||||
<parameter type-id='26a90f95' name='alt_keylocation'/>
|
||||
<parameter type-id='80f4b756' name='alt_keylocation'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='zfs_crypto_unload_key' mangled-name='zfs_crypto_unload_key' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='zfs_crypto_unload_key'>
|
||||
|
@ -4081,9 +4089,6 @@
|
|||
</function-decl>
|
||||
</abi-instr>
|
||||
<abi-instr address-size='64' path='libzfs_mount.c' language='LANG_C99'>
|
||||
<array-type-def dimensions='1' type-id='f1bd64e2' size-in-bits='384' id='b2c36c9f'>
|
||||
<subrange length='2' type-id='7359adad' id='52efc4ef'/>
|
||||
</array-type-def>
|
||||
<class-decl name='get_all_cb' size-in-bits='192' is-struct='yes' visibility='default' id='803dac95'>
|
||||
<data-member access='public' layout-offset-in-bits='0'>
|
||||
<var-decl name='cb_handles' type-id='4507922a' visibility='default'/>
|
||||
|
@ -4096,24 +4101,8 @@
|
|||
</data-member>
|
||||
</class-decl>
|
||||
<typedef-decl name='get_all_cb_t' type-id='803dac95' id='9b293607'/>
|
||||
<class-decl name='proto_table_t' size-in-bits='192' is-struct='yes' naming-typedef-id='f1bd64e2' visibility='default' id='f4c8e1ed'>
|
||||
<data-member access='public' layout-offset-in-bits='0'>
|
||||
<var-decl name='p_prop' type-id='58603c44' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='64'>
|
||||
<var-decl name='p_name' type-id='26a90f95' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='128'>
|
||||
<var-decl name='p_share_err' type-id='95e97e5e' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='160'>
|
||||
<var-decl name='p_unshare_err' type-id='95e97e5e' visibility='default'/>
|
||||
</data-member>
|
||||
</class-decl>
|
||||
<typedef-decl name='proto_table_t' type-id='f4c8e1ed' id='f1bd64e2'/>
|
||||
<pointer-type-def type-id='9b293607' size-in-bits='64' id='77bf1784'/>
|
||||
<pointer-type-def type-id='9200a744' size-in-bits='64' id='4507922a'/>
|
||||
<var-decl name='proto_table' type-id='b2c36c9f' visibility='default'/>
|
||||
<function-decl name='is_mounted' mangled-name='is_mounted' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='is_mounted'>
|
||||
<parameter type-id='b0382bb3' name='zfs_hdl'/>
|
||||
<parameter type-id='80f4b756' name='special'/>
|
||||
|
|
|
@ -2903,6 +2903,8 @@ zfs_prop_get(zfs_handle_t *zhp, zfs_prop_t prop, char *propbuf, size_t proplen,
|
|||
break;
|
||||
|
||||
case ZFS_PROP_GUID:
|
||||
case ZFS_PROP_KEY_GUID:
|
||||
case ZFS_PROP_IVSET_GUID:
|
||||
case ZFS_PROP_CREATETXG:
|
||||
case ZFS_PROP_OBJSETID:
|
||||
case ZFS_PROP_PBKDF2_ITERS:
|
||||
|
|
|
@ -347,6 +347,8 @@ zpool_get_prop(zpool_handle_t *zhp, zpool_prop_t prop, char *buf,
|
|||
case ZPOOL_PROP_FREEING:
|
||||
case ZPOOL_PROP_LEAKED:
|
||||
case ZPOOL_PROP_ASHIFT:
|
||||
case ZPOOL_PROP_MAXBLOCKSIZE:
|
||||
case ZPOOL_PROP_MAXDNODESIZE:
|
||||
if (literal)
|
||||
(void) snprintf(buf, len, "%llu",
|
||||
(u_longlong_t)intval);
|
||||
|
@ -5160,6 +5162,7 @@ zpool_get_vdev_prop_value(nvlist_t *nvprop, vdev_prop_t prop, char *prop_name,
|
|||
case VDEV_PROP_ASIZE:
|
||||
case VDEV_PROP_PSIZE:
|
||||
case VDEV_PROP_SIZE:
|
||||
case VDEV_PROP_BOOTSIZE:
|
||||
case VDEV_PROP_ALLOCATED:
|
||||
case VDEV_PROP_FREE:
|
||||
case VDEV_PROP_READ_ERRORS:
|
||||
|
|
|
@ -589,125 +589,132 @@ zfs_prop_init(void)
|
|||
|
||||
/* readonly number properties */
|
||||
zprop_register_number(ZFS_PROP_USED, "used", 0, PROP_READONLY,
|
||||
ZFS_TYPE_DATASET, "<size>", "USED", sfeatures);
|
||||
ZFS_TYPE_DATASET, "<size>", "USED", B_FALSE, sfeatures);
|
||||
zprop_register_number(ZFS_PROP_AVAILABLE, "available", 0, PROP_READONLY,
|
||||
ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME, "<size>", "AVAIL",
|
||||
sfeatures);
|
||||
B_FALSE, sfeatures);
|
||||
zprop_register_number(ZFS_PROP_REFERENCED, "referenced", 0,
|
||||
PROP_READONLY, ZFS_TYPE_DATASET | ZFS_TYPE_BOOKMARK, "<size>",
|
||||
"REFER", sfeatures);
|
||||
"REFER", B_FALSE, sfeatures);
|
||||
zprop_register_number(ZFS_PROP_COMPRESSRATIO, "compressratio", 0,
|
||||
PROP_READONLY, ZFS_TYPE_DATASET | ZFS_TYPE_BOOKMARK,
|
||||
"<1.00x or higher if compressed>", "RATIO", sfeatures);
|
||||
"<1.00x or higher if compressed>", "RATIO", B_FALSE, sfeatures);
|
||||
zprop_register_number(ZFS_PROP_REFRATIO, "refcompressratio", 0,
|
||||
PROP_READONLY, ZFS_TYPE_DATASET,
|
||||
"<1.00x or higher if compressed>", "REFRATIO", sfeatures);
|
||||
"<1.00x or higher if compressed>", "REFRATIO", B_FALSE, sfeatures);
|
||||
zprop_register_number(ZFS_PROP_VOLBLOCKSIZE, "volblocksize",
|
||||
ZVOL_DEFAULT_BLOCKSIZE, PROP_ONETIME,
|
||||
ZFS_TYPE_VOLUME, "512 to 128k, power of 2", "VOLBLOCK", sfeatures);
|
||||
ZFS_TYPE_VOLUME, "512 to 128k, power of 2", "VOLBLOCK", B_FALSE,
|
||||
sfeatures);
|
||||
zprop_register_number(ZFS_PROP_USEDSNAP, "usedbysnapshots", 0,
|
||||
PROP_READONLY, ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME, "<size>",
|
||||
"USEDSNAP", sfeatures);
|
||||
"USEDSNAP", B_FALSE, sfeatures);
|
||||
zprop_register_number(ZFS_PROP_USEDDS, "usedbydataset", 0,
|
||||
PROP_READONLY, ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME, "<size>",
|
||||
"USEDDS", sfeatures);
|
||||
"USEDDS", B_FALSE, sfeatures);
|
||||
zprop_register_number(ZFS_PROP_USEDCHILD, "usedbychildren", 0,
|
||||
PROP_READONLY, ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME, "<size>",
|
||||
"USEDCHILD", sfeatures);
|
||||
"USEDCHILD", B_FALSE, sfeatures);
|
||||
zprop_register_number(ZFS_PROP_USEDREFRESERV, "usedbyrefreservation", 0,
|
||||
PROP_READONLY,
|
||||
ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME, "<size>", "USEDREFRESERV",
|
||||
sfeatures);
|
||||
B_FALSE, sfeatures);
|
||||
zprop_register_number(ZFS_PROP_USERREFS, "userrefs", 0, PROP_READONLY,
|
||||
ZFS_TYPE_SNAPSHOT, "<count>", "USERREFS", sfeatures);
|
||||
ZFS_TYPE_SNAPSHOT, "<count>", "USERREFS", B_FALSE, sfeatures);
|
||||
zprop_register_number(ZFS_PROP_WRITTEN, "written", 0, PROP_READONLY,
|
||||
ZFS_TYPE_DATASET, "<size>", "WRITTEN", sfeatures);
|
||||
ZFS_TYPE_DATASET, "<size>", "WRITTEN", B_FALSE, sfeatures);
|
||||
zprop_register_number(ZFS_PROP_LOGICALUSED, "logicalused", 0,
|
||||
PROP_READONLY, ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME, "<size>",
|
||||
"LUSED", sfeatures);
|
||||
"LUSED", B_FALSE, sfeatures);
|
||||
zprop_register_number(ZFS_PROP_LOGICALREFERENCED, "logicalreferenced",
|
||||
0, PROP_READONLY, ZFS_TYPE_DATASET | ZFS_TYPE_BOOKMARK, "<size>",
|
||||
"LREFER", sfeatures);
|
||||
"LREFER", B_FALSE, sfeatures);
|
||||
zprop_register_number(ZFS_PROP_FILESYSTEM_COUNT, "filesystem_count",
|
||||
UINT64_MAX, PROP_READONLY, ZFS_TYPE_FILESYSTEM,
|
||||
"<count>", "FSCOUNT", sfeatures);
|
||||
"<count>", "FSCOUNT", B_FALSE, sfeatures);
|
||||
zprop_register_number(ZFS_PROP_SNAPSHOT_COUNT, "snapshot_count",
|
||||
UINT64_MAX, PROP_READONLY, ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME,
|
||||
"<count>", "SSCOUNT", sfeatures);
|
||||
"<count>", "SSCOUNT", B_FALSE, sfeatures);
|
||||
zprop_register_number(ZFS_PROP_GUID, "guid", 0, PROP_READONLY,
|
||||
ZFS_TYPE_DATASET | ZFS_TYPE_BOOKMARK, "<uint64>", "GUID",
|
||||
sfeatures);
|
||||
B_TRUE, sfeatures);
|
||||
zprop_register_number(ZFS_PROP_CREATETXG, "createtxg", 0, PROP_READONLY,
|
||||
ZFS_TYPE_DATASET | ZFS_TYPE_BOOKMARK, "<uint64>", "CREATETXG",
|
||||
sfeatures);
|
||||
B_TRUE, sfeatures);
|
||||
zprop_register_number(ZFS_PROP_PBKDF2_ITERS, "pbkdf2iters",
|
||||
0, PROP_ONETIME_DEFAULT, ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME,
|
||||
"<iters>", "PBKDF2ITERS", sfeatures);
|
||||
"<iters>", "PBKDF2ITERS", B_TRUE, sfeatures);
|
||||
zprop_register_number(ZFS_PROP_OBJSETID, "objsetid", 0,
|
||||
PROP_READONLY, ZFS_TYPE_DATASET, "<uint64>", "OBJSETID", sfeatures);
|
||||
PROP_READONLY, ZFS_TYPE_DATASET, "<uint64>", "OBJSETID", B_TRUE,
|
||||
sfeatures);
|
||||
|
||||
/* default number properties */
|
||||
zprop_register_number(ZFS_PROP_QUOTA, "quota", 0, PROP_DEFAULT,
|
||||
ZFS_TYPE_FILESYSTEM, "<size> | none", "QUOTA", sfeatures);
|
||||
ZFS_TYPE_FILESYSTEM, "<size> | none", "QUOTA", B_FALSE, sfeatures);
|
||||
zprop_register_number(ZFS_PROP_RESERVATION, "reservation", 0,
|
||||
PROP_DEFAULT, ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME,
|
||||
"<size> | none", "RESERV", sfeatures);
|
||||
"<size> | none", "RESERV", B_FALSE, sfeatures);
|
||||
zprop_register_number(ZFS_PROP_VOLSIZE, "volsize", 0, PROP_DEFAULT,
|
||||
ZFS_TYPE_SNAPSHOT | ZFS_TYPE_VOLUME, "<size>", "VOLSIZE",
|
||||
sfeatures);
|
||||
B_FALSE, sfeatures);
|
||||
zprop_register_number(ZFS_PROP_REFQUOTA, "refquota", 0, PROP_DEFAULT,
|
||||
ZFS_TYPE_FILESYSTEM, "<size> | none", "REFQUOTA", sfeatures);
|
||||
ZFS_TYPE_FILESYSTEM, "<size> | none", "REFQUOTA", B_FALSE,
|
||||
sfeatures);
|
||||
zprop_register_number(ZFS_PROP_REFRESERVATION, "refreservation", 0,
|
||||
PROP_DEFAULT, ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME,
|
||||
"<size> | none", "REFRESERV", sfeatures);
|
||||
"<size> | none", "REFRESERV", B_FALSE, sfeatures);
|
||||
zprop_register_number(ZFS_PROP_FILESYSTEM_LIMIT, "filesystem_limit",
|
||||
UINT64_MAX, PROP_DEFAULT, ZFS_TYPE_FILESYSTEM,
|
||||
"<count> | none", "FSLIMIT", sfeatures);
|
||||
"<count> | none", "FSLIMIT", B_FALSE, sfeatures);
|
||||
zprop_register_number(ZFS_PROP_SNAPSHOT_LIMIT, "snapshot_limit",
|
||||
UINT64_MAX, PROP_DEFAULT, ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME,
|
||||
"<count> | none", "SSLIMIT", sfeatures);
|
||||
"<count> | none", "SSLIMIT", B_FALSE, sfeatures);
|
||||
|
||||
/* inherit number properties */
|
||||
zprop_register_number(ZFS_PROP_RECORDSIZE, "recordsize",
|
||||
SPA_OLD_MAXBLOCKSIZE, PROP_INHERIT,
|
||||
ZFS_TYPE_FILESYSTEM, "512 to 1M, power of 2", "RECSIZE", sfeatures);
|
||||
ZFS_TYPE_FILESYSTEM, "512 to 1M, power of 2", "RECSIZE", B_FALSE,
|
||||
sfeatures);
|
||||
zprop_register_number(ZFS_PROP_SPECIAL_SMALL_BLOCKS,
|
||||
"special_small_blocks", 0, PROP_INHERIT, ZFS_TYPE_FILESYSTEM,
|
||||
"zero or 512 to 1M, power of 2", "SPECIAL_SMALL_BLOCKS", sfeatures);
|
||||
"zero or 512 to 1M, power of 2", "SPECIAL_SMALL_BLOCKS", B_FALSE,
|
||||
sfeatures);
|
||||
|
||||
/* hidden properties */
|
||||
zprop_register_hidden(ZFS_PROP_NUMCLONES, "numclones", PROP_TYPE_NUMBER,
|
||||
PROP_READONLY, ZFS_TYPE_SNAPSHOT, "NUMCLONES", sfeatures);
|
||||
PROP_READONLY, ZFS_TYPE_SNAPSHOT, "NUMCLONES", B_FALSE, sfeatures);
|
||||
zprop_register_hidden(ZFS_PROP_NAME, "name", PROP_TYPE_STRING,
|
||||
PROP_READONLY, ZFS_TYPE_DATASET | ZFS_TYPE_BOOKMARK, "NAME",
|
||||
sfeatures);
|
||||
B_TRUE, sfeatures);
|
||||
zprop_register_hidden(ZFS_PROP_ISCSIOPTIONS, "iscsioptions",
|
||||
PROP_TYPE_STRING, PROP_INHERIT, ZFS_TYPE_VOLUME, "ISCSIOPTIONS",
|
||||
sfeatures);
|
||||
B_TRUE, sfeatures);
|
||||
zprop_register_hidden(ZFS_PROP_STMF_SHAREINFO, "stmf_sbd_lu",
|
||||
PROP_TYPE_STRING, PROP_INHERIT, ZFS_TYPE_VOLUME,
|
||||
"STMF_SBD_LU", sfeatures);
|
||||
"STMF_SBD_LU", B_TRUE, sfeatures);
|
||||
zprop_register_hidden(ZFS_PROP_USERACCOUNTING, "useraccounting",
|
||||
PROP_TYPE_NUMBER, PROP_READONLY, ZFS_TYPE_DATASET,
|
||||
"USERACCOUNTING", sfeatures);
|
||||
"USERACCOUNTING", B_FALSE, sfeatures);
|
||||
zprop_register_hidden(ZFS_PROP_UNIQUE, "unique", PROP_TYPE_NUMBER,
|
||||
PROP_READONLY, ZFS_TYPE_DATASET, "UNIQUE", sfeatures);
|
||||
PROP_READONLY, ZFS_TYPE_DATASET, "UNIQUE", B_FALSE, sfeatures);
|
||||
zprop_register_hidden(ZFS_PROP_INCONSISTENT, "inconsistent",
|
||||
PROP_TYPE_NUMBER, PROP_READONLY, ZFS_TYPE_DATASET, "INCONSISTENT",
|
||||
sfeatures);
|
||||
B_FALSE, sfeatures);
|
||||
zprop_register_hidden(ZFS_PROP_IVSET_GUID, "ivsetguid",
|
||||
PROP_TYPE_NUMBER, PROP_READONLY,
|
||||
ZFS_TYPE_DATASET | ZFS_TYPE_BOOKMARK, "IVSETGUID", sfeatures);
|
||||
ZFS_TYPE_DATASET | ZFS_TYPE_BOOKMARK, "IVSETGUID", B_TRUE,
|
||||
sfeatures);
|
||||
zprop_register_hidden(ZFS_PROP_PREV_SNAP, "prevsnap", PROP_TYPE_STRING,
|
||||
PROP_READONLY, ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME, "PREVSNAP",
|
||||
sfeatures);
|
||||
B_TRUE, sfeatures);
|
||||
zprop_register_hidden(ZFS_PROP_PBKDF2_SALT, "pbkdf2salt",
|
||||
PROP_TYPE_NUMBER, PROP_ONETIME_DEFAULT,
|
||||
ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME, "PBKDF2SALT", sfeatures);
|
||||
ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME, "PBKDF2SALT", B_FALSE,
|
||||
sfeatures);
|
||||
zprop_register_hidden(ZFS_PROP_KEY_GUID, "keyguid", PROP_TYPE_NUMBER,
|
||||
PROP_READONLY, ZFS_TYPE_DATASET, "KEYGUID", sfeatures);
|
||||
PROP_READONLY, ZFS_TYPE_DATASET, "KEYGUID", B_TRUE, sfeatures);
|
||||
zprop_register_hidden(ZFS_PROP_REDACTED, "redacted", PROP_TYPE_NUMBER,
|
||||
PROP_READONLY, ZFS_TYPE_DATASET, "REDACTED", sfeatures);
|
||||
PROP_READONLY, ZFS_TYPE_DATASET, "REDACTED", B_FALSE, sfeatures);
|
||||
|
||||
/*
|
||||
* Properties that are obsolete and not used. These are retained so
|
||||
|
@ -715,12 +722,13 @@ zfs_prop_init(void)
|
|||
* have NULL pointers in the zfs_prop_table[].
|
||||
*/
|
||||
zprop_register_hidden(ZFS_PROP_REMAPTXG, "remaptxg", PROP_TYPE_NUMBER,
|
||||
PROP_READONLY, ZFS_TYPE_DATASET, "REMAPTXG", sfeatures);
|
||||
PROP_READONLY, ZFS_TYPE_DATASET, "REMAPTXG", B_FALSE, sfeatures);
|
||||
|
||||
/* oddball properties */
|
||||
/* 'creation' is a number but displayed as human-readable => flex */
|
||||
zprop_register_impl(ZFS_PROP_CREATION, "creation", PROP_TYPE_NUMBER, 0,
|
||||
NULL, PROP_READONLY, ZFS_TYPE_DATASET | ZFS_TYPE_BOOKMARK,
|
||||
"<date>", "CREATION", B_FALSE, B_TRUE, NULL, sfeatures);
|
||||
"<date>", "CREATION", B_FALSE, B_TRUE, B_TRUE, NULL, sfeatures);
|
||||
|
||||
zfs_mod_list_supported_free(sfeatures);
|
||||
}
|
||||
|
|
|
@ -85,39 +85,45 @@ zpool_prop_init(void)
|
|||
|
||||
/* readonly number properties */
|
||||
zprop_register_number(ZPOOL_PROP_SIZE, "size", 0, PROP_READONLY,
|
||||
ZFS_TYPE_POOL, "<size>", "SIZE", sfeatures);
|
||||
ZFS_TYPE_POOL, "<size>", "SIZE", B_FALSE, sfeatures);
|
||||
zprop_register_number(ZPOOL_PROP_FREE, "free", 0, PROP_READONLY,
|
||||
ZFS_TYPE_POOL, "<size>", "FREE", sfeatures);
|
||||
ZFS_TYPE_POOL, "<size>", "FREE", B_FALSE, sfeatures);
|
||||
zprop_register_number(ZPOOL_PROP_FREEING, "freeing", 0, PROP_READONLY,
|
||||
ZFS_TYPE_POOL, "<size>", "FREEING", sfeatures);
|
||||
ZFS_TYPE_POOL, "<size>", "FREEING", B_FALSE, sfeatures);
|
||||
zprop_register_number(ZPOOL_PROP_CHECKPOINT, "checkpoint", 0,
|
||||
PROP_READONLY, ZFS_TYPE_POOL, "<size>", "CKPOINT", sfeatures);
|
||||
PROP_READONLY, ZFS_TYPE_POOL, "<size>", "CKPOINT", B_FALSE,
|
||||
sfeatures);
|
||||
zprop_register_number(ZPOOL_PROP_LEAKED, "leaked", 0, PROP_READONLY,
|
||||
ZFS_TYPE_POOL, "<size>", "LEAKED", sfeatures);
|
||||
ZFS_TYPE_POOL, "<size>", "LEAKED", B_FALSE, sfeatures);
|
||||
zprop_register_number(ZPOOL_PROP_ALLOCATED, "allocated", 0,
|
||||
PROP_READONLY, ZFS_TYPE_POOL, "<size>", "ALLOC", sfeatures);
|
||||
PROP_READONLY, ZFS_TYPE_POOL, "<size>", "ALLOC", B_FALSE,
|
||||
sfeatures);
|
||||
zprop_register_number(ZPOOL_PROP_EXPANDSZ, "expandsize", 0,
|
||||
PROP_READONLY, ZFS_TYPE_POOL, "<size>", "EXPANDSZ", sfeatures);
|
||||
PROP_READONLY, ZFS_TYPE_POOL, "<size>", "EXPANDSZ", B_FALSE,
|
||||
sfeatures);
|
||||
zprop_register_number(ZPOOL_PROP_FRAGMENTATION, "fragmentation", 0,
|
||||
PROP_READONLY, ZFS_TYPE_POOL, "<percent>", "FRAG", sfeatures);
|
||||
PROP_READONLY, ZFS_TYPE_POOL, "<percent>", "FRAG", B_FALSE,
|
||||
sfeatures);
|
||||
zprop_register_number(ZPOOL_PROP_CAPACITY, "capacity", 0, PROP_READONLY,
|
||||
ZFS_TYPE_POOL, "<size>", "CAP", sfeatures);
|
||||
ZFS_TYPE_POOL, "<size>", "CAP", B_FALSE, sfeatures);
|
||||
zprop_register_number(ZPOOL_PROP_GUID, "guid", 0, PROP_READONLY,
|
||||
ZFS_TYPE_POOL, "<guid>", "GUID", sfeatures);
|
||||
ZFS_TYPE_POOL, "<guid>", "GUID", B_TRUE, sfeatures);
|
||||
zprop_register_number(ZPOOL_PROP_LOAD_GUID, "load_guid", 0,
|
||||
PROP_READONLY, ZFS_TYPE_POOL, "<load_guid>", "LOAD_GUID",
|
||||
sfeatures);
|
||||
B_TRUE, sfeatures);
|
||||
zprop_register_number(ZPOOL_PROP_HEALTH, "health", 0, PROP_READONLY,
|
||||
ZFS_TYPE_POOL, "<state>", "HEALTH", sfeatures);
|
||||
ZFS_TYPE_POOL, "<state>", "HEALTH", B_FALSE, sfeatures);
|
||||
zprop_register_number(ZPOOL_PROP_DEDUPRATIO, "dedupratio", 0,
|
||||
PROP_READONLY, ZFS_TYPE_POOL, "<1.00x or higher if deduped>",
|
||||
"DEDUP", sfeatures);
|
||||
"DEDUP", B_FALSE, sfeatures);
|
||||
|
||||
/* default number properties */
|
||||
zprop_register_number(ZPOOL_PROP_VERSION, "version", SPA_VERSION,
|
||||
PROP_DEFAULT, ZFS_TYPE_POOL, "<version>", "VERSION", sfeatures);
|
||||
PROP_DEFAULT, ZFS_TYPE_POOL, "<version>", "VERSION", B_FALSE,
|
||||
sfeatures);
|
||||
zprop_register_number(ZPOOL_PROP_ASHIFT, "ashift", 0, PROP_DEFAULT,
|
||||
ZFS_TYPE_POOL, "<ashift, 9-16, or 0=default>", "ASHIFT", sfeatures);
|
||||
ZFS_TYPE_POOL, "<ashift, 9-16, or 0=default>", "ASHIFT", B_FALSE,
|
||||
sfeatures);
|
||||
|
||||
/* default index (boolean) properties */
|
||||
zprop_register_index(ZPOOL_PROP_DELEGATION, "delegation", 1,
|
||||
|
@ -150,18 +156,18 @@ zpool_prop_init(void)
|
|||
|
||||
/* hidden properties */
|
||||
zprop_register_hidden(ZPOOL_PROP_NAME, "name", PROP_TYPE_STRING,
|
||||
PROP_READONLY, ZFS_TYPE_POOL, "NAME", sfeatures);
|
||||
PROP_READONLY, ZFS_TYPE_POOL, "NAME", B_TRUE, sfeatures);
|
||||
zprop_register_hidden(ZPOOL_PROP_MAXBLOCKSIZE, "maxblocksize",
|
||||
PROP_TYPE_NUMBER, PROP_READONLY, ZFS_TYPE_POOL, "MAXBLOCKSIZE",
|
||||
sfeatures);
|
||||
B_FALSE, sfeatures);
|
||||
zprop_register_hidden(ZPOOL_PROP_TNAME, "tname", PROP_TYPE_STRING,
|
||||
PROP_ONETIME, ZFS_TYPE_POOL, "TNAME", sfeatures);
|
||||
PROP_ONETIME, ZFS_TYPE_POOL, "TNAME", B_TRUE, sfeatures);
|
||||
zprop_register_hidden(ZPOOL_PROP_MAXDNODESIZE, "maxdnodesize",
|
||||
PROP_TYPE_NUMBER, PROP_READONLY, ZFS_TYPE_POOL, "MAXDNODESIZE",
|
||||
sfeatures);
|
||||
B_FALSE, sfeatures);
|
||||
zprop_register_hidden(ZPOOL_PROP_DEDUPDITTO, "dedupditto",
|
||||
PROP_TYPE_NUMBER, PROP_DEFAULT, ZFS_TYPE_POOL, "DEDUPDITTO",
|
||||
sfeatures);
|
||||
B_FALSE, sfeatures);
|
||||
|
||||
zfs_mod_list_supported_free(sfeatures);
|
||||
}
|
||||
|
@ -323,67 +329,85 @@ vdev_prop_init(void)
|
|||
|
||||
/* readonly number properties */
|
||||
zprop_register_number(VDEV_PROP_SIZE, "size", 0, PROP_READONLY,
|
||||
ZFS_TYPE_VDEV, "<size>", "SIZE", sfeatures);
|
||||
ZFS_TYPE_VDEV, "<size>", "SIZE", B_FALSE, sfeatures);
|
||||
zprop_register_number(VDEV_PROP_FREE, "free", 0, PROP_READONLY,
|
||||
ZFS_TYPE_VDEV, "<size>", "FREE", sfeatures);
|
||||
ZFS_TYPE_VDEV, "<size>", "FREE", B_FALSE, sfeatures);
|
||||
zprop_register_number(VDEV_PROP_ALLOCATED, "allocated", 0,
|
||||
PROP_READONLY, ZFS_TYPE_VDEV, "<size>", "ALLOC", sfeatures);
|
||||
PROP_READONLY, ZFS_TYPE_VDEV, "<size>", "ALLOC", B_FALSE,
|
||||
sfeatures);
|
||||
zprop_register_number(VDEV_PROP_EXPANDSZ, "expandsize", 0,
|
||||
PROP_READONLY, ZFS_TYPE_VDEV, "<size>", "EXPANDSZ", sfeatures);
|
||||
PROP_READONLY, ZFS_TYPE_VDEV, "<size>", "EXPANDSZ", B_FALSE,
|
||||
sfeatures);
|
||||
zprop_register_number(VDEV_PROP_FRAGMENTATION, "fragmentation", 0,
|
||||
PROP_READONLY, ZFS_TYPE_VDEV, "<percent>", "FRAG", sfeatures);
|
||||
PROP_READONLY, ZFS_TYPE_VDEV, "<percent>", "FRAG", B_FALSE,
|
||||
sfeatures);
|
||||
zprop_register_number(VDEV_PROP_CAPACITY, "capacity", 0, PROP_READONLY,
|
||||
ZFS_TYPE_VDEV, "<size>", "CAP", sfeatures);
|
||||
ZFS_TYPE_VDEV, "<size>", "CAP", B_FALSE, sfeatures);
|
||||
zprop_register_number(VDEV_PROP_GUID, "guid", 0, PROP_READONLY,
|
||||
ZFS_TYPE_VDEV, "<guid>", "GUID", sfeatures);
|
||||
ZFS_TYPE_VDEV, "<guid>", "GUID", B_TRUE, sfeatures);
|
||||
zprop_register_number(VDEV_PROP_STATE, "state", 0, PROP_READONLY,
|
||||
ZFS_TYPE_VDEV, "<state>", "STATE", sfeatures);
|
||||
ZFS_TYPE_VDEV, "<state>", "STATE", B_FALSE, sfeatures);
|
||||
zprop_register_number(VDEV_PROP_BOOTSIZE, "bootsize", 0, PROP_READONLY,
|
||||
ZFS_TYPE_VDEV, "<size>", "BOOTSIZE", sfeatures);
|
||||
ZFS_TYPE_VDEV, "<size>", "BOOTSIZE", B_FALSE, sfeatures);
|
||||
zprop_register_number(VDEV_PROP_ASIZE, "asize", 0, PROP_READONLY,
|
||||
ZFS_TYPE_VDEV, "<asize>", "ASIZE", sfeatures);
|
||||
ZFS_TYPE_VDEV, "<asize>", "ASIZE", B_FALSE, sfeatures);
|
||||
zprop_register_number(VDEV_PROP_PSIZE, "psize", 0, PROP_READONLY,
|
||||
ZFS_TYPE_VDEV, "<psize>", "PSIZE", sfeatures);
|
||||
ZFS_TYPE_VDEV, "<psize>", "PSIZE", B_FALSE, sfeatures);
|
||||
zprop_register_number(VDEV_PROP_ASHIFT, "ashift", 0, PROP_READONLY,
|
||||
ZFS_TYPE_VDEV, "<ashift>", "ASHIFT", sfeatures);
|
||||
ZFS_TYPE_VDEV, "<ashift>", "ASHIFT", B_FALSE, sfeatures);
|
||||
zprop_register_number(VDEV_PROP_PARITY, "parity", 0, PROP_READONLY,
|
||||
ZFS_TYPE_VDEV, "<parity>", "PARITY", sfeatures);
|
||||
ZFS_TYPE_VDEV, "<parity>", "PARITY", B_FALSE, sfeatures);
|
||||
zprop_register_number(VDEV_PROP_NUMCHILDREN, "numchildren", 0,
|
||||
PROP_READONLY, ZFS_TYPE_VDEV, "<number-of-children>", "NUMCHILD",
|
||||
sfeatures);
|
||||
B_FALSE, sfeatures);
|
||||
zprop_register_number(VDEV_PROP_READ_ERRORS, "read_errors", 0,
|
||||
PROP_READONLY, ZFS_TYPE_VDEV, "<errors>", "RDERR", sfeatures);
|
||||
PROP_READONLY, ZFS_TYPE_VDEV, "<errors>", "RDERR", B_FALSE,
|
||||
sfeatures);
|
||||
zprop_register_number(VDEV_PROP_WRITE_ERRORS, "write_errors", 0,
|
||||
PROP_READONLY, ZFS_TYPE_VDEV, "<errors>", "WRERR", sfeatures);
|
||||
PROP_READONLY, ZFS_TYPE_VDEV, "<errors>", "WRERR", B_FALSE,
|
||||
sfeatures);
|
||||
zprop_register_number(VDEV_PROP_CHECKSUM_ERRORS, "checksum_errors", 0,
|
||||
PROP_READONLY, ZFS_TYPE_VDEV, "<errors>", "CKERR", sfeatures);
|
||||
PROP_READONLY, ZFS_TYPE_VDEV, "<errors>", "CKERR", B_FALSE,
|
||||
sfeatures);
|
||||
zprop_register_number(VDEV_PROP_INITIALIZE_ERRORS,
|
||||
"initialize_errors", 0, PROP_READONLY, ZFS_TYPE_VDEV, "<errors>",
|
||||
"INITERR", sfeatures);
|
||||
"INITERR", B_FALSE, sfeatures);
|
||||
zprop_register_number(VDEV_PROP_OPS_NULL, "null_ops", 0,
|
||||
PROP_READONLY, ZFS_TYPE_VDEV, "<operations>", "NULLOP", sfeatures);
|
||||
PROP_READONLY, ZFS_TYPE_VDEV, "<operations>", "NULLOP", B_FALSE,
|
||||
sfeatures);
|
||||
zprop_register_number(VDEV_PROP_OPS_READ, "read_ops", 0,
|
||||
PROP_READONLY, ZFS_TYPE_VDEV, "<operations>", "READOP", sfeatures);
|
||||
PROP_READONLY, ZFS_TYPE_VDEV, "<operations>", "READOP", B_FALSE,
|
||||
sfeatures);
|
||||
zprop_register_number(VDEV_PROP_OPS_WRITE, "write_ops", 0,
|
||||
PROP_READONLY, ZFS_TYPE_VDEV, "<operations>", "WRITEOP", sfeatures);
|
||||
PROP_READONLY, ZFS_TYPE_VDEV, "<operations>", "WRITEOP", B_FALSE,
|
||||
sfeatures);
|
||||
zprop_register_number(VDEV_PROP_OPS_FREE, "free_ops", 0,
|
||||
PROP_READONLY, ZFS_TYPE_VDEV, "<operations>", "FREEOP", sfeatures);
|
||||
PROP_READONLY, ZFS_TYPE_VDEV, "<operations>", "FREEOP", B_FALSE,
|
||||
sfeatures);
|
||||
zprop_register_number(VDEV_PROP_OPS_CLAIM, "claim_ops", 0,
|
||||
PROP_READONLY, ZFS_TYPE_VDEV, "<operations>", "CLAIMOP", sfeatures);
|
||||
PROP_READONLY, ZFS_TYPE_VDEV, "<operations>", "CLAIMOP", B_FALSE,
|
||||
sfeatures);
|
||||
zprop_register_number(VDEV_PROP_OPS_TRIM, "trim_ops", 0,
|
||||
PROP_READONLY, ZFS_TYPE_VDEV, "<operations>", "TRIMOP", sfeatures);
|
||||
PROP_READONLY, ZFS_TYPE_VDEV, "<operations>", "TRIMOP", B_FALSE,
|
||||
sfeatures);
|
||||
zprop_register_number(VDEV_PROP_BYTES_NULL, "null_bytes", 0,
|
||||
PROP_READONLY, ZFS_TYPE_VDEV, "<bytes>", "NULLBYTE", sfeatures);
|
||||
PROP_READONLY, ZFS_TYPE_VDEV, "<bytes>", "NULLBYTE", B_FALSE,
|
||||
sfeatures);
|
||||
zprop_register_number(VDEV_PROP_BYTES_READ, "read_bytes", 0,
|
||||
PROP_READONLY, ZFS_TYPE_VDEV, "<bytes>", "READBYTE", sfeatures);
|
||||
PROP_READONLY, ZFS_TYPE_VDEV, "<bytes>", "READBYTE", B_FALSE,
|
||||
sfeatures);
|
||||
zprop_register_number(VDEV_PROP_BYTES_WRITE, "write_bytes", 0,
|
||||
PROP_READONLY, ZFS_TYPE_VDEV, "<bytes>", "WRITEBYTE", sfeatures);
|
||||
PROP_READONLY, ZFS_TYPE_VDEV, "<bytes>", "WRITEBYTE", B_FALSE,
|
||||
sfeatures);
|
||||
zprop_register_number(VDEV_PROP_BYTES_FREE, "free_bytes", 0,
|
||||
PROP_READONLY, ZFS_TYPE_VDEV, "<bytes>", "FREEBYTE", sfeatures);
|
||||
PROP_READONLY, ZFS_TYPE_VDEV, "<bytes>", "FREEBYTE", B_FALSE,
|
||||
sfeatures);
|
||||
zprop_register_number(VDEV_PROP_BYTES_CLAIM, "claim_bytes", 0,
|
||||
PROP_READONLY, ZFS_TYPE_VDEV, "<bytes>", "CLAIMBYTE", sfeatures);
|
||||
PROP_READONLY, ZFS_TYPE_VDEV, "<bytes>", "CLAIMBYTE", B_FALSE,
|
||||
sfeatures);
|
||||
zprop_register_number(VDEV_PROP_BYTES_TRIM, "trim_bytes", 0,
|
||||
PROP_READONLY, ZFS_TYPE_VDEV, "<bytes>", "TRIMBYTE", sfeatures);
|
||||
PROP_READONLY, ZFS_TYPE_VDEV, "<bytes>", "TRIMBYTE", B_FALSE,
|
||||
sfeatures);
|
||||
|
||||
/* default numeric properties */
|
||||
|
||||
|
@ -399,7 +423,7 @@ vdev_prop_init(void)
|
|||
|
||||
/* hidden properties */
|
||||
zprop_register_hidden(VDEV_PROP_NAME, "name", PROP_TYPE_STRING,
|
||||
PROP_READONLY, ZFS_TYPE_VDEV, "NAME", sfeatures);
|
||||
PROP_READONLY, ZFS_TYPE_VDEV, "NAME", B_TRUE, sfeatures);
|
||||
|
||||
zfs_mod_list_supported_free(sfeatures);
|
||||
}
|
||||
|
|
|
@ -97,7 +97,8 @@ void
|
|||
zprop_register_impl(int prop, const char *name, zprop_type_t type,
|
||||
uint64_t numdefault, const char *strdefault, zprop_attr_t attr,
|
||||
int objset_types, const char *values, const char *colname,
|
||||
boolean_t rightalign, boolean_t visible, const zprop_index_t *idx_tbl,
|
||||
boolean_t rightalign, boolean_t visible, boolean_t flex,
|
||||
const zprop_index_t *idx_tbl,
|
||||
const struct zfs_mod_supported_features *sfeatures)
|
||||
{
|
||||
zprop_desc_t *prop_tbl = zprop_get_proptable(objset_types);
|
||||
|
@ -122,6 +123,7 @@ zprop_register_impl(int prop, const char *name, zprop_type_t type,
|
|||
pd->pd_visible = visible;
|
||||
pd->pd_zfs_mod_supported =
|
||||
zfs_mod_supported_prop(name, objset_types, sfeatures);
|
||||
pd->pd_always_flex = flex;
|
||||
pd->pd_table = idx_tbl;
|
||||
pd->pd_table_size = 0;
|
||||
while (idx_tbl && (idx_tbl++)->pi_name != NULL)
|
||||
|
@ -134,17 +136,20 @@ zprop_register_string(int prop, const char *name, const char *def,
|
|||
const char *colname, const struct zfs_mod_supported_features *sfeatures)
|
||||
{
|
||||
zprop_register_impl(prop, name, PROP_TYPE_STRING, 0, def, attr,
|
||||
objset_types, values, colname, B_FALSE, B_TRUE, NULL, sfeatures);
|
||||
objset_types, values, colname, B_FALSE, B_TRUE, B_FALSE, NULL,
|
||||
sfeatures);
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
zprop_register_number(int prop, const char *name, uint64_t def,
|
||||
zprop_attr_t attr, int objset_types, const char *values,
|
||||
const char *colname, const struct zfs_mod_supported_features *sfeatures)
|
||||
const char *colname, boolean_t flex,
|
||||
const struct zfs_mod_supported_features *sfeatures)
|
||||
{
|
||||
zprop_register_impl(prop, name, PROP_TYPE_NUMBER, def, NULL, attr,
|
||||
objset_types, values, colname, B_TRUE, B_TRUE, NULL, sfeatures);
|
||||
objset_types, values, colname, B_TRUE, B_TRUE, flex, NULL,
|
||||
sfeatures);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -154,17 +159,18 @@ zprop_register_index(int prop, const char *name, uint64_t def,
|
|||
const struct zfs_mod_supported_features *sfeatures)
|
||||
{
|
||||
zprop_register_impl(prop, name, PROP_TYPE_INDEX, def, NULL, attr,
|
||||
objset_types, values, colname, B_FALSE, B_TRUE, idx_tbl, sfeatures);
|
||||
objset_types, values, colname, B_FALSE, B_TRUE, B_FALSE, idx_tbl,
|
||||
sfeatures);
|
||||
}
|
||||
|
||||
void
|
||||
zprop_register_hidden(int prop, const char *name, zprop_type_t type,
|
||||
zprop_attr_t attr, int objset_types, const char *colname,
|
||||
zprop_attr_t attr, int objset_types, const char *colname, boolean_t flex,
|
||||
const struct zfs_mod_supported_features *sfeatures)
|
||||
{
|
||||
zprop_register_impl(prop, name, type, 0, NULL, attr,
|
||||
objset_types, NULL, colname,
|
||||
type == PROP_TYPE_NUMBER, B_FALSE, NULL, sfeatures);
|
||||
type == PROP_TYPE_NUMBER, B_FALSE, flex, NULL, sfeatures);
|
||||
}
|
||||
|
||||
|
||||
|
@ -440,7 +446,7 @@ zprop_width(int prop, boolean_t *fixed, zfs_type_t type)
|
|||
if (type != ZFS_TYPE_POOL && type != ZFS_TYPE_VDEV)
|
||||
type = ZFS_TYPE_FILESYSTEM;
|
||||
|
||||
*fixed = B_TRUE;
|
||||
*fixed = !pd->pd_always_flex;
|
||||
|
||||
/*
|
||||
* Start with the width of the column name.
|
||||
|
@ -459,12 +465,6 @@ zprop_width(int prop, boolean_t *fixed, zfs_type_t type)
|
|||
*/
|
||||
if (ret < 5)
|
||||
ret = 5;
|
||||
/*
|
||||
* 'creation' is handled specially because it's a number
|
||||
* internally, but displayed as a date string.
|
||||
*/
|
||||
if (type == ZFS_TYPE_FILESYSTEM && prop == ZFS_PROP_CREATION)
|
||||
*fixed = B_FALSE;
|
||||
/*
|
||||
* 'health' is handled specially because it's a number
|
||||
* internally, but displayed as a fixed 8 character string.
|
||||
|
@ -482,7 +482,6 @@ zprop_width(int prop, boolean_t *fixed, zfs_type_t type)
|
|||
break;
|
||||
|
||||
case PROP_TYPE_STRING:
|
||||
*fixed = B_FALSE;
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue