diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2007-12-06 12:32:27 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2007-12-06 12:32:27 +0000 |
| commit | 68579bd2f4284ba9128cb972f8edaace03d466e5 (patch) | |
| tree | b1784b4bd10d6c04b78f68097374236442f09e7f /src/FileAllocationEntry.cc | |
| parent | 30739b0763bb922d12e1616a2c8ce603bc80814d (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/FileAllocationEntry.cc')
| -rw-r--r-- | src/FileAllocationEntry.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/FileAllocationEntry.cc b/src/FileAllocationEntry.cc index f369bcb0..df9cfcc0 100644 --- a/src/FileAllocationEntry.cc +++ b/src/FileAllocationEntry.cc @@ -42,10 +42,14 @@ FileAllocationEntry::FileAllocationEntry(RequestGroup* requestGroup, Command* nextCommand): RequestGroupEntry(requestGroup, nextCommand), _fileAllocationIterator(requestGroup->getPieceStorage()->getDiskAdaptor()->fileAllocationIterator()) -{} +{ + _requestGroup->getPieceStorage()->getDiskAdaptor()->enableDirectIO(); +} FileAllocationEntry:: ~FileAllocationEntry() -{} +{ + _requestGroup->getPieceStorage()->getDiskAdaptor()->disableDirectIO(); +} int64_t FileAllocationEntry::getCurrentLength() { |
