mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2025-03-26 21:46:28 +03:00
![]() Shared test library functions lack a simple way to ensure proper cleanup in the event of a failure. The `log_onexit` cleanup pattern cannot be used in library functions because it uses one global variable to store the cleanup command. An example of where this is a serious issue is when a tunable that artifically stalls kernel progress gets activated and then some check fails. Unless the caller knows about the tunable and sets it back, the system will be left in a bad state. To solve this problem, turn the global cleanup variable into a stack. Provide push and pop functions to add additional cleanup steps and remove them after it is safe again. The first use of this new functionality is in attempt_during_removal, which sets REMOVAL_SUSPEND_PROGRESS. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: John Kennedy <john.kennedy@delphix.com> Signed-off-by: Ryan Moeller <ryan@iXsystems.com> Closes #10080 |
||
---|---|---|
.. | ||
cleanup.ksh | ||
Makefile.am | ||
removal_all_vdev.ksh | ||
removal_cancel.ksh | ||
removal_check_space.ksh | ||
removal_condense_export.ksh | ||
removal_multiple_indirection.ksh | ||
removal_nopwrite.ksh | ||
removal_remap_deadlists.ksh | ||
removal_reservation.ksh | ||
removal_resume_export.ksh | ||
removal_sanity.ksh | ||
removal_with_add.ksh | ||
removal_with_create_fs.ksh | ||
removal_with_dedup.ksh | ||
removal_with_errors.ksh | ||
removal_with_export.ksh | ||
removal_with_faulted.ksh | ||
removal_with_ganging.ksh | ||
removal_with_remove.ksh | ||
removal_with_scrub.ksh | ||
removal_with_send_recv.ksh | ||
removal_with_send.ksh | ||
removal_with_snapshot.ksh | ||
removal_with_write.ksh | ||
removal_with_zdb.ksh | ||
removal.kshlib | ||
remove_expanded.ksh | ||
remove_indirect.ksh | ||
remove_mirror_sanity.ksh | ||
remove_mirror.ksh | ||
remove_raidz.ksh |