/*
- * Copyright (C) 1996-2014 The Squid Software Foundation and contributors
+ * Copyright (C) 1996-2021 The Squid Software Foundation and contributors
*
* Squid software is distributed under GPLv2+ license and includes
* contributions from numerous individuals and organizations.
if (e->mem_status != NOT_IN_MEMORY)
debugs(20, 3, HERE << "already IN_MEMORY");
- debugs(20, 3, "storeSwapInStart: called for : " << e->swap_dirn << " " <<
- std::hex << std::setw(8) << std::setfill('0') << std::uppercase <<
- e->swap_filen << " " << e->getMD5Text());
+ debugs(20, 3, *e << " " << e->getMD5Text());
- if (e->swap_status != SWAPOUT_WRITING && e->swap_status != SWAPOUT_DONE) {
- debugs(20, DBG_IMPORTANT, "storeSwapInStart: bad swap_status (" << swapStatusStr[e->swap_status] << ")");
+ if (!e->hasDisk()) {
+ debugs(20, DBG_IMPORTANT, "BUG: Attempt to swap in a not-stored entry " << *e << ". Salvaged.");
return;
}
- if (e->swap_filen < 0) {
- debugs(20, DBG_IMPORTANT, "storeSwapInStart: swap_filen < 0");
+ if (e->swapoutFailed()) {
+ debugs(20, DBG_IMPORTANT, "BUG: Attempt to swap in a failed-to-store entry " << *e << ". Salvaged.");
return;
}
assert(e->mem_obj != NULL);
- debugs(20, 3, "storeSwapInStart: Opening fileno " << std::hex << std::setw(8) << std::setfill('0') << std::uppercase << e->swap_filen);
sc->swapin_sio = storeOpen(e, storeSwapInFileNotify, storeSwapInFileClosed, sc);
}
static void
-storeSwapInFileClosed(void *data, int errflag, StoreIOState::Pointer self)
+storeSwapInFileClosed(void *data, int errflag, StoreIOState::Pointer)
{
store_client *sc = (store_client *)data;
debugs(20, 3, "storeSwapInFileClosed: sio=" << sc->swapin_sio.getRaw() << ", errflag=" << errflag);
}
static void
-storeSwapInFileNotify(void *data, int errflag, StoreIOState::Pointer self)
+storeSwapInFileNotify(void *data, int, StoreIOState::Pointer)
{
store_client *sc = (store_client *)data;
StoreEntry *e = sc->entry;