]> git.ipfire.org Git - thirdparty/squid.git/blame - src/DiskIO/DiskThreads/DiskThreadsIOStrategy.h
Use ERR_ACCESS_DENIED for HTTP 403 (Forbidden) errors (#1899)
[thirdparty/squid.git] / src / DiskIO / DiskThreads / DiskThreadsIOStrategy.h
CommitLineData
59b2d47f 1/*
b8ae064d 2 * Copyright (C) 1996-2023 The Squid Software Foundation and contributors
26ac0430 3 *
bbc27441
AJ
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.
59b2d47f 7 */
8
bbc27441
AJ
9/* DEBUG: section 79 Squid-side Disk I/O functions. */
10
ff9d9458
FC
11#ifndef SQUID_SRC_DISKIO_DISKTHREADS_DISKTHREADSIOSTRATEGY_H
12#define SQUID_SRC_DISKIO_DISKTHREADS_DISKTHREADSIOSTRATEGY_H
59b2d47f 13
f53969cc
SM
14#define _AIO_OPEN 0
15#define _AIO_READ 1
16#define _AIO_WRITE 2
17#define _AIO_CLOSE 3
18#define _AIO_UNLINK 4
19#define _AIO_OPENDIR 5
20#define _AIO_STAT 6
b9ae18aa 21#include "DiskIO/DiskIOStrategy.h"
59b2d47f 22
b9ae18aa 23class DiskThreadsIOStrategy : public DiskIOStrategy
59b2d47f 24{
25
26public:
b9ae18aa 27 DiskThreadsIOStrategy();
337b9aa4
AR
28 bool shedLoad() override;
29 int load() override;
30 RefCount<DiskFile> newFile(char const *path) override;
31 bool unlinkdUseful() const override;
32 void unlinkFile (char const *) override;
33 int callback() override;
34 void sync() override;
35 void init() override;
b9ae18aa 36 void done();
37 /* Todo: add access limitations */
38 bool initialised;
39 static DiskThreadsIOStrategy Instance;
59b2d47f 40
b9ae18aa 41private:
42 static void aioStats(StoreEntry * sentry);
6fdc2d18 43 void registerWithCacheManager(void);
59b2d47f 44};
45
ff9d9458 46#endif /* SQUID_SRC_DISKIO_DISKTHREADS_DISKTHREADSIOSTRATEGY_H */
f53969cc 47