Skip to content

Commit

Permalink
ZTS: checkpoint_discard_busy should use save_tunable/restore_tunable
Browse files Browse the repository at this point in the history
Instead of using hardwired value for SPA_DISCARD_MEMORY_LIMIT,
use save_tunable and restore_tunable to restore the pre-test state.

Signed-off-by: Toomas Soome <[email protected]>
  • Loading branch information
tsoome committed Jan 3, 2025
1 parent d35f9f2 commit eb60923
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ log_unsupported "Skipping, issue https://github.com/openzfs/zfs/issues/12053"

function test_cleanup
{
# reset memory limit to 16M
set_tunable64 SPA_DISCARD_MEMORY_LIMIT 16777216
# reset to original value
restore_tunable SPA_DISCARD_MEMORY_LIMIT
cleanup_nested_pools
}

Expand All @@ -69,6 +69,7 @@ log_onexit test_cleanup
# map, we should have even more time to
# verify this.
#
log_must save_tunable SPA_DISCARD_MEMORY_LIMIT
set_tunable64 SPA_DISCARD_MEMORY_LIMIT 128

log_must zpool checkpoint $NESTEDPOOL
Expand Down Expand Up @@ -101,8 +102,8 @@ log_mustnot zpool checkpoint -d $NESTEDPOOL
log_mustnot zpool remove $NESTEDPOOL $FILEDISK1
log_mustnot zpool reguid $NESTEDPOOL

# reset memory limit to 16M
set_tunable64 SPA_DISCARD_MEMORY_LIMIT 16777216
# reset to original value
restore_tunable SPA_DISCARD_MEMORY_LIMIT

nested_wait_discard_finish

Expand Down

0 comments on commit eb60923

Please sign in to comment.