Commit Graph

654 Commits

Author SHA1 Message Date
Arvid Norberg d6c8184381 support locking files 2011-06-09 06:08:24 +00:00
Arvid Norberg 7bea10a698 fixed unbuffered disk read/write 2011-06-07 08:18:51 +00:00
Arvid Norberg a73960aa5a support release asserts 2011-05-08 09:04:59 +00:00
Arvid Norberg 56364cc9c7 disable hash checks fix 2011-05-05 04:02:10 +00:00
Arvid Norberg 4fcb26c8ad revert file_too_short error message, since it breaks checking 2011-04-28 04:31:45 +00:00
Arvid Norberg 5811e9eef8 small hint_read issue 2011-04-26 08:08:54 +00:00
Arvid Norberg e389f5963d added support for fadvise/F_RDADVISE for improved disk read performance 2011-04-26 07:03:05 +00:00
Arvid Norberg 29ce1a3704 improve file_too_short error message 2011-04-25 06:02:19 +00:00
Arvid Norberg caed433cc7 make it possible to derive from default_storage class 2011-04-16 22:58:11 +00:00
Arvid Norberg 1b6227ad31 report disk read-back when verifying piece hashes 2011-03-20 01:19:14 +00:00
Arvid Norberg 6db11079c8 add performance warning when disk write queue exceeds half of the write cache size 2011-03-16 07:45:51 +00:00
Arvid Norberg f7576714bf fixed some build warnings 2011-02-24 18:47:02 +00:00
Arvid Norberg 47822c27fe fixed typo in storage 2011-02-24 18:01:32 +00:00
Arvid Norberg 97a40a45cd fully support unbuffered I/O 2011-02-22 02:53:26 +00:00
Arvid Norberg 141ada013f fixed a whole bunch of build warnings on gcc and msvc, along with some fixes discovered along the way 2011-02-21 05:24:41 +00:00
Arvid Norberg c4c1773ceb fixed some warnings 2011-02-15 10:05:25 +00:00
Arvid Norberg 8bb71da401 disk write queue watermark fix 2011-02-13 22:27:02 +00:00
Arvid Norberg 8e8b0495e1 don't leak non-fatal errors out of storage::initialize 2011-02-13 01:16:06 +00:00
Arvid Norberg d35b0a8a7b one more storage initialization fix 2011-02-12 22:48:21 +00:00
Arvid Norberg 9915d72e4c fixed typo in storage allocation. would exit early on non fatal error 2011-02-12 22:11:00 +00:00
Arvid Norberg 7f91b8174e create missing directories on the fly 2011-02-12 22:00:08 +00:00
Arvid Norberg 1088c5aa6f fixed typo in storage 2011-02-09 08:20:51 +00:00
Arvid Norberg ed8779a338 added option to not recheck on missing or incomplete resume data 2011-02-06 00:50:12 +00:00
Arvid Norberg 3e4634097d mapped file resume data fixes 2011-01-31 00:47:09 +00:00
Arvid Norberg c6c7ed16f6 added TODO comments 2011-01-20 06:17:27 +00:00
Arvid Norberg 99d2c4eea8 storage initialize fix 2011-01-19 09:19:26 +00:00
Arvid Norberg 557ddca693 fixed bug when remapping files 2011-01-19 08:42:17 +00:00
Arvid Norberg 59a7ee73dc fixed file allocation bug when existing files are larger than they're supposed to be 2011-01-19 07:39:55 +00:00
Arvid Norberg d301890d78 fixed edge case of pad file support 2010-12-13 16:47:12 +00:00
Arvid Norberg 2e69366b02 reverted part of the file_storage API to match the previous one more closly 2010-11-29 05:44:29 +00:00
Arvid Norberg e5f980d80d merged uTP branch into trunk (yay) 2010-11-29 01:33:05 +00:00
Arvid Norberg 894db973e8 optimized memory usage of torrent_info and file_storage 2010-11-24 23:49:22 +00:00
Arvid Norberg 2353cc8ec2 assert we don't ask for physical offset of a pad file 2010-11-14 08:17:27 +00:00
Arvid Norberg 0773644a4e fixed web seed test to work with invariant checks turned on and fixed error reporting when receiving an unexpected responce for http seeds 2010-10-30 19:45:50 +00:00
Arvid Norberg 4b6a73417d fixed error reporting issue in disk I/O thread 2010-10-18 07:38:14 +00:00
Arvid Norberg 554e329f57 remove udp_socket mutex 2010-09-25 21:39:27 +00:00
Arvid Norberg b7b542f587 optimized file_pool lookups and string handling 2010-08-23 08:48:02 +00:00
Arvid Norberg 2736a3b7ff fixed file checking bug 2010-08-23 05:51:12 +00:00
Arvid Norberg 7c5ca7712a fixed bug on windows when verifying resume data for a torrent where one of its directories had been removed 2010-07-24 07:06:45 +00:00
Arvid Norberg beafa4f3e0 add some more potential error codes that should cause the torrent check to skip the file 2010-07-15 01:32:59 +00:00
Arvid Norberg 97afe3fca8 added option to set file priorities when adding torrents 2010-07-15 01:14:36 +00:00
Arvid Norberg dce2edb6cc fixed vs 2010 build 2010-04-30 19:08:16 +00:00
Arvid Norberg 62eef91338 added setting to ignore file modification time when loading resume files 2010-04-11 21:02:43 +00:00
Arvid Norberg 247bd9256d fixed bug in fallocate usage and avoid trying to allocate and truncate files that don't need it to not update their modification time for no good reason 2010-03-06 20:09:18 +00:00
Arvid Norberg 1b2798970c support O_NOATIME on linux and use it by default 2010-02-02 19:44:52 +00:00
Arvid Norberg 5b747f58f7 add guided read cache and update tuning docs 2010-01-31 19:14:00 +00:00
Arvid Norberg da89e1b2ee indentation fix 2010-01-17 07:39:07 +00:00
Arvid Norberg c9b594fde1 support sending suggest messages based on what's in the read cache. support 'explicit read cache' 2010-01-15 16:45:42 +00:00
Arvid Norberg d498c129ab clear sparse flag on files that complete on windows 2010-01-09 18:40:05 +00:00
Arvid Norberg ac8f64f5fe fixed deadlock in piece_manager 2009-12-25 16:02:45 +00:00
Arvid Norberg df2f2570c2 factor out page size function and make aligned allocator configurable to use posix_memalign and memalign 2009-12-09 01:55:30 +00:00
Arvid Norberg 1f5859d31f error_code fix. added is_error_code_enum template specialization and using the abbreviated syntax to build error_codes 2009-11-29 07:06:38 +00:00
Arvid Norberg 1d6d11bf0c storage fix 2009-11-28 08:58:07 +00:00
Arvid Norberg 6343fe6a6d optimized header dependencies to lower build time 2009-11-23 08:38:50 +00:00
Arvid Norberg c418165e07 replaced boost.filesystem with custom functions (improves efficiency and drops unnecessary dependencies and improves libtorrent portability) 2009-10-26 01:29:39 +00:00
Arvid Norberg 8a5b7d5d36 got rid of the last recursive mutexes. abstracted the threading primitives (and switched over to use asio's internal ones). 2009-10-20 02:49:56 +00:00
Arvid Norberg fdb3b355ad fixed incorrect error when deleting files from a torrent where not all files have been created 2009-10-08 18:21:13 +00:00
Arvid Norberg 562450f545 more storage::hash_for_slot fixes 2009-09-05 16:32:54 +00:00
Arvid Norberg 8273d67a42 fixed bug in storage::hash_for_slot 2009-09-05 14:20:00 +00:00
Arvid Norberg bec481acdf improved disk read performance and fixed bug in storage_interface's backwards compatibility functions 2009-09-05 07:21:10 +00:00
Arvid Norberg 1f5a722b01 improved sun studio support (it seems to lack a lot of stl) 2009-08-30 07:38:52 +00:00
Arvid Norberg 6078dd06b0 removed the last dependency on iostream and lexical cast 2009-08-25 18:13:46 +00:00
Arvid Norberg 4cfc97f396 added limewire to projects page and fixed some documentation typos 2009-08-05 02:31:57 +00:00
Arvid Norberg 63368c1383 added dummy storage class to disable disk I/O and an option to disable hash checking (for performance testing and simulation) 2009-08-02 06:40:45 +00:00
Arvid Norberg ecdd7231b8 removed redundant code in disk_io_thread 2009-07-21 04:32:27 +00:00
Arvid Norberg e9bd8f6e1f turned fast-resume errors into error_codes. fixed typo in documentation 2009-06-28 00:36:41 +00:00
Arvid Norberg b6b4e0d051 fix wpath build issue 2009-06-24 17:05:14 +00:00
Arvid Norberg 7eb7dfdf17 fixed rename_file 2009-06-24 09:09:35 +00:00
Arvid Norberg 3e3c60b1ca fixed support for non-utf8 codepages 2009-06-23 02:49:57 +00:00
Arvid Norberg cc3e6621ed fixed rename_file() bug where the new name would not be saved in the resume data in some cases 2009-06-22 00:52:57 +00:00
Arvid Norberg 8f47ba50f1 hash_for_slot fix 2009-06-14 22:50:35 +00:00
Arvid Norberg 62a7946968 disk stats fix 2009-06-14 22:20:23 +00:00
Arvid Norberg f0134c1b11 improved disk error handling and expanded use of error_code in error reporting 2009-06-10 08:30:55 +00:00
Arvid Norberg bd33814376 improve disk error handling 2009-05-31 22:41:53 +00:00
Arvid Norberg b2c5d8a563 include the piece index that failed in disk errors 2009-05-31 19:44:56 +00:00
Daniel Wallin bcfe8cbf2d Fix #ifdef typo. 2009-05-26 18:20:32 +00:00
Arvid Norberg 5fbff8e060 fixed a bug when checking a torrent twice 2009-05-23 15:58:32 +00:00
Arvid Norberg e36ea4ba5d added instrumentation for disk access. Useful to benchmark disk cache performance 2009-05-23 03:03:52 +00:00
Arvid Norberg cb9c3cb37d memory optimization for checking torrents 2009-05-21 16:15:05 +00:00
Arvid Norberg a2668d9b1b optimized memory usage when checking files fails 2009-05-16 02:25:28 +00:00
Arvid Norberg 9523d88909 made file_pool use std::map instead of multi-index, and use std::string::operator< instead of the quite inefficient filesystem::path::operator< 2009-05-09 21:11:25 +00:00
Arvid Norberg f2ec6b5adb added option to use a single block buffer when hashing, instead of for the entire piece 2009-05-03 19:09:06 +00:00
Arvid Norberg 4421ccf11c fixed missed spot in safe_convert -> convert_to_wstring rename 2009-04-24 08:33:23 +00:00
Arvid Norberg fb5ef271cd storage fix for locale dependent filename encoding 2009-04-13 01:03:33 +00:00
Arvid Norberg c3dce7c91b fixed typo 2009-04-12 21:07:17 +00:00
Arvid Norberg 3426385226 improve error reporting for boost-1.34 and fix boost-1.34 compatibility 2009-04-12 18:04:20 +00:00
Arvid Norberg efbb3a5861 removed debug logging 2009-04-10 08:21:10 +00:00
Arvid Norberg a051228069 fixed bug in storage when forcing recheck while renaming a file or moving it 2009-04-10 07:22:27 +00:00
Arvid Norberg 6219c2e36c fixed padding file and resume data bug 2009-04-09 17:36:05 +00:00
Arvid Norberg aba5b2e9d0 dropped some iostream dependencies 2009-04-04 09:52:25 +00:00
Arvid Norberg 3499913c59 storage compact mode resume data fix 2009-03-31 08:20:34 +00:00
Arvid Norberg c6017f9366 reverted bug introduced a few check-ins ago. Fixed case when recursive_copy fails (don't remove the original files). Cleaned up callback dispatching in disk_io_thread in trunk. Improved unit tests for move_storage 2009-03-31 08:05:46 +00:00
Arvid Norberg 643be6c44b fixed issue where renamed files would sometimes not be saved in the resume data 2009-03-22 22:21:48 +00:00
Arvid Norberg 1cdfe26630 Fixed bug when moving storage with files renamed to end up outside of the rood directory. Fixes Deluge bug http://dev.deluge-torrent.org/ticket/839 2009-03-17 09:31:30 +00:00
Arvid Norberg b809028bda uses iconv by default on linux to convert filenames from utf-8 to the current locale 2009-03-01 00:02:33 +00:00
Arvid Norberg fbc6910335 fix cast issue on 64-bit platforms 2009-02-22 20:18:42 +00:00
Arvid Norberg d728af10a2 fix 64-bit cast issue 2009-02-21 18:02:12 +00:00
Arvid Norberg 13ca386838 improved support for sparse files on windows 2009-02-17 00:11:38 +00:00
Arvid Norberg 75efebac1e allocate files on unix when allocate storage mode is used 2009-02-16 00:42:44 +00:00
Arvid Norberg 9905f700ae prepare to take sparse regions into account when checking files 2009-02-14 04:31:08 +00:00
Arvid Norberg dc4d50b117 don't make files sparse when allocation mode is set on the storage (windows only) 2009-02-14 03:56:07 +00:00
Arvid Norberg 1ac8f806fa added seed mode support (lazy hash checking) 2009-02-03 07:46:24 +00:00
Arvid Norberg b3a17b1787 added disk buffer instrumentation and log parser 2009-01-23 09:13:31 +00:00
Arvid Norberg 00808473e7 factor out disk_buffer_pool from disk_io_thread. refactored the file open modes to be platform independent. gave the disk_io_thread its own copy of session_settings that it shares with storage. added an unaligned_read implementation to storage. Added options to session_settings on when to open files in unbuffered mode. Added unit tests for unaligned reads 2009-01-21 07:31:49 +00:00
Arvid Norberg ae1fa3c1b5 linux file fixes 2009-01-17 09:37:40 +00:00
Arvid Norberg 5b551c1761 merged storage::readv() and storage::writev() 2009-01-17 08:35:48 +00:00
Arvid Norberg b9d7538ba8 fixed storage to generate a proper error when the read operation 2009-01-14 03:05:35 +00:00
Arvid Norberg 0bb330225c another storage fix 2009-01-13 08:58:35 +00:00
Arvid Norberg 2a19a52465 fix incorrect buffer handling with pad files 2009-01-12 18:08:18 +00:00
Arvid Norberg eea890de11 added support for generating torrent files with padding files in them 2009-01-11 10:32:57 +00:00
Arvid Norberg 7592ad4aee updated disk IO to support unbuffered files 2009-01-11 02:02:34 +00:00
Arvid Norberg f1d229aae6 first pass of replacing coalesce writes and reads by writev and readv (no windows support yet) 2009-01-03 08:11:31 +00:00
Arvid Norberg eb1de9d9eb fixed potential problem in storage where it sometimes checks files without first initializing 2008-12-13 03:32:57 +00:00
Arvid Norberg ef8234efc5 fixed preprocessor defines using UNICODE instead of TORRENT_USE_WPATH. Removed old boost.filesystem replacement code to support boost 1.33 2008-12-09 03:45:58 +00:00
Arvid Norberg 09b3a865ef fixed compiler flags in pkg-config file and made header files not depend on the NDEBUG define 2008-11-29 21:33:21 +00:00
Arvid Norberg 357d548bb5 fixed boost.filesystem usage to not rely on deprecated functions 2008-11-21 23:38:07 +00:00
Arvid Norberg f503bbfe86 fix for when aborting torrents that are being checked. Fix in client_test when removing torrents that are checking. 2008-11-17 01:19:46 +00:00
Arvid Norberg de93105d51 pad file fix 2008-11-16 23:33:59 +00:00
Arvid Norberg 7e4d5dc72f avoid exception from boost.filesystem 2008-11-14 23:23:02 +00:00
Arvid Norberg 40946162b3 avoid exceptions from boost.filesystem 2008-11-14 21:35:21 +00:00
Arvid Norberg 03398e94b0 replaced utf8 conversion with code from unicode.org 2008-11-13 06:39:08 +00:00
Arvid Norberg afb6b55b8f fixed typo in safe_convert call 2008-10-30 17:04:59 +00:00
Arvid Norberg d6a8c28d9c storage cleanup and truncating files that are larger than they should be 2008-10-30 06:09:23 +00:00
Arvid Norberg 829a5a9e25 removed debug output to stderr 2008-10-30 02:33:58 +00:00
Arvid Norberg 535f668c5d simplified the file interface 2008-10-19 05:03:17 +00:00
Arvid Norberg c0df461296 relaxed file timestamp requirements to work better with FAT volumes 2008-10-15 20:19:03 +00:00
Arvid Norberg ef48097421 fix for #389 2008-10-12 20:36:22 +00:00
Arvid Norberg 8e206c7d0d attempt to fix bug in storage on windows where ENOENT was not properly caught 2008-10-07 09:24:30 +00:00
Arvid Norberg 3d3a8cca6b fixed std::max usage in storage (fixes msvc build) 2008-10-07 05:53:38 +00:00
Arvid Norberg d4c206841b added support for bitcomet padding files. simplified storage read/write code. 2008-10-03 05:49:41 +00:00
Arvid Norberg ba28449765 rename_file now creates missing directories before renaming 2008-09-30 23:55:45 +00:00
Arvid Norberg ef42e8f77c fixed rename_file to work when the file hasn't been created yet. Fixed error reporting when rename_file fails. Updates the file in the torrent_handle when filename is updated 2008-09-30 23:37:42 +00:00
Arvid Norberg 317d97b316 config fix for unicode builds on windows 2008-09-27 19:49:31 +00:00
Arvid Norberg 97f107a7fd fixed bug in verify_fast_resume. Fixes #397 2008-09-20 06:02:40 +00:00
Arvid Norberg a533bf817c properly reports disk io errors when hashing pieces. made the partial_hash.log easier to enable/disable 2008-09-16 23:32:27 +00:00
Arvid Norberg b72badd1b1 added test for checking files when some files are missing 2008-08-20 08:07:31 +00:00
Arvid Norberg 9bae670ac7 fix build with boost-1.36 2008-08-16 21:11:27 +00:00
Arvid Norberg b32aa520c2 delete_files bug fix 2008-07-20 17:38:59 +00:00
Arvid Norberg c605c8021f added file priority functions 2008-07-20 16:00:08 +00:00
Arvid Norberg 8c91fff1d6 saves torrent settings in resume data (up/down rate limits, max connections, upload slots, paused state, auto managed, piece priorities, renamed files) 2008-07-19 11:12:40 +00:00
Arvid Norberg 21dff61cb5 clears read cache when paused. Saves memory 2008-07-18 15:31:22 +00:00
Arvid Norberg db4001e406 fixed file checking bug where the files on disk wouldn't even be inspected 2008-07-18 13:51:26 +00:00
Arvid Norberg 3cb1369385 improved error reporting of file errors (uses boost.system's error_code). Now permission errors are properly reported when checking files 2008-07-17 23:41:46 +00:00
Arvid Norberg 9c84908bb9 switched resume data parsing over to use lazy_bdecode. Improves memory allocation performance, especially noticable when heap allocations are expensive. Makes it more practical to run with malloc debug. Changed resume data interface to take a vector as opposed to a parsed structure 2008-06-30 23:14:31 +00:00
cg25 ff3e80c42f Removed svn:executable property from {c,h}pp files in branches/RC_0_13 and
trunk.
2008-06-25 14:15:21 +00:00
Arvid Norberg 9447693202 storage fastresume fix 2008-06-23 18:31:52 +00:00
Arvid Norberg 811d0a6250 storage fast resume check fix 2008-06-22 23:41:03 +00:00
Arvid Norberg 3e000a3984 fixed save path updates when moving torrents. Fixes #310 2008-06-15 20:52:46 +00:00
Arvid Norberg d47ec46e76 storage wpath fix (for unicode) 2008-06-12 04:52:37 +00:00
Arvid Norberg 59c8a74ba8 in case a regular rename fails, try to copy the storage to the new location. Fixes #231 2008-06-05 16:56:39 +00:00
Arvid Norberg 4709d202e1 fixed unicode issue in storage 2008-06-04 07:57:07 +00:00
Arvid Norberg 3910fe78de separated file_storage from torrent_info and create_torrent 2008-05-28 08:44:40 +00:00
Arvid Norberg ed3cf2bb54 fixed typo 2008-05-15 16:57:35 +00:00
Arvid Norberg 8909aeaadc attempt to fix removal of files on windows with unicode (to fix #216) 2008-05-15 16:38:04 +00:00
Arvid Norberg 91d6099a55 fixed issue with torrents with 0 pieces. Fixes #306 2008-05-15 02:29:26 +00:00
Arvid Norberg d15573ecc2 disk receive buffer cleanup 2008-05-05 06:25:22 +00:00
Arvid Norberg 3fea2080fd added an asynchronous save_resume_data to make it easier to synchronize with the disk IO thread 2008-04-13 18:54:36 +00:00
Arvid Norberg d4cfa126aa storage fixes 2008-04-12 22:08:07 +00:00
Arvid Norberg 093d912e9a receive buffer optimization. added receive_buffer_size and used_receive_buffer to peer_info. changed plugin api to make use of new disk_buffer_holder type 2008-04-10 10:03:23 +00:00
Arvid Norberg 5f35d170b0 disk io thread cleanup (all read operations are now read into disk buffers, no custom buffers) 2008-04-10 09:11:54 +00:00
Arvid Norberg 642768bc24 storage cleanup 2008-04-09 01:11:16 +00:00
Arvid Norberg f40eba34a8 exception fixes in storage 2008-04-07 01:45:33 +00:00
Arvid Norberg 35fd9aec61 msvc build fixes and warning fixes 2008-04-05 21:18:27 +00:00
Arvid Norberg 95f1601aa2 storage fix 2008-03-31 03:26:37 +00:00
Arvid Norberg d5d450b483 storage fix 2008-03-25 04:45:46 +00:00
Arvid Norberg 5860ca8706 previous checkin was a mistake 2008-03-25 04:44:30 +00:00
Arvid Norberg b6be33b5b6 storage fix 2008-03-25 04:38:59 +00:00
Arvid Norberg 9eeb3cea9d fast resume data check fix 2008-03-16 18:24:57 +00:00
Arvid Norberg e5072b80f5 fixed file checking bug in trunk 2008-03-16 12:42:59 +00:00
Arvid Norberg 2cfbfd203f made tests build and pass in trunk. fixed issues in trunk revealed by the tests. fixed failing torrent invariant check in trunk and rc0.13 2008-03-14 10:17:27 +00:00
Arvid Norberg f53cfa7eeb removed checker thread 2008-03-08 06:06:31 +00:00
Arvid Norberg a25c25b02a fixed windows build and removed msvc warnings 2008-02-25 10:28:53 +00:00
Arvid Norberg 8a14f829b4 removed debug output 2008-02-25 08:42:13 +00:00
Arvid Norberg c1c2fb4409 resume data unit test and fix 2008-02-25 05:07:29 +00:00
Arvid Norberg 9f44c577d7 updated file_win and file_pool error handling 2008-02-25 04:41:21 +00:00
Arvid Norberg 682a5f85f9 fixed crash bug in storage 2008-02-22 06:09:30 +00:00
Arvid Norberg 333839c9b4 piece picker update 2008-02-18 03:07:14 +00:00
Arvid Norberg 7e83c3fc51 changed storage interface to not require exceptions 2008-02-14 03:48:20 +00:00
Arvid Norberg 388949014f handles (ignores) errors when allocating files 2008-01-11 20:04:38 +00:00
Arvid Norberg 1d6e0f5bf6 bandwidth request block size optimization 2008-01-07 04:47:20 +00:00
Arvid Norberg 769d8aefe2 first version of 'part file' support. Can currently only be set when starting torrent 2007-11-25 10:47:05 +00:00
Arvid Norberg 50eb3c62c8 fixed typo from [1728] 2007-11-16 19:38:58 +00:00
Arvid Norberg 2ea9fb2851 improved error handling when deleting files 2007-11-16 19:04:43 +00:00
Arvid Norberg 0439399169 replaced std::vector with buffer 2007-10-30 17:30:49 +00:00
Arvid Norberg eea82821d2 fixed missing initialization in piece_manager 2007-10-30 06:50:08 +00:00
Arvid Norberg 31e5716b03 fixed #186 and added a better test 2007-10-21 00:19:37 +00:00
Arvid Norberg db133610e1 fixes #182 2007-10-13 07:54:18 +00:00
Arvid Norberg 59c7f5bfbb added option to delete files from disk as a torrent is removed 2007-10-13 03:33:33 +00:00
Arvid Norberg 0681d3fd61 fixed another fast resume bug 2007-10-09 07:26:57 +00:00
Arvid Norberg ffe2e75882 added another alert to cover all cases where the torrent has to be checked at start, and tell the user why. Fixed a problem with the resume data generation introduced in last storage check-in 2007-10-09 00:25:01 +00:00
Arvid Norberg 4d19f7ff0f storage optimization. introduced a nother allocation mode: sparse. Now there is allocate, compact and sparse. Unless compact is used, the memory structures used to keep track of pieces are no longer allocated. sparse storage mode is now the default 2007-10-08 20:01:36 +00:00
Arvid Norberg a8a74c3513 fixes files that were left open in write mode by mistake 2007-10-07 01:29:38 +00:00
Arvid Norberg 966800cd5b replaced the assert macro to TORRENT_ASSERT instead of hi-jacking assert. 2007-10-05 00:30:00 +00:00
Arvid Norberg c9267431b9 fixed bug in storage 2007-10-03 18:27:07 +00:00
Arvid Norberg b48948e231 changed the double send buffers to a chained buffer using iovec send operations. buffers are recycled (saves memory and cpu) and memory copies are avoided (saves cpu). More statistics is added to track buffer usage 2007-09-29 16:14:03 +00:00
Arvid Norberg fd3da79c6c fixed problems introduced in previous debugging session 2007-09-20 01:03:31 +00:00
Arvid Norberg e4265d1a56 removed debug output from previous check-in 2007-09-20 00:33:40 +00:00
Arvid Norberg 338eedf961 added storage assert, fixed policy assert 2007-09-19 19:55:11 +00:00
Arvid Norberg 9364a2d01d added priority to disk io jobs 2007-09-16 01:34:06 +00:00
Arvid Norberg 94f5b93d21 made it possible to pass in custom buffers to piece_manager::async_read, increased the maximum buffer size on bottled http_requests 2007-09-11 17:45:20 +00:00
unsh 214dfa9427 made storage.cpp build on FreeBSD, updated Makefile.am 2007-09-10 13:46:08 +00:00
Arvid Norberg c8088459a0 made torrent_info reference counted and held by a boost::intrusive_ptr 2007-09-01 03:00:31 +00:00
Arvid Norberg 2b0197e810 initial fix to enable mapping files in torrents to other files on disk. see torrent_info::remap_files 2007-08-25 18:26:43 +00:00
Arvid Norberg 7f43389f56 removed unused class from storage 2007-08-25 14:51:42 +00:00
Arvid Norberg b05500570c added parenthesis around std::min and std::max for msvc compatibility 2007-08-16 22:14:17 +00:00
Arvid Norberg 11b63bc93e storage fix 2007-08-10 02:04:26 +00:00
Arvid Norberg b3e29ba8fa added freebsd to the linux path for detecting sparse files support 2007-08-08 23:08:55 +00:00
Arvid Norberg 61f713d24a fixed #107 2007-08-07 07:19:35 +00:00
Arvid Norberg 8387240b31 more asserts, piece_picker fixes, debug-iterator fixes 2007-08-03 06:13:26 +00:00
Arvid Norberg 245793b7a3 applied patch in #79 2007-07-15 05:34:28 +00:00
Arvid Norberg 5e08a9b379 added reiser4 as having sparse files support and improved detection on mac 2007-07-09 23:29:58 +00:00
Arvid Norberg 7e7686b44f fixed typo 2007-06-18 17:15:33 +00:00
Arvid Norberg b75a69cd47 added alerts for synchronizing disk io when pausing and moving storage 2007-06-11 21:24:14 +00:00
Arvid Norberg 07c8d1242e windows unicode fixes when using boost-1.34 and fix for test_swarm when building without encryption support 2007-06-11 19:01:25 +00:00
Arvid Norberg 3b8670626a merged back async_io branch into trunk 2007-06-10 20:46:09 +00:00
Arvid Norberg 08965f331c removed debug output from storage 2007-06-01 23:27:49 +00:00
Arvid Norberg aea4e503c5 more storage state machine fixes, added test to storage unit test and fix in file::set_size 2007-05-31 23:35:48 +00:00
Arvid Norberg 8f4c460587 fixes to storage state machine 2007-05-31 21:48:36 +00:00
Arvid Norberg 5f7dd474e9 fixes to storage full allocation mode 2007-05-30 22:23:17 +00:00
Arvid Norberg 71fe036b78 removed leftover debug print 2007-05-24 19:00:28 +00:00
Arvid Norberg 510966f2a5 fixed fast resume data bug when using full allocation mode, and moved parts of resume data generation to the storage 2007-05-24 18:53:55 +00:00
Arvid Norberg e9601080bb introduced swap_slots and swap_slots3 on storage_interface. All reads that needs it, should now be EOF safe (when using sparse files). 2007-05-16 01:16:08 +00:00
Arvid Norberg bf25aa0d1c allocate slots bug fix in storage. Introduced with sparse files 2007-05-13 00:25:29 +00:00
Arvid Norberg 734305f78d small modification to linux path for discover sparse files support 2007-05-12 21:21:59 +00:00
Arvid Norberg d95ddde3f2 more storage fixes for problems related to sparse files support 2007-05-09 20:16:18 +00:00
Arvid Norberg 4956639171 piece picker optimization 2007-05-08 11:13:13 +00:00
Arvid Norberg c39462c125 fixed another sparse files related bug in storage 2007-05-04 03:28:42 +00:00
Arvid Norberg 13bcb48dba fixed warnings and removed unused variables 2007-05-02 18:45:29 +00:00
Arvid Norberg 233cd373e8 fixed issue with sparse files and compact allocation. added move_slot() to the storage abstraction 2007-04-30 01:06:29 +00:00
Arvid Norberg 219db47776 fixed boost version test in storage 2007-04-19 16:22:13 +00:00
Arvid Norberg 172205d7fb improvements and fixes to sparse files support. made the test pass again 2007-04-19 03:32:20 +00:00
Arvid Norberg 92cf13c2c2 sparse files fixes. now sets the size of the files in case sparse files are supported 2007-04-19 03:06:15 +00:00
Arvid Norberg 9551e68074 fixes in file_win and removed debugging output from storage 2007-04-18 20:00:58 +00:00
Arvid Norberg 88d6f7a4c9 added character-set build feature (only effective on windows). Made storage build with win32/unicode and newer versions of boost. optimized allocate_slots 2007-04-18 19:12:30 +00:00
Arvid Norberg 4c8e8470cd storage fix for unicode on windows 2007-04-18 16:48:24 +00:00
Arvid Norberg c639399b84 fixed typo in windows code 2007-04-18 00:48:31 +00:00
Arvid Norberg af779b6349 factored out the test for sparse files support 2007-04-18 00:36:09 +00:00
Arvid Norberg 16e17f066c first stab at sparse files support 2007-04-17 21:54:40 +00:00
Arvid Norberg d88ffcc0e4 removed some more unecessary boost.date_time dependencies 2007-04-10 07:52:58 +00:00
Arvid Norberg 7a30b397f8 made test_storage build and fixed bug introduced when storage was turned into a customization point 2007-04-02 05:46:19 +00:00
Arvid Norberg c9fac1efa0 storage did not properly skip incomplete files when doing full checks 2007-03-30 20:22:07 +00:00
Arvid Norberg 72fd437ff0 moved the resume data verification to the storage, since the storage may map the files differently. The creation of resume data should probably also be moved there 2007-03-27 23:49:05 +00:00
Arvid Norberg 8957b64c04 prepared for precompiled headers support. fixed issue where storage didn't lock the session properly. fixed typo in natpmp.cpp 2007-03-17 17:15:16 +00:00
Arvid Norberg 029953c5ae made the storage into a customization point. it is now interchangable for a custom implementation 2007-03-16 05:29:23 +00:00
Arvid Norberg bb0b8c9d95 improved unit test for storage, modified move_storage to hopefully fix a bug. updated Changelog. 2007-02-25 21:11:29 +00:00
Arvid Norberg 10068634f8 fix for typo in previous checkin 2007-02-25 09:44:08 +00:00
Arvid Norberg 7888b72e12 fix for crashes when stopping or restarting DHT 2007-02-25 09:42:43 +00:00
Arvid Norberg de37f48179 fixed bug where multi-file torrents with just a single file in left directories after storage::move_storage was called 2007-02-21 22:49:01 +00:00
Arvid Norberg 4f86042b97 bandwidth management fix + improved string conversion fallback in case strings are incorrect in torrent 2007-02-19 23:06:20 +00:00
Arvid Norberg 0019e9a2fb fixed illegal iterator dereference 2007-02-05 17:10:34 +00:00
Arvid Norberg 01f1d01d58 improved logging, fixed option to allow multiple connections from the same IP 2006-11-15 21:39:58 +00:00
Arvid Norberg 51e3261dd0 the file pool has been moved to the session and its size can be controlled via session_settings. Added untested option to allow multiple connections from the same IP. 2006-11-14 15:53:38 +00:00
Arvid Norberg 247b8ae443 removed temporary assert and factored file_pool out of storage to prepare for a per session file pool 2006-11-14 13:36:10 +00:00
Arvid Norberg f0519e86e8 separated session from session_impl and made a real pimpl-class of it. Introduced the possibility to destruct the sessions async. 2006-10-11 14:02:21 +00:00
Arvid Norberg 80dc56d388 fixed crashing bug when removing torrents while checking 2006-09-24 11:22:25 +00:00
Arvid Norberg 87eb377b17 fixed incorrect asserts in storage (that were triggered by torrent with zero-size files). Fixed bug in resource distribution algorithm. Made an attempt to avoid an assert in msvc standard library caused by passing a non-printable character to isdigit(). 2006-08-10 19:18:11 +00:00
Arvid Norberg 00df2b5bc3 added build notes for vs.net 2005, removed old code from ip_filter.cpp, fixed problem where the stats could become incorrect in case of very high cpu load, added asserts in storage::read() to make sure one is not trying to read out of bounds. 2006-07-26 10:21:25 +00:00
Arvid Norberg 4403eac97b fixed bugs reported by Massaroddel. Tracker request peer-count could be incorrect. Empty files were not created in full allocation mode. 2006-07-08 19:41:39 +00:00
Arvid Norberg db4ca12c02 fixed a full-check bug in storage. Changed the asio includes to avoid require boost.regex headers 2006-06-24 14:15:11 +00:00
Arvid Norberg 41810b1166 merged back the asio development branch 2006-04-25 21:04:48 +00:00
Arvid Norberg 01820e5579 more patches in order to get it to build on vc7 2006-01-08 22:55:02 +00:00
Arvid Norberg bad06d0c4e fixed adl usage to work with vc7 and removed inclusion of lambda header, to make it build in vc7 2006-01-07 15:41:20 +00:00
Arvid Norberg 3f36dd0395 added the ability to build libtorrent as a shared library. Fixed bugs with deleting of incomplete types (replaced auto_ptr with scoped_ptr). Made the string converter fall back on windows local code page if utf-8 decoding failed. 2005-11-01 18:30:39 +00:00
Arvid Norberg 9d426441f1 more fixes for the windows file_size function 2005-10-17 21:09:42 +00:00
Arvid Norberg c84a71c1ad *** empty log message *** 2005-10-17 21:00:57 +00:00
Arvid Norberg ac2c1fba0c fixed incorrect function name 2005-10-17 20:58:37 +00:00
Arvid Norberg 51052fa2b1 fixed incorrect assert in file_win.cpp, added windows-unicode function for file_size 2005-10-17 20:37:40 +00:00
Arvid Norberg d3996ccfb9 added metadata_failed_alert and allcoating torrent state 2005-10-17 13:45:53 +00:00
Arvid Norberg f770d1438d fixed bug introduced in latest storage changes (triggered when using metadata extension). improved commandline switches to client_test 2005-10-16 09:15:46 +00:00
Arvid Norberg 189a8756ee big change in the way storage is checked. The checker thread can now check the fastresume data of a new torrent without waiting for a currently checking one 2005-10-13 07:59:05 +00:00
Arvid Norberg 6d66566298 fixed problem with file pool when files were opened with 0 as info hash and attempted to close with the correct one. the info hash is no longer used as the key in the file pool. Also updated Makefile.am to include the buffer.hpp and .cpp and to include the storage unit test 2005-09-28 21:46:35 +00:00
Arvid Norberg f824714b0e added a test for storage and fixed a bug in piece checking 2005-09-11 09:48:05 +00:00
Arvid Norberg a15f589341 fixed problem in piece_picker with filtered files, also optimzed it somewhat. Added more logging and added one test to the piece_picker test 2005-09-01 21:04:21 +00:00
Arvid Norberg df4466cb86 made it build on cygwin 2005-08-18 11:20:17 +00:00
Arvid Norberg 6d8068e5d5 *** empty log message *** 2005-08-16 20:42:10 +00:00
Arvid Norberg 6c32f82fc5 *** empty log message *** 2005-08-16 20:18:11 +00:00
Arvid Norberg 2582c47cd8 *** empty log message *** 2005-08-16 19:35:14 +00:00
Arvid Norberg 5df5773479 better unicode support on windows 2005-08-16 19:09:06 +00:00
Arvid Norberg fb3f1624cf better unicode support on windows 2005-08-16 19:06:25 +00:00
Arvid Norberg 0dde64e8f2 updated docs, added an attempt for better unicode support on windows 2005-08-16 18:39:38 +00:00
Arvid Norberg d19c2c6483 removed olf workarounds for vc6.5 and added documentation for building with autotools 2005-08-15 18:03:57 +00:00
Arvid Norberg 1934171431 bugfixes, fixes for boost 1.33, made the piece picker pick whole pieces from fast peers 2005-08-14 22:04:58 +00:00
Arvid Norberg f7c90b8511 *** empty log message *** 2005-08-12 12:40:58 +00:00
Arvid Norberg 845eee234f *** empty log message *** 2005-06-30 21:38:28 +00:00
Arvid Norberg 6fb43fe3f3 storage fix 2005-06-30 12:59:23 +00:00
Arvid Norberg 4807fe6a46 *** empty log message *** 2005-06-27 23:11:09 +00:00
Arvid Norberg 0efa042414 made the file pool global instead of local per torrent 2005-06-27 22:04:34 +00:00
Arvid Norberg 0320e097d6 *** empty log message *** 2005-06-16 15:41:04 +00:00
Arvid Norberg 2fabb2bf80 experimental support for filtering pieces (filter from downloading that is) 2005-05-25 10:01:01 +00:00
Arvid Norberg 9707b6aeb0 added support for non-compact storage layout. i.e. all the files are allocated on disk before downloading starts 2005-05-13 00:39:39 +00:00
Arvid Norberg 7814b03370 fixed issue with creating torrents with a single file in a directory and some security issues with paths in torrents 2005-05-11 23:03:12 +00:00
Arvid Norberg 6ff7e76ab2 *** empty log message *** 2005-03-19 12:22:40 +00:00
Arvid Norberg 78a1ef3cd9 fixed an incorrect assert that was hit when having empty files in a torrent 2005-03-12 10:12:36 +00:00
Arvid Norberg 727dc803a3 *** empty log message *** 2005-03-10 11:26:55 +00:00
Arvid Norberg a5c91f683a *** empty log message *** 2005-03-05 14:17:17 +00:00
Arvid Norberg 999754ee23 *** empty log message *** 2005-03-04 23:45:16 +00:00
Arvid Norberg 77597b360d *** empty log message *** 2005-03-03 00:40:44 +00:00
Arvid Norberg d0b9fe8778 *** empty log message *** 2005-01-14 14:10:38 +00:00
Arvid Norberg b55a1a6766 *** empty log message *** 2004-12-21 12:30:09 +00:00
Arvid Norberg b29e378f22 *** empty log message *** 2004-11-18 22:33:50 +00:00