Commit Graph

290 Commits

Author SHA1 Message Date
arvidn a39139b91b fix warning in test_transfer 2026-01-03 02:14:09 +01:00
Vladimir Golovnev (glassez) 0497182aa2 Fix use-after-move in test_storage 2025-03-10 11:18:38 +01:00
Arvid Norberg 24e658aa88 fix tests to work on linux ZFS 2024-10-21 15:06:07 +02:00
arvidn 5d5eeeff19 add test 2024-09-30 19:34:54 +02:00
arvidn 5ef044aa2a add test 2023-08-24 14:36:15 +02:00
luzpaz 63373cf012 Fixes various typos
Found via `codespell -q 3 -S "*.pem,*.torrent,./docs/hunspell,./src/puff.cpp" -L bu,fo,folx,ihs,ot,readd,requestor,te`
2023-08-24 07:52:41 +02:00
arvidn dc795b906d more create_torrent tests 2022-09-18 17:56:47 +02:00
arvidn fd3d56ab82 generalize test_storage 2022-08-14 18:13:44 +02:00
arvidn c0e9679afa enable test_storage for mmapped files on windows 2022-08-14 18:13:44 +02:00
arvidn 1a9abc8a5d remove unused copy_bufs() 2022-08-08 17:40:37 +02:00
arvidn 5bbf003e2f remove unused advance_bufs() 2022-08-08 17:40:37 +02:00
arvidn 51400f56ac remove clear_bufs 2022-08-08 17:40:37 +02:00
arvidn 9eac98fcd3 change vectored I/O API to single-buffer in readwritev() and posix- and mmap storage 2022-08-08 17:40:37 +02:00
arvidn 550d3c7d9f update copyright headers 2022-06-22 21:42:55 +02:00
arvidn b49bb8f3a6 add test 2022-03-06 22:09:39 +01:00
arvidn 32f9dedd3a add new alert, oversized_file_alert, posted when an existing file in a torrent is found to have a greater size than the file according to the torrent file 2022-03-06 22:09:39 +01:00
arvidn 4b169ea7e6 add more asserts around mmap_disk_io shutdown 2022-02-21 16:36:43 +01:00
arvidn a45ead24b2 add write_through option to disk_io_write_mode, which will attempt to flush pieces to disk once they're validated (with msync). Also make disable_os_cache also flush write blocks and mark all cache blocks as cold 2022-02-17 12:16:11 +01:00
arvidn 50e118ac6f rename disk_io_job to mmap_disk_job 2022-02-07 11:17:43 +01:00
arvidn ee047cc494 fix integer narrowing warning 2021-08-28 14:14:40 +02:00
arvidn 9b957f6268 use user defined literal for piece_index_t in tests 2021-03-22 14:08:53 +01:00
arvidn de8e69a795 simplify tests by defining a user defined literal for file_index_t 2021-03-21 03:32:58 +01:00
arvidn d37a0eb0e8 remove unused function, file_size() 2021-02-05 01:40:15 +01:00
Arvid Norberg bf5bf0a92a fix warning in test_storage.cpp 2020-12-27 21:01:07 +01:00
arvidn e185832c74 merged RC_1_2 into RC_2_0 2020-12-20 20:56:22 +01:00
arvidn f4d58ae4b3 fix time_now_string to not use a global variable for the returned string 2020-12-19 23:59:07 +01:00
arvidn e910736d81 fix unaligned piece requests in mmap_storage 2020-11-29 14:40:01 +01:00
Arvid Norberg 14e334879b add wrapper around std::ofstream to simplify tests that creates files 2020-09-15 10:37:49 -07:00
arvidn 5935f63ead update copyrights 2020-09-01 05:14:17 -07:00
Arvid Norberg d47a814c6a fix type clash of status_t with system type on Haiku 2020-08-19 15:19:57 -07:00
arvidn 63f71a6443 merge RC_1_2 into RC_2_0 2020-06-15 02:44:40 +02:00
arvidn 5e40926ec4 disallow calling add_piece() during checking 2020-06-14 13:25:55 -07:00
Arvid Norberg 62f9a0ed74 make create_torrent fail rather than produce invalid torrents. By default, create a torrent corresponding to which hashes were set 2020-06-10 02:49:03 -07:00
Alden Torres 36dfac757a moved internal disk types and files to aux, minor cleanup 2020-03-26 01:29:49 -07:00
Arvid Norberg ef25f69070 rename disk_io_thread -> mmap_disk_io and storage -> mmap_storage 2019-12-10 08:44:53 +01:00
arvidn 3e47161820 move session_params into its own header/cpp pair 2019-11-30 21:40:01 +01:00
arvidn ea7ab336dd merged RC_1_2 into master 2019-09-02 00:57:19 +02:00
arvidn a3440e54bb make aux::session_settings thread-safe. this allows all threads to share the same settings object, which has low contention and is rarely updated 2019-09-01 03:41:36 +02:00
arvidn d3f7a363c2 update copyright year 2019-08-29 00:13:04 +02:00
Steven Siloti 1a7ccf240f generate v2 metadata 2019-08-10 09:28:38 -07:00
Steven Siloti 468dcb595b Add option to compute both v1 and v2 hashes in the same job
This simplifies cases where we want to compute both v1 and v2 hashes at
the piece level.
2019-08-10 09:28:38 -07:00
arvidn 17c293d592 factor out calculation of number of pieces for a file_storage into its own function 2019-08-10 09:28:38 -07:00
Arvid Norberg 9891119b9b support move_storage for posix_disk_io 2019-03-02 12:21:05 +01:00
arvidn 05351c2127 fix build with no mmap support 2019-02-23 01:41:46 +01:00
arvidn 9263496d5f merged RC_1_2 into master 2019-02-19 18:41:21 +01:00
arvidn 7f2a78d0c9 make random_shuffle() take a range instead of two iterators. use random_bytes() instead of std::generate() and random_byte(). Remove unused hasher.hpp includes 2019-02-19 01:48:08 +01:00
arvidn cff805e021 more io_service -> io_context fixes 2019-02-11 20:19:08 +01:00
arvidn b74aa8e94d use restart() instead of reset(), on io_context 2019-02-11 20:19:08 +01:00
arvidn d0e95ea698 replace io_service with io_context 2019-02-11 20:19:08 +01:00
arvidn a8979d1416 move disk_io_thread declaration into cpp file 2019-01-20 18:29:42 +01:00