mirror of
				https://git.proxmox.com/git/mirror_zfs.git
				synced 2025-10-26 18:05:04 +03: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
							
								
									c02e1cf055
								
							
						
					
					
						commit
						ee3bde9dad
					
				| @ -42,8 +42,8 @@ log_unsupported "Skipping, issue https://github.com/openzfs/zfs/issues/12053" | |||||||
| 
 | 
 | ||||||
| function test_cleanup | function test_cleanup | ||||||
| { | { | ||||||
| 	# reset memory limit to 16M | 	# reset to original value | ||||||
| 	set_tunable64 SPA_DISCARD_MEMORY_LIMIT 16777216 | 	log_must restore_tunable SPA_DISCARD_MEMORY_LIMIT | ||||||
| 	cleanup_nested_pools | 	cleanup_nested_pools | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| @ -69,6 +69,7 @@ log_onexit test_cleanup | |||||||
| #	map, we should have even more time to | #	map, we should have even more time to | ||||||
| #	verify this. | #	verify this. | ||||||
| # | # | ||||||
|  | log_must save_tunable SPA_DISCARD_MEMORY_LIMIT | ||||||
| set_tunable64 SPA_DISCARD_MEMORY_LIMIT 128 | set_tunable64 SPA_DISCARD_MEMORY_LIMIT 128 | ||||||
| 
 | 
 | ||||||
| log_must zpool checkpoint $NESTEDPOOL | log_must zpool checkpoint $NESTEDPOOL | ||||||
| @ -101,8 +102,8 @@ log_mustnot zpool checkpoint -d $NESTEDPOOL | |||||||
| log_mustnot zpool remove $NESTEDPOOL $FILEDISK1 | log_mustnot zpool remove $NESTEDPOOL $FILEDISK1 | ||||||
| log_mustnot zpool reguid $NESTEDPOOL | log_mustnot zpool reguid $NESTEDPOOL | ||||||
| 
 | 
 | ||||||
| # reset memory limit to 16M | # reset to original value | ||||||
| set_tunable64 SPA_DISCARD_MEMORY_LIMIT 16777216 | log_must restore_tunable SPA_DISCARD_MEMORY_LIMIT | ||||||
| 
 | 
 | ||||||
| nested_wait_discard_finish | nested_wait_discard_finish | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Toomas Soome
						Toomas Soome