mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-26 04:07:45 +03:00
fc87e269e2
Only call txg_wait_synced() when rebuild IOs were issued for this metaslab. This is a small optimization since in practice the first metaslab is very likely to have allocations and cause vr_last_txg to be initialized. After this point when processing empty metaslabs txg_wait_synced() is called but with an already committed txg so it will not wait. Still it's better not to call txg_wait_synced() at all when it's not needed. Reviewed-by: Andriy Tkachuk <atkachuk@wasabi.com> Reviewed-by: Alexander Motin <alexander.motin@TrueNAS.com> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #18482