]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
os/bluestore: Fix BlueRocksEnv attempts to use POSIX 61112/head
authorAdam Kupczyk <akupczyk@ibm.com>
Fri, 28 Jun 2024 06:02:52 +0000 (06:02 +0000)
committerKonstantin Shalygin <k0ste@k0ste.ru>
Sat, 11 Jan 2025 07:27:26 +0000 (14:27 +0700)
commit94af5f07f26d579d1130a1c37d86b135bf736f12
tree0b6400744ad27c25ca7d4b8c2f2250282c97e44e
parent1932f5f744b60e192b1da3ff2947568e11cb52c2
os/bluestore: Fix BlueRocksEnv attempts to use POSIX

How is it possible that we are mixing BlueFS and posix operations?

BlueRocksEnv implements rocksdb::Env interface.
To make things simpler it inherits from rocksdb::EnvWrapper.
The rocksdb::EnvWrapper is initialized from DefaultEnv, which brings
default implementation for threads and files.
We override file-related interface.

The problem is when we forget to implement something, or if rocksdb::Env
interface gets expanded. The function returns ENOTSUPP, and rocksdb can
handle it. But it does not matter, because it is implemented in DefaultEnv.

In future we should drop inheriting from EnvWrapper and call DefaultEnv
directly wherever we need.

Fixes https://tracker.ceph.com/issues/66717.

Signed-off-by: Adam Kupczyk <akupczyk@ibm.com>
(cherry picked from commit 76fb0820e60d65d205f85503abaf1dbf77adcdd1)
src/os/bluestore/BlueRocksEnv.h