mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-23 02:44:41 +03:00
Fix log vdev removal issues
When we clear the log, we should clear all the fields, not only zh_log. Otherwise remaining ZIL_REPLAY_NEEDED will prevent the vdev removal. Handle it also from the other side, when zh_log is already cleared, while zh_flags is not. spa_vdev_remove_log() asserts that allocated space on removed log device is zero. While it should be so in perfect world, it might be not if space leaked at any point. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Alexander Motin <alexander.motin@TrueNAS.com> Closes #18277
This commit is contained in:
@@ -947,7 +947,7 @@ tests = ['removal_all_vdev', 'removal_cancel', 'removal_check_space',
|
||||
'removal_with_write', 'removal_with_zdb', 'remove_expanded',
|
||||
'remove_mirror', 'remove_mirror_sanity', 'remove_raidz',
|
||||
'remove_indirect', 'remove_attach_mirror', 'removal_reservation',
|
||||
'removal_with_hole']
|
||||
'removal_with_hole', 'removal_with_missing_log']
|
||||
tags = ['functional', 'removal']
|
||||
|
||||
[tests/functional/rename_dirs]
|
||||
|
||||
Reference in New Issue
Block a user