mirror of
https://github.com/versity/scoutfs.git
synced 2026-07-20 15:02:21 +00:00
81ea586581
Every lock_key_range call results in a spinlock on linfo->lock to do housekeeping and reclaim idle locks. This housekeeping is non-critical and can be deferred, but more importantly, while a reclaim pass is ongoing, there's no need to attempt reclaim at the same time. I ran into this while doing cross-node spam and it caused a near hard lockup with my VM spinning on the lock for 7+ minutes, without making any forward progress. We can just trylock and give up. If the lock is held, another task is already reclaiming and we're safe to skip. The force flag will still cause a spin_lock to assure shutdown waits for other reclaims, which needs to happen before shutdown can progress anyway. Signed-off-by: Auke Kok <auke.kok@versity.com>