mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-25 02:49:32 +03:00
Avoid unnecessary metaslab_check_free calling
The metaslab_check_free() function only needs to be called in the GANG|DEDUP|etc case because zio_free_sync() will internally call metaslab_check_free(). Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Richard Yao <richard.yao@alumni.stonybrook.edu> Signed-off-by: Finix1979 <yancw@info2soft.com> Closes #13977
This commit is contained in:
parent
383c3eb33d
commit
6694ca5539
@ -1203,7 +1203,6 @@ zio_free(spa_t *spa, uint64_t txg, const blkptr_t *bp)
|
||||
*/
|
||||
if (BP_IS_EMBEDDED(bp))
|
||||
return;
|
||||
metaslab_check_free(spa, bp);
|
||||
|
||||
/*
|
||||
* Frees that are for the currently-syncing txg, are not going to be
|
||||
@ -1220,6 +1219,7 @@ zio_free(spa_t *spa, uint64_t txg, const blkptr_t *bp)
|
||||
txg != spa->spa_syncing_txg ||
|
||||
(spa_sync_pass(spa) >= zfs_sync_pass_deferred_free &&
|
||||
!spa_feature_is_active(spa, SPA_FEATURE_LOG_SPACEMAP))) {
|
||||
metaslab_check_free(spa, bp);
|
||||
bplist_append(&spa->spa_free_bplist[txg & TXG_MASK], bp);
|
||||
} else {
|
||||
VERIFY3P(zio_free_sync(NULL, spa, txg, bp, 0), ==, NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user