Skip to content

Commit ce432ac

Browse files
committed
[Filestore] Implement zero-copy read on VFS Fuse level
1 parent ebb2aaa commit ce432ac

File tree

16 files changed

+98
-8
lines changed

16 files changed

+98
-8
lines changed

cloud/filestore/config/filesystem.proto

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,4 +97,7 @@ message TFileSystemConfig
9797

9898
// Enable FUSE_HANDLE_KILLPRIV_V2 on guest (FUSE client)
9999
optional bool GuestHandleKillPrivV2Enabled = 29;
100+
101+
// Enable zero-copy for read operations in the VFS FUSE layer
102+
optional bool ZeroCopyReadEnabled = 30;
100103
}

cloud/filestore/config/server.proto

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ message TLocalServiceConfig
173173
// Enable zero-copy for write operations in the VFS FUSE layer
174174
optional bool ZeroCopyWriteEnabled = 28;
175175

176+
<<<<<<< HEAD
176177
// Disable fsync queue which is used to synchronize data/metadata ops during fsync
177178
optional bool FSyncQueueDisabled = 29;
178179

@@ -197,6 +198,9 @@ message TLocalServiceConfig
197198

198199
// Enable FUSE_HANDLE_KILLPRIV_V2 on guest (FUSE client)
199200
optional bool GuestHandleKillPrivV2Enabled = 36;
201+
202+
// Enable zero-copy for read operations in the VFS FUSE layer
203+
optional bool ZeroCopyReadEnabled = 37;
200204
}
201205

202206
////////////////////////////////////////////////////////////////////////////////

cloud/filestore/config/storage.proto

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -656,6 +656,9 @@ message TStorageConfig
656656
// prototxt.
657657
optional bool UseBinaryFormatForTabletBootInfoBackup = 442;
658658

659+
// Enable zero-copy for read operations in the VFS FUSE layer
660+
optional bool ZeroCopyReadEnabled = 443;
661+
659662
// Allows to set node's priority for system (tenant) tablets (hive,
660663
// schemeshard, etc.). Lower value means lower priority.
661664
// NOTE: can be negative.

cloud/filestore/libs/service_local/config.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ namespace {
4949
xxx(DirectoryHandlesStorageEnabled, bool, false )\
5050
xxx(DirectoryHandlesTableSize, ui64, 100'000 )\
5151
xxx(GuestHandleKillPrivV2Enabled, bool, false )\
52+
xxx(ZeroCopyReadEnabled, bool, false )\
5253
// FILESTORE_SERVICE_CONFIG
5354

5455
#define FILESTORE_SERVICE_NULL_FILE_IO_CONFIG(xxx) \

cloud/filestore/libs/service_local/config.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,8 @@ class TLocalFileStoreConfig
131131
ui64 GetDirectoryHandlesTableSize() const;
132132

133133
bool GetGuestHandleKillPrivV2Enabled() const;
134+
135+
bool GetZeroCopyReadEnabled() const;
134136
};
135137

136138
} // namespace NCloud::NFileStore

cloud/filestore/libs/storage/core/config.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,8 @@ using TAliases = NProto::TStorageConfig::TFilestoreAliases;
300300
xxx(DirectoryHandlesStorageEnabled, bool, false )\
301301
xxx(DirectoryHandlesTableSize, ui64, 100'000 )\
302302
xxx(GuestHandleKillPrivV2Enabled, bool, false )\
303+
304+
xxx(ZeroCopyReadEnabled, bool, false )\
303305
// FILESTORE_STORAGE_CONFIG
304306

305307
#define FILESTORE_STORAGE_CONFIG_REF(xxx) \

cloud/filestore/libs/storage/core/config.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,8 @@ class TStorageConfig
351351
ui64 GetDirectoryHandlesTableSize() const;
352352

353353
bool GetGuestHandleKillPrivV2Enabled() const;
354+
355+
bool GetZeroCopyReadEnabled() const;
354356
};
355357

356358
} // namespace NCloud::NFileStore::NStorage

cloud/filestore/libs/storage/tablet/tablet_actor_createsession.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@ void FillFeatures(
8989

9090
features->SetGuestHandleKillPrivV2Enabled(
9191
config.GetGuestHandleKillPrivV2Enabled());
92+
93+
features->SetZeroCopyReadEnabled(config.GetZeroCopyReadEnabled());
9294
}
9395

9496
////////////////////////////////////////////////////////////////////////////////

cloud/filestore/libs/storage/tablet/tablet_ut_sessions.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -850,6 +850,7 @@ Y_UNIT_TEST_SUITE(TIndexTabletTest_Sessions)
850850
config.SetAllowHandlelessIO(true);
851851
config.SetZeroCopyWriteEnabled(true);
852852
config.SetGuestHandleKillPrivV2Enabled(true);
853+
config.SetZeroCopyReadEnabled(true);
853854

854855
features.SetTwoStageReadEnabled(true);
855856
features.SetEntryTimeout(TDuration::Seconds(10).MilliSeconds());
@@ -868,6 +869,7 @@ Y_UNIT_TEST_SUITE(TIndexTabletTest_Sessions)
868869
features.SetAllowHandlelessIO(true);
869870
features.SetZeroCopyWriteEnabled(true);
870871
features.SetGuestHandleKillPrivV2Enabled(true);
872+
features.SetZeroCopyReadEnabled(true);
871873

872874
DoTestShouldReturnFeaturesInCreateSessionResponse(config, features);
873875
}

cloud/filestore/libs/vfs_fuse/config.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ namespace {
5151
xxx(ZeroCopyWriteEnabled, bool, false )\
5252
xxx(FSyncQueueDisabled, bool, false )\
5353
xxx(GuestHandleKillPrivV2Enabled, bool, false )\
54+
xxx(ZeroCopyReadEnabled, bool, false )\
5455
// FILESTORE_FUSE_CONFIG
5556

5657
#define FILESTORE_FILESYSTEM_DECLARE_CONFIG(name, type, value) \

0 commit comments

Comments
 (0)