-
Notifications
You must be signed in to change notification settings - Fork 46
Expand file tree
/
Copy pathconfig.h
More file actions
185 lines (139 loc) · 5.04 KB
/
Copy pathconfig.h
File metadata and controls
185 lines (139 loc) · 5.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
#pragma once
#include "public.h"
#include <cloud/storage/core/libs/features/features_config.h>
#include <cloud/filestore/config/server.pb.h>
#include <util/datetime/base.h>
#include <util/generic/string.h>
#include <variant>
namespace NCloud::NFileStore {
////////////////////////////////////////////////////////////////////////////////
class TNullFileIOConfig
{
private:
NProto::TNullFileIOConfig Proto;
public:
explicit TNullFileIOConfig(NProto::TNullFileIOConfig proto = {})
: Proto(std::move(proto))
{}
};
////////////////////////////////////////////////////////////////////////////////
class TAioConfig
{
private:
NProto::TAioConfig Proto;
public:
explicit TAioConfig(NProto::TAioConfig proto = {})
: Proto(std::move(proto))
{}
[[nodiscard]] ui32 GetEntries() const;
};
////////////////////////////////////////////////////////////////////////////////
class TIoUringConfig
{
private:
NProto::TIoUringConfig Proto;
public:
explicit TIoUringConfig(NProto::TIoUringConfig proto = {})
: Proto(std::move(proto))
{}
[[nodiscard]] ui32 GetEntries() const;
[[nodiscard]] bool GetShareKernelWorkers() const;
[[nodiscard]] ui32 GetMaxKernelWorkersCount() const;
[[nodiscard]] bool GetForceAsyncIO() const;
[[nodiscard]] bool GetPropagateAffinityToKernelWorkers() const;
[[nodiscard]] bool GetSQKernelPollingEnabled() const;
};
////////////////////////////////////////////////////////////////////////////////
using TFileIOConfig =
std::variant<TNullFileIOConfig, TAioConfig, TIoUringConfig>;
////////////////////////////////////////////////////////////////////////////////
class TLocalFileStoreConfig
{
private:
NProto::TLocalServiceConfig ProtoConfig;
NFeatures::TFeaturesConfigPtr FeaturesConfig;
public:
TLocalFileStoreConfig(NProto::TLocalServiceConfig protoConfig = {})
: ProtoConfig(std::move(protoConfig))
{}
void SetFeaturesConfig(NFeatures::TFeaturesConfigPtr featuresConfig);
TString GetRootPath() const;
TString GetPathPrefix() const;
ui32 GetDefaultPermissions() const;
TDuration GetIdleSessionTimeout() const;
ui32 GetNumThreads() const;
TString GetStatePath() const;
ui32 GetMaxNodeCount() const;
ui32 GetMaxHandlePerSessionCount() const;
bool GetDirectIoEnabled() const;
ui32 GetDirectIoAlign() const;
bool GetGuestWriteBackCacheEnabled() const;
ui32 GetNodeCleanupBatchSize() const;
bool GetZeroCopyEnabled() const;
bool GetGuestPageCacheDisabled() const;
bool GetExtendedAttributesDisabled() const;
bool GetExtendedAttributesDisabled(
const TString& cloudId,
const TString& folderId,
const TString& fsId) const;
void Dump(IOutputStream& out) const;
TString DumpStr() const;
void DumpHtml(IOutputStream& out) const;
bool GetAsyncDestroyHandleEnabled() const;
bool GetAsyncDestroyReadOnlyHandleEnabled() const;
TDuration GetAsyncHandleOperationIdlePeriod() const;
TDuration GetAsyncHandleOperationDrainPeriod() const;
bool GetOpenNodeByHandleEnabled() const;
bool GetServerWriteBackCacheEnabled() const;
bool GetDontPopulateNodeCacheWhenListingNodes() const;
bool GetGuestOnlyPermissionsCheckEnabled() const;
ui32 GetMaxResponseEntries() const;
TFileIOConfig GetFileIOConfig() const;
ui32 GetMaxBackground() const;
ui32 GetMaxFuseLoopThreads() const;
bool GetFSyncQueueDisabled() const;
TDuration GetEntryTimeout() const;
TDuration GetEntryTimeout(
const TString& cloudId,
const TString& folderId,
const TString& fsId) const;
TDuration GetNegativeEntryTimeout() const;
TDuration GetNegativeEntryTimeout(
const TString& cloudId,
const TString& folderId,
const TString& fsId) const;
TDuration GetAttrTimeout() const;
TDuration GetAttrTimeout(
const TString& cloudId,
const TString& folderId,
const TString& fsId) const;
TDuration GetXAttrCacheTimeout() const;
TDuration GetXAttrCacheTimeout(
const TString& cloudId,
const TString& folderId,
const TString& fsId) const;
bool GetDirectoryHandlesStorageEnabled() const;
bool GetDirectoryHandlesStorageEnabled(
const TString& cloudId,
const TString& folderId,
const TString& fsId) const;
ui64 GetDirectoryHandlesTableSize() const;
ui64 GetDirectoryHandlesPersistentHandleMaxSize() const;
bool GetGuestHandleKillPrivV2Enabled() const;
bool GetGuestHandleKillPrivV2Enabled(
const TString& cloudId,
const TString& folderId,
const TString& fsId) const;
bool GetGuestPosixAclEnabled() const;
bool GetGuestPosixAclEnabled(
const TString& cloudId,
const TString& folderId,
const TString& fsId) const;
bool GetSnapshotsDirEnabled() const;
bool GetSnapshotsDirEnabled(
const TString& cloudId,
const TString& folderId,
const TString& fsId) const;
TDuration GetSnapshotsDirRefreshInterval() const;
};
} // namespace NCloud::NFileStore