diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2008-09-07 11:37:15 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2008-09-07 11:37:15 +0000 |
| commit | 4e28efd925214dd60ddc02b8fa3a8c1128bc0fec (patch) | |
| tree | f32264a75e3ba65d92436812157130ee5b31fa91 /src/MultiFileAllocationIterator.cc | |
| parent | 390538d0b5936cbad9bcdff9ec2e04772751a35c (diff) | |
2008-09-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed the bug that DiskWriterEntry is not created when its
FileEntry.isRequested() is false and it doesn't share a piece
with
other FileEntries that are requested. This bug causes
segmentation fault
in the end.
Diffstat (limited to 'src/MultiFileAllocationIterator.cc')
| -rw-r--r-- | src/MultiFileAllocationIterator.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/MultiFileAllocationIterator.cc b/src/MultiFileAllocationIterator.cc index 1f541361..7fcb7b3e 100644 --- a/src/MultiFileAllocationIterator.cc +++ b/src/MultiFileAllocationIterator.cc @@ -61,7 +61,7 @@ void MultiFileAllocationIterator::allocateChunk() _diskAdaptor->openIfNot(entry, &DiskWriterEntry::openFile, _diskAdaptor->getTopDirPath()); entry->enableDirectIO(); - if(entry->size() < fileEntry->getLength()) { + if(entry->needsFileAllocation() && entry->size() < fileEntry->getLength()) { // Calling private function of MultiDiskAdaptor. _fileAllocationIterator.reset (new SingleFileAllocationIterator(entry->getDiskWriter().get(), |
