tjjh89017 / ezio

BT-based Disk Deployment tool

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Write function needs store_buffer

tjjh89017 opened this issue · comments

Libtorrent will call async_write and call async_hash immediately (even async_write isn't finished)
So we need to save buf to store_buffer.
async_read/async_hash should read from store_buffer if need.

Currently, we used sync write.

in mmap_disk_io, do_write will erase the store_buffer.
store_buffer will only save storage_idx, piece, offset, buf address.

https://github.com/arvidn/libtorrent/blob/RC_2_0/include/libtorrent/aux_/store_buffer.hpp