1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-22 07:42:37 +00:00

perf: don't open torrent file descriptors with TR_SYS_FILE_SEQUENTIAL (#7089)

This commit is contained in:
Yat Ho 2024-10-14 10:56:44 +08:00 committed by GitHub
parent 61ecad4c43
commit c7c8c47850
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -184,7 +184,7 @@ std::optional<tr_sys_file_t> tr_open_files::get(
// open the file
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);
if (!is_open(fd))
{