mirror of
https://github.com/Zygo/bees.git
synced 2025-05-17 21:35:45 +02:00
Holding file FDs open for long periods of time delays inode destruction. For very large files this can lead to excessive delays while bees dedups data that will cease to be reachable. Use the same workaround for file FDs (in the root_ino cache) that is used for subvols (in the root cache): forcibly close all cached FDs at regular intervals. The FD cache will reacquire FDs from files that still have existing paths, and will abandon FDs from files that no longer have existing paths. The non-existing-path case is not new (bees has always been able to discover deleted inodes) so it is already handled by existing code. Fixes: https://github.com/Zygo/bees/issues/18 Signed-off-by: Zygo Blaxell <bees@furryterror.org>