]> git.ipfire.org Git - thirdparty/squid.git/blob - src/fs/rock/RockIoRequests.h
Source Format Enforcement (#532)
[thirdparty/squid.git] / src / fs / rock / RockIoRequests.h
1 /*
2 * Copyright (C) 1996-2020 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 #ifndef SQUID_FS_ROCK_IO_REQUESTS_H
10 #define SQUID_FS_ROCK_IO_REQUESTS_H
11
12 #include "DiskIO/ReadRequest.h"
13 #include "DiskIO/WriteRequest.h"
14 #include "fs/rock/forward.h"
15 #include "fs/rock/RockIoState.h"
16
17 class DiskFile;
18
19 namespace Rock
20 {
21
22 class ReadRequest: public ::ReadRequest
23 {
24 CBDATA_CLASS(ReadRequest);
25
26 public:
27 ReadRequest(const ::ReadRequest &, const IoState::Pointer &, const IoXactionId);
28 IoState::Pointer sio;
29
30 /// identifies this read transaction for the requesting IoState
31 IoXactionId id;
32 };
33
34 class WriteRequest: public ::WriteRequest
35 {
36 CBDATA_CLASS(WriteRequest);
37
38 public:
39 WriteRequest(const ::WriteRequest &, const IoState::Pointer &, const IoXactionId);
40 IoState::Pointer sio;
41
42 /* We own these two reserved slots until SwapDir links them into the map. */
43
44 /// slot that will point to sidCurrent in the cache_dir map
45 SlotId sidPrevious;
46
47 /// slot being written using this write request
48 SlotId sidCurrent;
49
50 /// identifies this write transaction for the requesting IoState
51 IoXactionId id;
52
53 /// whether this is the last request for the entry
54 bool eof;
55 };
56
57 } // namespace Rock
58
59 #endif /* SQUID_FS_ROCK_IO_REQUESTS_H */
60