From 29c5ef9215be004b31cd53ef8841680c3f015d57 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Wed, 25 Mar 2009 05:43:07 +0000 Subject: 2009-03-25 Tatsuhiro Tsujikawa Added 'falloc' parameter for --file-allocation option. 'falloc' allocation mode uses posix_fallocate() system call to allocate file on disk. If you are using newer file systems such as ext4 (with extents support), btrfs or xfs, 'falloc' is your best choice. It allocates large(few GiB) files almost instantly. Don't use 'falloc' with legacy file systems such as ext3 because it takes almost same time as 'prealloc' and it blocks aria2 entirely until allocation finishes. 'falloc' may not be available if your system doesn't have posix_fallocate() system call. * configure.ac * src/AbstractDiskWriter.cc * src/AbstractDiskWriter.h * src/AbstractSingleDiskAdaptor.cc * src/BinaryStream.h * src/BtCheckIntegrityEntry.cc * src/ByteArrayDiskWriter.h * src/CheckIntegrityEntry.cc * src/CheckIntegrityEntry.h * src/DefaultPieceStorage.cc * src/DiskAdaptor.cc * src/DiskAdaptor.h * src/DiskWriter.h * src/FallocFileAllocationIterator.cc * src/FallocFileAllocationIterator.h * src/FileAllocationEntry.cc * src/FileAllocationEntry.h * src/Makefile.am * src/MultiFileAllocationIterator.cc * src/MultiFileAllocationIterator.h * src/OptionHandlerFactory.cc * src/RequestGroup.cc * src/StreamCheckIntegrityEntry.cc * src/prefs.cc * src/prefs.h * src/usage_text.h * test/FallocFileAllocationIteratorTest.cc * test/Makefile.am --- src/MultiFileAllocationIterator.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/MultiFileAllocationIterator.h') diff --git a/src/MultiFileAllocationIterator.h b/src/MultiFileAllocationIterator.h index 1f32ff04..682e6686 100644 --- a/src/MultiFileAllocationIterator.h +++ b/src/MultiFileAllocationIterator.h @@ -42,14 +42,13 @@ namespace aria2 { class MultiDiskAdaptor; class DiskWriterEntry; -class SingleFileAllocationIterator; class MultiFileAllocationIterator:public FileAllocationIterator { private: MultiDiskAdaptor* _diskAdaptor; std::deque > _entries; - SharedHandle _fileAllocationIterator; + SharedHandle _fileAllocationIterator; off_t _offset; public: -- cgit