Adding log statement in allocator while skipping a storagepool if it crosses the storage.capacity.threshold

This commit is contained in:
prachi 2011-03-09 15:33:37 -08:00
parent 163af9a3b6
commit b9646afd48
1 changed files with 3 additions and 0 deletions

View File

@ -196,6 +196,9 @@ public abstract class AbstractStoragePoolAllocator extends AdapterBase implement
s_logger.debug("Attempting to look for pool " + pool.getId() + " for storage, totalSize: " + pool.getCapacityBytes() + ", usedBytes: " + stats.getByteUsed() + ", usedPct: " + usedPercentage + ", threshold: " + _storageUsedThreshold);
}
if (usedPercentage >= _storageUsedThreshold) {
if (s_logger.isDebugEnabled()) {
s_logger.debug("Cannot allocate this pool " + pool.getId() + " for storage since its usage percentage: " +usedPercentage + " has crossed the storage.capacity.threshold: " + _storageUsedThreshold + ", skipping this pool");
}
return false;
}
}