You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Operating systems provide APIs (FIEMAP ioctl in case of Linux, who really cares about others) to get the information regarding underlying FS extents of a file, including whether the extent is zero-initialized and never touched afterwards (FIEMAP_EXTENT_UNWRITTEN). For the pieces that are located inside such extents, it's obvious in advance that sha(block) = sha('\0' * block_size), so the SHA computation can be bypassed. It can significantly improve recheck times in cases when rtorrent was killed while downloading.
The text was updated successfully, but these errors were encountered:
loskutov
changed the title
Optimization opportunity for integrity checks of partially downloaded files
Optimization opportunity for hash checks of partially downloaded files
Dec 9, 2023
Operating systems provide APIs (
FIEMAP
ioctl in case of Linux, who really cares about others) to get the information regarding underlying FS extents of a file, including whether the extent is zero-initialized and never touched afterwards (FIEMAP_EXTENT_UNWRITTEN
). For the pieces that are located inside such extents, it's obvious in advance thatsha(block) = sha('\0' * block_size)
, so the SHA computation can be bypassed. It can significantly improve recheck times in cases when rtorrent was killed while downloading.The text was updated successfully, but these errors were encountered: