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:
parent
eef5be1729
commit
3461419088
2 changed files with 6 additions and 4 deletions
2
helio
2
helio
|
@ -1 +1 @@
|
|||
Subproject commit f9e28c79d3f9234ab0f094a7101cad8b5847c184
|
||||
Subproject commit dbc921329877019d156995a56941ae03b69ad87a
|
|
@ -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 {};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue