diff --git a/include/libtorrent/settings_pack.hpp b/include/libtorrent/settings_pack.hpp index 9f5c348bb..2fb3e6546 100644 --- a/include/libtorrent/settings_pack.hpp +++ b/include/libtorrent/settings_pack.hpp @@ -941,11 +941,7 @@ namespace libtorrent // disabled, enabling this may reduce performance. // // One reason to disable caching is that it may help the operating - // system from growing its file cache indefinitely. Since some OSes - // only allow aligned files to be opened in unbuffered mode, It is - // recommended to make the largest file in a torrent the first file - // (with offset 0) or use pad files to align all files to piece - // boundries. + // system from growing its file cache indefinitely. disk_io_write_mode, disk_io_read_mode, diff --git a/src/file.cpp b/src/file.cpp index db5ea6789..ce81edc54 100644 --- a/src/file.cpp +++ b/src/file.cpp @@ -1308,6 +1308,9 @@ namespace libtorrent #endif #ifdef O_DIRECT | ((mode & direct_io) ? O_DIRECT : 0) +#endif +#ifdef O_SYNC + | ((mode & no_cache) ? O_SYNC: 0) #endif , permissions);