summaryrefslogtreecommitdiff
path: root/src/FileAllocationDispatcherCommand.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2008-04-21 12:31:10 +0000
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2008-04-21 12:31:10 +0000
commitcfe373cbbf6586af24e435bcb5dafa55c1a01676 (patch)
tree8bcf0f6ebe113f154fb30ee64452da9235acea33 /src/FileAllocationDispatcherCommand.cc
parente1fa62e6c7ce3617b8bb72b4ffe63f505cc0fdda (diff)
2008-04-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Call FileAllocationMan::nextFileAllocationEntryExists() first. Calling FileAllocationMan::isFileAllocationBeingExecuted() is somwhat waste of time because it is more likey false. * src/FileAllocationDispatcherCommand.cc (execute)
Diffstat (limited to 'src/FileAllocationDispatcherCommand.cc')
-rw-r--r--src/FileAllocationDispatcherCommand.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/FileAllocationDispatcherCommand.cc b/src/FileAllocationDispatcherCommand.cc
index ae73b7e9..37b32a88 100644
--- a/src/FileAllocationDispatcherCommand.cc
+++ b/src/FileAllocationDispatcherCommand.cc
@@ -57,8 +57,8 @@ bool FileAllocationDispatcherCommand::execute()
if(_e->_requestGroupMan->downloadFinished() || _e->isHaltRequested()) {
return true;
}
- if(!_e->_fileAllocationMan->isFileAllocationBeingExecuted() &&
- _e->_fileAllocationMan->nextFileAllocationEntryExists()) {
+ if(_e->_fileAllocationMan->nextFileAllocationEntryExists() &&
+ !_e->_fileAllocationMan->isFileAllocationBeingExecuted()) {
FileAllocationEntryHandle entry = _e->_fileAllocationMan->popNextFileAllocationEntry();
int32_t newCUID = CUIDCounterSingletonHolder::instance()->newID();
logger->info(MSG_FILE_ALLOCATION_DISPATCH, newCUID);