arvidn / libtorrent

an efficient feature complete C++ bittorrent implementation

Home Page:http://libtorrent.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Feature Request] Add a flag which will enable the use of fsync

alervd opened this issue · comments

Please provide the following information

libtorrent version (or branch): 1.2.19

platform/architecture: Android/Linux

compiler and compiler version: doesn't matter

please describe what symptom you see, what you would expect to see instead and
how to reproduce it.

I don't know regarding all Linux OS. Originally this issue was found under Android. In case there is no space left on SD card, Android never generates any file errors. The only way to check if there were a file write error is to call fsync and check its result.

This issue is described here: https://issuetracker.google.com/issues/280236407.

I would like some flag to be added in session params which will enable the use of fsync every time libtorrent writes data to disk.

For now, when there is no space left, Libtorrent just sits there with 0 downloading speed. No file errors generated. Which is obviously looking like a bug for the user.