DiskdIOStrategy.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 1996-2022 The Squid Software Foundation and contributors
3 *
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
7 */
8
9/* DEBUG: section 79 Squid-side DISKD I/O functions. */
10
11#ifndef __STORE_DISKDIOSTRATEGY_H__
12#define __STORE_DISKDIOSTRATEGY_H__
13
14struct diomsg;
15
18{
19
20public:
21 void put(ssize_t);
22 void *get(ssize_t *);
23 void init(int ikey, int magic2);
24 SharedMemory() : nbufs(0), buf(nullptr), inuse_map(nullptr), id(0) {}
25
26 int nbufs;
27 char *buf;
28 char *inuse_map;
29 int id;
30};
31
33#include "StoreIOState.h"
34
35class DiskFile;
36
37class DiskdFile;
38class Lock;
39class ReadRequest;
40
43{
44
45public:
47 virtual bool shedLoad();
48 virtual int load();
49 virtual RefCount<DiskFile> newFile(char const *path);
50 virtual bool unlinkdUseful() const;
51 virtual void unlinkFile (char const *);
52 virtual ConfigOption *getOptionTree() const;
53 virtual void init();
54 virtual void sync();
55 virtual int callback();
56 virtual void statfs(StoreEntry & sentry) const;
57 int send(int mtype, int id, DiskdFile *theFile, size_t size, off_t offset, ssize_t shm_offset, Lock *requestor);
58
61
62private:
63 static size_t newInstance();
64 static size_t nextInstanceID;
65 void openFailed();
66 bool optionQ1Parse(char const *option, const char *value, int reconfiguring);
67 void optionQ1Dump(StoreEntry * e) const;
68 bool optionQ2Parse(char const *option, const char *value, int reconfiguring);
69 void optionQ2Dump(StoreEntry * e) const;
70 int send(int mtype, int id, RefCount<StoreIOState> sio, size_t size, off_t offset, ssize_t shm_offset);
71 int SEND(diomsg * M, int mtype, int id, size_t size, off_t offset, ssize_t shm_offset);
72 void handle(diomsg * M);
73 void unlinkDone(diomsg * M);
74
79 int magic1;
80
87 int magic2;
88
89 int away;
90 int smsgid;
91 int rmsgid;
92 int wfd;
93 size_t instanceID;
94};
95
97#define SHMBUF_BLKSZ SM_PAGE_SIZE
98
109
110 struct {
111 int ops;
113 int fail;
114 }
115
117};
118
121
122#endif
123
int size
Definition: ModDevPoll.cc:75
bool optionQ1Parse(char const *option, const char *value, int reconfiguring)
virtual RefCount< DiskFile > newFile(char const *path)
int SEND(diomsg *M, int mtype, int id, size_t size, off_t offset, ssize_t shm_offset)
void unlinkDone(diomsg *M)
virtual int callback()
virtual bool unlinkdUseful() const
void handle(diomsg *M)
void optionQ2Dump(StoreEntry *e) const
static size_t newInstance()
bool optionQ2Parse(char const *option, const char *value, int reconfiguring)
virtual void statfs(StoreEntry &sentry) const
void optionQ1Dump(StoreEntry *e) const
int send(int mtype, int id, DiskdFile *theFile, size_t size, off_t offset, ssize_t shm_offset, Lock *requestor)
virtual bool shedLoad()
virtual void unlinkFile(char const *)
virtual void init()
virtual ConfigOption * getOptionTree() const
SharedMemory shm
virtual void sync()
virtual int load()
static size_t nextInstanceID
Definition: Lock.h:26
void * get(ssize_t *)
void put(ssize_t)
void init(int ikey, int magic2)
int reconfiguring
diskd_stats_t diskd_stats
Definition: diomsg.h:30
struct diskd_stats_t::@47 unlink
struct diskd_stats_t::@47 create
struct diskd_stats_t::@47 write
struct diskd_stats_t::@47 open
struct diskd_stats_t::@47 read
struct diskd_stats_t::@47 close

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors