mirror of
https://git.proxmox.com/git/mirror_zfs
synced 2025-04-28 11:40:17 +00:00
ZTS: checkpoint_discard_busy should use save_tunable/restore_tunable
Instead of using hardwired value for SPA_DISCARD_MEMORY_LIMIT, use save_tunable and restore_tunable to restore the pre-test state. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Alexander Motin <mav@FreeBSD.org> Signed-off-by: Toomas Soome <tsoome@me.com> Closes #16919
This commit is contained in:
parent
4425a7bb85
commit
125731436d
@ -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
|
||||
log_must restore_tunable SPA_DISCARD_MEMORY_LIMIT
|
||||
cleanup_nested_pools
|
||||
}
|
||||
|
||||
@ -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
|
||||
@ -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
|
||||
log_must restore_tunable SPA_DISCARD_MEMORY_LIMIT
|
||||
|
||||
nested_wait_discard_finish
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user