summaryrefslogtreecommitdiff
path: root/src/MultiFileAllocationIterator.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2007-12-06 12:32:27 +0000
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2007-12-06 12:32:27 +0000
commit68579bd2f4284ba9128cb972f8edaace03d466e5 (patch)
treeb1784b4bd10d6c04b78f68097374236442f09e7f /src/MultiFileAllocationIterator.cc
parent30739b0763bb922d12e1616a2c8ce603bc80814d (diff)
2007-12-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Changed Direct/IO enable/disable procesure in file allocation routine. * src/SingleFileAllocationIterator.cc (SingleFileAllocationIterator): Disable directIO if offset is not multiple of 512. (~SingleFileAllocationIterator): Removed a call to disableDirectIO. * src/MultiFileAllocationIterator.cc (allocateChunk): Enable created SingleFileAllocationIterator's directIO. * src/FileAllocationEntry.cc (FileAllocationEntry): Enable directIO here. (~FileAllocationEntry): Disable directIO here.
Diffstat (limited to 'src/MultiFileAllocationIterator.cc')
-rw-r--r--src/MultiFileAllocationIterator.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/MultiFileAllocationIterator.cc b/src/MultiFileAllocationIterator.cc
index 04961ae6..b6f8dd10 100644
--- a/src/MultiFileAllocationIterator.cc
+++ b/src/MultiFileAllocationIterator.cc
@@ -57,6 +57,7 @@ void MultiFileAllocationIterator::allocateChunk()
_entries.pop_front();
FileEntryHandle fileEntry = entry->getFileEntry();
if(entry->size() < fileEntry->getLength()) {
+ entry->getDiskWriter()->enableDirectIO();
_fileAllocationIterator =
new SingleFileAllocationIterator(entry->getDiskWriter().get(),
entry->size(),