Skip to content

Commit

Permalink
ZTS: Use decimal values when setting tunables
Browse files Browse the repository at this point in the history
The mdb_set_uint32 function requires that the values passed in be
decimal.  This was overlooked initially because the matching Linux
function accepts both decimal and hexadecimal values.

Reviewed-by: John Kennedy <[email protected]>
Reviewed by: Sara Hartse <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Igor Kozhukhov <[email protected]>
Closes #9125
Closes #9195
  • Loading branch information
behlendorf authored Aug 22, 2019
1 parent a3ba6e5 commit 31b548f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ function test_condense
{
# set the max livelist entries to a small value to more easily
# trigger a condense
set_tunable64 zfs_livelist_max_entries 0x14
set_tunable64 zfs_livelist_max_entries 20
# set a small percent shared threshold so the livelist is not disabled
set_tunable32 zfs_livelist_min_percent_shared 0xa
set_tunable32 zfs_livelist_min_percent_shared 10
clone_dataset $TESTFS1 snap $TESTCLONE

# sync between each write to make sure a new entry is created
Expand All @@ -86,7 +86,7 @@ function test_condense
function test_deactivated
{
# Threshold set to 50 percent
set_tunable32 zfs_livelist_min_percent_shared 0x32
set_tunable32 zfs_livelist_min_percent_shared 50
clone_dataset $TESTFS1 snap $TESTCLONE

log_must mkfile 5m /$TESTPOOL/$TESTCLONE/$TESTFILE0
Expand All @@ -97,7 +97,7 @@ function test_deactivated
log_must zfs destroy -R $TESTPOOL/$TESTCLONE

# Threshold set to 20 percent
set_tunable32 zfs_livelist_min_percent_shared 0x14
set_tunable32 zfs_livelist_min_percent_shared 20
clone_dataset $TESTFS1 snap $TESTCLONE

log_must mkfile 5m /$TESTPOOL/$TESTCLONE/$TESTFILE0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ log_must zpool sync $TESTPOOL
log_must zfs snapshot $TESTPOOL/$TESTFS1@snap

# Reduce livelist size to trigger condense more easily
set_tunable64 zfs_livelist_max_entries 0x14
set_tunable64 zfs_livelist_max_entries 20

# Test cancellation path in the zthr
set_tunable32 zfs_livelist_condense_zthr_pause 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ log_must mkfile 20m /$TESTPOOL/$TESTFS1/atestfile
log_must zfs snapshot $TESTPOOL/$TESTFS1@snap

# set a small livelist entry size to more easily test multiple entry livelists
set_tunable64 zfs_livelist_max_entries 0x14
set_tunable64 zfs_livelist_max_entries 20

test_one_empty
test_one
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function cleanup
log_onexit cleanup

ORIGINAL_MAX=$(get_tunable zfs_livelist_max_entries)
set_tunable64 zfs_livelist_max_entries 0x14
set_tunable64 zfs_livelist_max_entries 20

VIRTUAL_DISK1=/var/tmp/disk1
VIRTUAL_DISK2=/var/tmp/disk2
Expand Down

0 comments on commit 31b548f

Please sign in to comment.