Commit Graph

216 Commits

Author SHA1 Message Date
arvidn 480bde9333 change formatting of namespace declarations 2017-04-12 14:26:35 -04:00
Arvid Norberg c35718d322 use unsigned integer for file and storage flags (#1895)
use unsigned integer for file and storage flags
2017-04-09 01:28:46 -04:00
Arvid Norberg 13b16a63a3 use unsigned type for file flags. make file_pool private to disk_io_thread (#1894)
use unsigned type for file flags. make file_pool private to disk_io_thread. move close_file_interval logic to the disk thread. don't expose file in public interface, and make pool_file_status properly public (not part of file_pool and renamed to open_file_status), this is exposed in public interface via torrent_handle::file_status()
2017-04-08 18:24:50 -04:00
arvidn 51c42adc3e steps towars making file_pool private to disk_io_thread 2017-04-07 08:38:35 -04:00
arvidn 206a80acfb optimize construction of disk io storage objects 2017-03-23 17:45:11 -04:00
Alden Torres ddf1b62e4b fixing sign-conversion warnings, part 9 2017-01-27 01:23:18 -05:00
Alden Torres ef9d1ecd7f fixing sign-conversion warnings, part 6 2017-01-17 20:51:26 -05:00
arvidn 934c58a816 merged RC_1_1 into master 2017-01-15 00:45:17 -05:00
Falco 51aa8e6928 documentation for deprecated members 2017-01-14 09:18:32 -05:00
Arvid Norberg 3d06371f31 factor out some common storage utilities out of storage.cpp (#1515)
factor out some common storage utilities out of storage.cpp
2017-01-11 00:42:10 -05:00
Arvid Norberg 1cf3689578 simplify disk thread a little bit (#1504)
simplify disk thread a little bit
2017-01-08 19:22:59 -05:00
Arvid Norberg 57f52adc88 various cleanup (#1497)
* various cleanup

* fix

* cleanup
2017-01-06 01:39:01 -05:00
arvidn 4ebc344e48 make disk_io_thread responsible for the storage object. torrents refer to it by index 2017-01-01 13:54:39 -05:00
arvidn 23a7e8d40a hide the block_cache_reference from disk_buffer_holder 2016-12-31 10:31:54 -05:00
Arvid Norberg af126fe507 make buffer_allocator_interface an implementation detail of the disk_io_thread (#1463)
make buffer_allocator_interface an implementation detail of the disk_io_thread by using disk_buffer_holder in the disk interface. make chained_buffer use holders instead of free deleter functions and userdata to support putting disk_buffer_holder objects in there. Also make the session buffers be held by holders
2016-12-28 17:47:18 -08:00
arvidn 192ef4962b simplify the buffer_allocator_interface 2016-12-26 08:36:50 -08:00
arvidn 5ed0086b51 removed mmap_cache feature 2016-12-25 21:12:49 -08:00
Arvid Norberg 3f1084d63d strengthened type safety in handling of piece and file indices (#1409)
strengthened type safety in handling of piece and file indices
2016-12-22 10:42:33 -05:00
Arvid Norberg 15ab8f387b cleaning up of disk_interface and improving type safety (#1353)
cleaned up disk_interface and improved type safety. removed unused disk status code disk_check_aborted, and removed status code return value for async_hash
2016-11-26 01:51:47 -05:00
Alden Torres c30027e4a1 more integral type conversion warning fixes, now only needs shorten-64-to-32 (#1349)
more integral type conversion warning fixes, now only needs shorten-64-to-32
2016-11-25 11:17:25 -05:00
arvidn 1d5f42d6d0 convert remaining disk io jobs 2016-11-23 19:02:05 -05:00
arvidn f08501b869 update callback interface for async_check_files and async_flush_piece 2016-11-23 19:02:05 -05:00
arvidn d8662533d5 update callback signature for async_move_storage and async_release_files 2016-11-23 19:02:05 -05:00
arvidn fc9dabe1ab start chipping away at removing disk_io_job from the disk_interface 2016-11-23 19:02:05 -05:00
arvidn d5b76d2237 move block_cache_reference out of disk_io_job header 2016-11-20 10:34:42 -05:00
arvidn 14236993ea collapse logic in piece_manager into storage directly 2016-11-13 02:53:16 -05:00
arvidn ccd539f977 pull check resume data logic out of piece_manager into disk_io_thread and simplify it 2016-11-12 18:03:18 -05:00
arvidn 9e5a2a7de4 remove unused exceeded_cache_use() function 2016-11-07 13:07:46 -05:00
arvidn 11ca69b9fc simplify disk_io_thread interface by setting the number of threads via settings rather than a separate function 2016-11-06 23:07:09 -05:00
arvidn 3ff89f29d7 remove explicit ticking of storage from the torrent. instead make the disk_io_thread do it automatically 2016-11-06 10:26:10 -05:00
arvidn c72053a75c remove unused clear_read_cache function 2016-11-05 21:39:45 -04:00
Arvid Norberg 09cbd0a51d remove deprecated disk_io_thread operations (#1284) 2016-11-02 01:01:27 -04:00
Arvid Norberg b61ebca14a moved async-load-torrent feature out of disk-io-thread (#1282)
moved async-load-torrent feature out of disk-io-thread into a generic worker thread
2016-11-02 01:01:04 -04:00
Arvid Norberg 1c2a8fb96e move coalescing of reclaim block from disk_io_thread to session_impl (#1281) 2016-10-31 23:48:30 -04:00
Arvid Norberg 8daa200d11 simplify interaction with disk_io_thread by removing the uncork interface (#1271)
simplify the interaction with the disk_io_thread by removing the uncork interface. This should be turned into a transparent part of peer_connection instead and remove cork logic from peer_connection
2016-10-30 18:21:07 -04:00
Steven Siloti f5366bd816 use span for scatter/gather lists (#1260)
use span for gather/scatter buffers. remove explicit size parameter from file_op
2016-10-26 20:40:56 -04:00
Alden Torres 8bdbaec872 minor cleanup refactor (#1252) 2016-10-24 20:19:01 -04:00
Arvid Norberg 6148984426 remove whitespace at end of line (#1245) 2016-10-22 11:47:24 -04:00
Arvid Norberg 524f7b1c27 fix error handling by exercising code paths where memory allocations fail (#1221)
fix error handling by exercising code paths where memory allocations fail
2016-10-19 01:18:05 -04:00
Arvid Norberg cebd976cc2 fix error_code vs. error_condition traits (#1169)
fix error_code vs. error_condition traits. deprecate get_*_category(), instead use *_category()
2016-10-02 12:27:50 -07:00
Alden Torres 585a760588 headers cleanup (#1054)
headers cleanup
2016-09-01 15:04:58 -04:00
Alden Torres bf0008933a refactor to use std::shared_ptr with peer_connection, core and tests (#1050) 2016-08-31 21:42:18 -04:00
arvidn 8c8c3d5587 replace boost::function with std::function 2016-08-13 07:07:26 -04:00
Arvid Norberg 31b2a03005 some optimizations (#858)
allow disk I/O callback objects to be moved into disk io jobs
2016-06-27 01:02:00 -04:00
Steven Siloti f1585d8317 Fix abort_jobs being called multiple times (#831)
disk_io_thread::abort_jobs must only be called once, but it was possible for
concurrent calls to be made from abort() and thread_fun() if the max threads
had been set to zero but there were still disk I/O threads running.
m_num_running_threads doesn't need to be atomic anymore
2016-06-18 16:53:23 -04:00
Arvid Norberg ed077c8358 use cstdint intead of boost/cstdint.hpp (#833)
use cstdint intead of boost/cstdint.hpp
2016-06-18 14:01:38 -04:00
Arvid Norberg 4d927f4029 modernize disk_buffer_holder to be move-only (#824)
modernize disk_buffer_holder to be move-only
2016-06-16 08:24:41 -04:00
Steven Siloti 2fed4103f8 scalable thread pool (#770) 2016-06-15 20:49:28 -04:00
Arvid Norberg 770afadcda use std::atomic instead of boost::atomic (#678)
use std::atomic instead of boost::atomic
2016-05-01 03:38:35 -04:00
Arvid Norberg 20b41ad0b9 Threads (#671)
use std::thread, std::mutex, std::condition_variable instead of pulling them in from boost.asio internals.
2016-04-30 18:54:23 -04:00