fixed low_prio_disk support on linux

This commit is contained in:
Arvid Norberg 2012-05-15 14:13:35 +00:00
parent 5275e75fa5
commit 19e7546968
2 changed files with 3 additions and 1 deletions

View File

@ -1,4 +1,5 @@
* fixed low_prio_disk support on linux
* fixed time critical piece accounting in the request queue * fixed time critical piece accounting in the request queue
* fixed semantics of rate_limit_utp to also ignore per-torrent limits * fixed semantics of rate_limit_utp to also ignore per-torrent limits
* fixed piece sorting bug of deadline pieces * fixed piece sorting bug of deadline pieces

View File

@ -1781,7 +1781,8 @@ namespace libtorrent
setiopolicy_np(IOPOL_TYPE_DISK, IOPOL_SCOPE_THREAD setiopolicy_np(IOPOL_TYPE_DISK, IOPOL_SCOPE_THREAD
, m_settings.low_prio_disk ? IOPOL_THROTTLE : IOPOL_DEFAULT); , m_settings.low_prio_disk ? IOPOL_THROTTLE : IOPOL_DEFAULT);
#elif defined IOPRIO_WHO_PROCESS #elif defined IOPRIO_WHO_PROCESS
syscall(ioprio_set, IOPRIO_WHO_PROCESS, getpid()); syscall(ioprio_set, IOPRIO_WHO_PROCESS, getpid(), IOPRIO_PRIO_VALUE(IOPRIO_CLASS_BE
, m_settings.get_bool(settings_pack::low_prio_disk) ? 7: 0));
#endif #endif
if (m_settings.cache_size == -1) if (m_settings.cache_size == -1)
{ {