aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAkash Ayare <[email protected]>2016-06-02 21:00:23 -0700
committerBrian Behlendorf <[email protected]>2017-02-13 12:21:13 -0800
commit6dd95a910a258c38f239785d7275cd93ab29da37 (patch)
treec2f6b1ab129e8a13e68069163f8c78a01a709e10
parent8db2dc32cdd50c5517851eab33bc31756e78975c (diff)
OpenZFS 7027 - zfs_written_property_001_pos makes unreasonable assumptions about metadata space usage
Reviewed by: Prakash Surya <[email protected]> Reviewed by: John Kennedy <[email protected]> Reviewed by: Matthew Ahrens <[email protected]> Reviewed by: Igor Kozhukhov <[email protected]> Approved by: Gordon Ross <[email protected]> Reviewed-by: George Melikov <[email protected]> Ported-by: Brian Behlendorf <[email protected]> OpenZFS-issue: https://www.illumos.org/issues/7027 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/48cb8b9 Issue #2441 Closes #5778
-rwxr-xr-xtests/zfs-tests/tests/functional/cli_root/zfs_property/zfs_written_property_001_pos.ksh10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/zfs-tests/tests/functional/cli_root/zfs_property/zfs_written_property_001_pos.ksh b/tests/zfs-tests/tests/functional/cli_root/zfs_property/zfs_written_property_001_pos.ksh
index ad9687942..23763608e 100755
--- a/tests/zfs-tests/tests/functional/cli_root/zfs_property/zfs_written_property_001_pos.ksh
+++ b/tests/zfs-tests/tests/functional/cli_root/zfs_property/zfs_written_property_001_pos.ksh
@@ -11,7 +11,7 @@
#
#
-# Copyright (c) 2012 by Delphix. All rights reserved.
+# Copyright (c) 2012, 2015 by Delphix. All rights reserved.
#
#
@@ -63,11 +63,8 @@ typeset -l total=0
typeset -l snap1_size=0
typeset -l snap2_size=0
typeset -l snap3_size=0
-typeset -l metadata=0
typeset -l mb_block=0
((mb_block = 1024 * 1024))
-# approximate metadata on dataset when empty is 32KB
-((metadata = 32 * 1024))
log_note "verify written property statistics for dataset"
log_must $ZFS create -p $TESTPOOL/$TESTFS1/$TESTFS2/$TESTFS3
@@ -90,7 +87,10 @@ blocks=0
for i in 1 2 3; do
written=$(get_prop written $TESTPOOL/$TESTFS1@snap$i)
if [[ $blocks -eq 0 ]]; then
- expected_written=$metadata
+ # Written value for the frist non-clone snapshot is
+ # expected to be equal to the referenced value.
+ expected_written=$( \
+ get_prop referenced $TESTPOOL/$TESTFS1@snap$i)
else
((expected_written = blocks * mb_block))
fi