• Filipe Manana's avatar
    btrfs: remove obsolete delayed ref throttling logic when truncating items · a8fdc051
    Filipe Manana authored
    We have this logic encapsulated in btrfs_should_throttle_delayed_refs()
    where we try to estimate if running the current amount of delayed
    references we have will take more than half a second, and if so, the
    caller btrfs_should_throttle_delayed_refs() should do something to
    prevent more and more delayed refs from being accumulated.
    
    This logic was added in commit 0a2b2a84 ("Btrfs: throttle delayed
    refs better") and then further refined in commit a79b7d4b ("Btrfs:
    async delayed refs"). The idea back then was that the caller of
    btrfs_should_throttle_delayed_refs() would release its transaction
    handle (by calling btrfs_end_transaction()) when that function returned
    true, then btrfs_end_transaction() would trigger an async job to run
    delayed references in a workqueue, and later start/join a transaction
    again and do more work.
    
    However we don't run delayed references asynchronously anymore, that
    was removed in commit db2462a6 ...
    a8fdc051
inode-item.c 19.9 KB