summaryrefslogtreecommitdiff
path: root/src/AdaptiveFileAllocationIterator.h
Commit message (Collapse)AuthorAgeFilesLines
* Removed trailing spacesTatsuhiro Tsujikawa2012-10-011-1/+1
|
* Use int64_t instead of off_tTatsuhiro Tsujikawa2012-07-231-5/+5
| | | | | | | | Using off_t, at least, in DiskAdaptor layer is problematic because torrent can contain under 2GiB files but total sum of those files may exceed 2GiB limit, which makes off_t overflow in 32 bit system without large file support. So we use int64_t in API. We'll check the file length before download so that it does not exceed max off_t.
* Replaced uint64_t with off_t or int64_t.Tatsuhiro Tsujikawa2011-12-091-3/+3
| | | | | Since off_t is int64_t with LFS, we cannot take advantage of extra capacity of uint64_t.
* 2010-11-20 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-11-201-3/+0
| | | | | | | Rewritten Logger interface. Logger now writes source file name and line number in log file.
* 2010-11-14 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-11-141-12/+2
| | | | | | | | | Added .cc file for classes/structs that only provided by header file. Defined non-POD classes' ctor, dtor in .cc file. Moved implementation code in header file to .cc file for major classes/strucsts.
* 2010-11-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-11-121-1/+1
| | | | | | | | Removed SharedHandle::isNull(). Instead we added operator* and operator unspecified_bool_type. Removed use of WeakHandle and replaced with raw pointer.
* 2010-07-31 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-07-311-1/+5
| | | | | | | | | Fixed the bug that AdaptiveFileAllocationIterator::getCurrentLength() does not return updated allocated bytes. * src/AdaptiveFileAllocationIterator.h
* 2010-07-04 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-07-041-0/+80
When allocating disk space, for Linux system with fallocate() system call, first check file system supports fallocate. This just run fallocate with small chunk and see it succeeds or fails. If it succeeds, use fallocate() to allocate entire file otherwise fall back to traditional slower method: writing zeros. This behavior is enabled in --file-allocation=prealloc, so this is enabled by default for most modern Linux. * configure.ac * src/AbstractDiskWriter.cc * src/AbstractDiskWriter.h * src/AbstractSingleDiskAdaptor.cc * src/AdaptiveFileAllocationIterator.cc * src/AdaptiveFileAllocationIterator.h * src/DefaultPieceStorage.cc * src/DiskAdaptor.cc * src/DiskAdaptor.h * src/FallocFileAllocationIterator.cc * src/Makefile.am * src/MultiFileAllocationIterator.cc * src/OptionHandlerFactory.cc * test/FallocFileAllocationIteratorTest.cc * test/Makefile.am