[BitTorrent] Bittorrent and filesystem API / integration
arachnid at notdot.net
Wed Jan 12 16:55:48 EST 2005
Jesus Cea wrote:
>Nick Johnson wrote:
>>For example, you could, when allocating files, create a temporary
>>(hidden) file in the same directory that contains the bitmap for the
>>torrent. Before starting, check the mtime on the bitmap file is at least
>>as recent as the most recent of the torrent files, and if so, use it
>>instead of hashing the whole thing manually.
>All these schemas fails if you have a power surge and the OS "write"
>operation is asyncronous, like any modern Operating System.
No, that's why I stated that you should check the mtime of the bitmap
versus the files it concerns before starting. As long as the program
ensures it flushes its buffers for the files before writing the updated
bitmap, you know that if the bitmap is newer than the files, it is valid.
Databases do this all the time with transaction logs just fine.
Yahoo! Groups Links
<*> To visit your group on the web, go to:
<*> To unsubscribe from this group, send an email to:
BitTorrent-unsubscribe at yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
More information about the BitTorrent