/*
- * DEBUG: section 47 Store Directory Routines
+ * Copyright (C) 1996-2015 The Squid Software Foundation and contributors
+ *
+ * Squid software is distributed under GPLv2+ license and includes
+ * contributions from numerous individuals and organizations.
+ * Please see the COPYING and CONTRIBUTORS files for details.
*/
+/* DEBUG: section 47 Store Directory Routines */
+
#include "squid.h"
#include "cache_cf.h"
#include "CollapsedForwarding.h"
const int64_t Rock::SwapDir::HeaderSize = 16*1024;
Rock::SwapDir::SwapDir(): ::SwapDir("rock"),
- slotSize(HeaderSize), filePath(NULL), map(NULL), io(NULL),
- waitingForPage(NULL)
+ slotSize(HeaderSize), filePath(NULL), map(NULL), io(NULL),
+ waitingForPage(NULL)
{
}
}
StoreSearch *
-Rock::SwapDir::search(String const url, HttpRequest *)
+Rock::SwapDir::search(String const, HttpRequest *)
{
assert(false);
return NULL; // XXX: implement
sfileno filen;
const Ipc::StoreMapAnchor *const slot = map->openForReading(
- reinterpret_cast<cache_key*>(collapsed.key), filen);
+ reinterpret_cast<cache_key*>(collapsed.key), filen);
if (!slot)
return false;
}
void
-Rock::SwapDir::readCompleted(const char *buf, int rlen, int errflag, RefCount< ::ReadRequest> r)
+Rock::SwapDir::readCompleted(const char *, int rlen, int errflag, RefCount< ::ReadRequest> r)
{
ReadRequest *request = dynamic_cast<Rock::ReadRequest*>(r.getRaw());
assert(request);
}
void
-Rock::SwapDir::writeCompleted(int errflag, size_t rlen, RefCount< ::WriteRequest> r)
+Rock::SwapDir::writeCompleted(int errflag, size_t, RefCount< ::WriteRequest> r)
{
Rock::WriteRequest *request = dynamic_cast<Rock::WriteRequest*>(r.getRaw());
assert(request);
const int slotLimit = slotLimitActual();
storeAppendPrintf(&e, "Maximum entries: %9d\n", entryLimit);
if (map && entryLimit > 0) {
- const int entryCount = map->entryCount();
- storeAppendPrintf(&e, "Current entries: %9d %.2f%%\n",
- entryCount, (100.0 * entryCount / entryLimit));
+ const int entryCount = map->entryCount();
+ storeAppendPrintf(&e, "Current entries: %9d %.2f%%\n",
+ entryCount, (100.0 * entryCount / entryLimit));
}
storeAppendPrintf(&e, "Maximum slots: %9d\n", slotLimit);
if (map && slotLimit > 0) {
- const unsigned int slotsFree = !freeSlots ? 0 : freeSlots->size();
- if (slotsFree <= static_cast<const unsigned int>(slotLimit)) {
- const int usedSlots = slotLimit - static_cast<const int>(slotsFree);
- storeAppendPrintf(&e, "Used slots: %9d %.2f%%\n",
- usedSlots, (100.0 * usedSlots / slotLimit));
- }
- if (slotLimit < 100) { // XXX: otherwise too expensive to count
- Ipc::ReadWriteLockStats stats;
- map->updateStats(stats);
- stats.dump(e);
- }
+ const unsigned int slotsFree = !freeSlots ? 0 : freeSlots->size();
+ if (slotsFree <= static_cast<const unsigned int>(slotLimit)) {
+ const int usedSlots = slotLimit - static_cast<const int>(slotsFree);
+ storeAppendPrintf(&e, "Used slots: %9d %.2f%%\n",
+ usedSlots, (100.0 * usedSlots / slotLimit));
+ }
+ if (slotLimit < 100) { // XXX: otherwise too expensive to count
+ Ipc::ReadWriteLockStats stats;
+ map->updateStats(stats);
+ stats.dump(e);
+ }
}
storeAppendPrintf(&e, "Pending operations: %d out of %d\n",
delete freeSlotsOwners[i];
}
}
+