mirror of
https://github.com/transmission/transmission
synced 2025-01-03 05:25:52 +00:00
perf: don't open torrent file descriptors with TR_SYS_FILE_SEQUENTIAL
(#7089)
This commit is contained in:
parent
61ecad4c43
commit
c7c8c47850
1 changed files with 1 additions and 1 deletions
|
@ -184,7 +184,7 @@ std::optional<tr_sys_file_t> tr_open_files::get(
|
||||||
|
|
||||||
// open the file
|
// open the file
|
||||||
int flags = writable ? (TR_SYS_FILE_WRITE | TR_SYS_FILE_CREATE) : 0;
|
int flags = writable ? (TR_SYS_FILE_WRITE | TR_SYS_FILE_CREATE) : 0;
|
||||||
flags |= TR_SYS_FILE_READ | TR_SYS_FILE_SEQUENTIAL;
|
flags |= TR_SYS_FILE_READ;
|
||||||
auto const fd = tr_sys_file_open(filename, flags, 0666, &error);
|
auto const fd = tr_sys_file_open(filename, flags, 0666, &error);
|
||||||
if (!is_open(fd))
|
if (!is_open(fd))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue