Commit Graph

85 Commits

Author SHA1 Message Date
Arvid Norberg a0ecb10ef8 parameterize some tests over all disk I/O backends 2026-06-13 11:33:29 +02:00
Arvid Norberg e0c8defcf0 update tests in test_checking.cpp to use the new API 2026-06-11 12:20:10 +02:00
Arvid Norberg 20886c0a4c Merge branch 'RC_2_0' 2026-03-14 09:08:32 +01:00
Arvid Norberg 3d32713d50 preserve file priorities when force-recheck re-creates the piece picker 2026-03-11 22:53:21 +01:00
arvidn 77eb55f31e Transition resolving duplicate and invalid filenames to the new structure where torrent_info and file_storage are immutable and renamed files are recorded in a separate structure. 2025-07-15 17:45:39 +02:00
Arvid Norberg fe2041fbdd transition tests to use load_torrent_buffer() and load_torrent_file() 2025-02-07 10:33:48 +01:00
arvidn 5b449ffebd Merge branch 'RC_2_0' 2025-01-23 16:23:27 +01:00
Doekin 8aed49eff7 enhance test_checking with large files (to trigger mmap) 2025-01-20 17:16:04 +01:00
arvidn e65623b317 add a simpler overload to bencode() returning a vector<char> 2022-12-19 02:57:06 +01:00
arvidn 6dd1e88cb1 introduce new API for create_torrent, to phase out the use of file_storage for creating torrents. Having a double-use for it complicates things 2022-10-09 08:23:43 +02:00
arvidn 929713176b merged RC_2_0 into master 2022-09-15 15:00:34 +02:00
arvidn 74d82a0cd7 tweak pad file placement to match reference implementation (tail-padding) 2022-09-15 13:01:59 +02:00
arvidn 964ffc57ba merge RC_2_0 into master 2022-06-23 08:07:28 +02:00
arvidn 550d3c7d9f update copyright headers 2022-06-22 21:42:55 +02:00
arvidn 2db8b54c08 update copyright headers in source files 2021-06-13 21:04:55 +02:00
arvidn ebae801c09 merged RC_2_0 into master 2021-05-07 09:42:50 +02:00
arvidn fd05f3be90 fix issue creating and loading v2 torrents with empty files 2021-04-18 17:17:52 +02:00
arvidn 041d7cbc58 merged RC_2_0 into master 2020-09-19 00:47:01 +02:00
Arvid Norberg 14e334879b add wrapper around std::ofstream to simplify tests that creates files 2020-09-15 10:37:49 -07:00
arvidn 19e8c2f3ea remove full BSD license from all source files. reference LICENSE file in the root instead 2020-09-02 00:56:54 -07:00
arvidn 5935f63ead update copyrights 2020-09-01 05:14:17 -07:00
arvidn 6ea0273a63 improve randomness of port selection for web python script in tests, to minimize collisions and failed tests 2020-08-27 00:23:37 -07:00
arvidn 59dcae0e3d merged RC_1_2 into RC_2_0 2020-08-07 07:46:42 +02:00
arvidn 3ced76ecf1 allow overlong files again, when checking resume data. ignore files with priority 0 in verifying resume data, as those files may be in a partfile. add tests to cover those cases 2020-08-06 22:40:10 -07:00
arvidn 0b7ea81a28 add file_progress() overload that returns the vector 2020-06-13 07:28:37 -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
arvidn 2ce785cd28 fix checking files of v2-only torrent 2020-06-06 15:32:53 -07:00
Arvid Norberg 392d8366b0 prefer lt:: namespace over libtorrent::, in examples 2020-06-03 22:01:37 +02:00
arvidn 6e9f05ab9f restore info_hash() API and name the v2 API info_hashes() 2020-05-30 14:00:24 +02:00
arvidn d15eee1d09 make merkle_tree sparse 2020-05-24 21:02:10 +02: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 d3f7a363c2 update copyright year 2019-08-29 00:13:04 +02:00
Steven Siloti 86be4287d3 add info hash type 2019-08-10 09:28:38 -07:00
Steven Siloti 1a7ccf240f generate v2 metadata 2019-08-10 09:28:38 -07:00
arvidn 8305c40d6a make disk_interface the customization point for storage, rather than storage_interface
remove the disk cache
remove trim_cache disk job
remove zero-storage
mark default_storage_constructor as deprecated
remove storage_interface
remove file_pool and default_storage_constructor. update connection_tester to use disk_io_thread.
only ftruncate files once
optimize hashing, by running sha1 directly on the memory mapped file
use boost-multi_index in file_view_pool
remove flush_piece and flush_hashed, simplify job-fence logic, remove prep_read_job_impl
support noatime
split out mmap implementation into a .cpp file
support hashing of content in part files. wraps up new disk storage
remove flush_piece disk job
separate out store_buffer into its own class
pass session_settings into storage operations instead of assigning a pointer in the storage object
use unordered_map in store_buffer
add fopen-based disk io back-end for non-64 bit systems or systems without mmap
factor out open_mode_t into its own header
first stab at windows memory mapped files support
build all of boost for autotools
remove flag in async_read callback handler
remove old open_mode_t, preadv/readv and coalesce buffers
support sparse and no_cache file flags in mmap
Remove use of overlapped I/O because we're no longer doing any scatter/gather syscalls the use of overlapped is an unnecessary complication.
don't explicitly specify global read and write. On MINGW we need to use libtorrent::read and libtorrent::write instead of the MINGW provided ::read and ::write.

If the underlying file is empty then m_mapping is expected to be null.
It is the caller's responsibilty to notice that the region's size is
zero and not dereference it in that case.

Otherwise there is no good way for users of default_storage::open_file
to determine that the opened file is empty.
2019-01-20 18:29:42 +01:00
Arvid Norberg 0e49051f17 make create_random_files() take a span instead of pointer, length parameters 2018-06-11 01:35:31 +02:00
Arvid Norberg 1b62aff9d1 minor improvements to test_checking 2018-06-10 16:25:10 +02:00
arvidn fe612ca167 replace the TORRENT_CFG ABI check with inline namespaces around the symbol that can change ABI based on build configuration options 2018-05-13 19:25:17 +02:00
arvidn d080c6f532 merged RC_1_1 into master 2018-03-26 12:56:25 +02:00
d_komarov 1c867a5026 Changing file priorities while checking interrupts checking.
Also, if the last file has zero priority, checking is interrupted prematurely.
2018-03-26 02:59:10 +02:00
arvidn f8fb5c2294 merged RC_1_1 into master 2018-02-10 22:52:12 +01:00
arvidn a1860426b8 defer truncating existing files until the first time we write to them 2018-02-10 18:33:41 +01:00
Alden Torres 73a7050185 fixing warnings in tests code, part7 2018-01-30 12:34:53 +01:00
Alden Torres 070d1cd61f fixing warnings in tests code, part5 (#2736) 2018-01-28 00:56:21 +01:00
arvidn 865ff09a84 merge RC_1_1 into master 2017-08-10 16:44:57 +02:00
arvidn 378a0e974b fix issue of force-recheck or seeding from read-only media, torrents with empty files in them. Previously libtorrent would create empty files up-front unconditionally, now they won't be created if they already exist 2017-08-09 18:48:49 +02:00
arvidn 1f3730fa5a fix force-recheck issue (new files would not be picked up) 2017-08-06 09:49:51 +02:00
arvidn b38efb6c65 make alert category flags be a strong type 2017-07-26 07:20:47 -07:00
arvidn c4eb4c8b5f use span in torrent_info constructors and deprecate the redundant flags argument 2017-07-22 00:00:44 -07:00