|
Squid Web Cache master
|
#include "squid.h"#include "compat/select.h"#include "compat/unistd.h"#include "fd.h"#include "fde.h"#include "fs_io.h"#include "globals.h"#include "SquidConfig.h"#include "SquidIpc.h"#include "StatCounters.h"#include "store/Disk.h"#include "tools.h"#include "unlinkd.h"#include <chrono>#include <thread>Go to the source code of this file.
Macros | |
| #define | UNLINKD_QUEUE_LIMIT 20 |
Functions | |
| void | unlinkdUnlink (const char *path) |
| void | unlinkdClose (void) |
| bool | unlinkdNeeded (void) |
| void | unlinkdInit (void) |
Variables | |
| static int | unlinkd_wfd = -1 |
| static int | unlinkd_rfd = -1 |
| static void * | hIpc |
| static pid_t | pid |
| #define UNLINKD_QUEUE_LIMIT 20 |
Definition at line 38 of file unlinkd.cc.
| void unlinkdClose | ( | void | ) |
Definition at line 133 of file unlinkd.cc.
References comm_close, DBG_IMPORTANT, debugs, getCurrentTime(), hIpc, pid, unlinkd_rfd, and unlinkd_wfd.
Referenced by SquidShutdown().
| void unlinkdInit | ( | void | ) |
Definition at line 193 of file unlinkd.cc.
References assert, commUnsetFdTimeout(), commUnsetNonBlocking(), Config, DBG_IMPORTANT, debugs, fatal(), fd_note(), FD_PIPE, fd_table, hIpc, IPC_FIFO, IPC_STREAM, IPC_TCP_SOCKET, ipcCreate(), pid, SquidConfig::Program, Ip::Address::setLocalhost(), SquidConfig::unlinkd, unlinkd_rfd, unlinkd_wfd, and USE_POLL.
Referenced by mainInitialize(), and mainReconfigureFinish().
| bool unlinkdNeeded | ( | void | ) |
Definition at line 180 of file unlinkd.cc.
References SquidConfig::cacheSwap, Config, Store::DiskConfig::n_configured, and Store::DiskConfig::swapDirs.
Referenced by mainInitialize(), and mainReconfigureFinish().
| void unlinkdUnlink | ( | const char * | path | ) |
Definition at line 41 of file unlinkd.cc.
References assert, DBG_IMPORTANT, debug_trap(), debugs, StatCounters::disk, MAXPATHLEN, StatCounters::requests, safeunlink(), statCounter, StatCounters::syscalls, StatCounters::unlink, UNLINKD_QUEUE_LIMIT, unlinkd_rfd, unlinkd_wfd, StatCounters::unlinks, xread(), xselect(), xstrerr(), xstrncpy(), and xwrite().
Referenced by BlockingIOStrategy::unlinkFile(), DiskdIOStrategy::unlinkFile(), IpcIoIOStrategy::unlinkFile(), and MmappedIOStrategy::unlinkFile().
|
static |
Definition at line 35 of file unlinkd.cc.
Referenced by unlinkdClose(), and unlinkdInit().
|
static |
Definition at line 36 of file unlinkd.cc.
Referenced by unlinkdClose(), and unlinkdInit().
|
static |
Definition at line 33 of file unlinkd.cc.
Referenced by unlinkdClose(), unlinkdInit(), and unlinkdUnlink().
|
static |
Definition at line 32 of file unlinkd.cc.
Referenced by unlinkdClose(), unlinkdInit(), and unlinkdUnlink().