1
0
Fork 0
mirror of https://github.com/dragonflydb/dragonfly.git synced 2024-12-15 17:51:06 +00:00

chore: allow disabling io_uring registered buffers (#3650)

This commit is contained in:
Roman Gershman 2024-09-05 14:47:42 +03:00 committed by GitHub
parent eef5be1729
commit 3461419088
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 4 deletions

2
helio

@ -1 +1 @@
Subproject commit f9e28c79d3f9234ab0f094a7101cad8b5847c184
Subproject commit dbc921329877019d156995a56941ae03b69ad87a

View file

@ -86,9 +86,11 @@ error_code DiskStorage::Open(string_view path) {
alloc_.AddStorage(0, kInitialSize);
auto* up = static_cast<UringProactor*>(ProactorBase::me());
if (int io_res = up->RegisterBuffers(absl::GetFlag(FLAGS_registered_buffer_size)); io_res < 0)
auto registered_buffer_size = absl::GetFlag(FLAGS_registered_buffer_size);
if (registered_buffer_size > 0) {
if (int io_res = up->RegisterBuffers(registered_buffer_size); io_res < 0)
return error_code{-io_res, system_category()};
}
return {};
}