]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
os/bluestore: strip trailing slash for directory listings 41757/head
authorJonas Jelten <jj@sft.lol>
Mon, 15 Mar 2021 22:21:07 +0000 (23:21 +0100)
committerIgor Fedotov <ifedotov@suse.com>
Tue, 8 Jun 2021 11:20:44 +0000 (14:20 +0300)
commit2e865c360a9d4086598898ae4495ad582876327c
tree01ed8ffbd8a732f9a129231fccbc071d2b8fc6c2
parent10b7d6bc19da671811ed368866924b830aa5e10b
os/bluestore: strip trailing slash for directory listings

Calls to BlueRocksEnv::GetChildren may contain a trailing / in the
queried directory, which is stripped away with this patch.

If it's not stripped, the directory entry is not found in BlueFS:
```
10 bluefs readdir db/
20 bluefs readdir dir db/ not found
 3 rocksdb: [db/db_impl/db_impl_open.cc:1785] Persisting Option File error: OK
```

Fixes: https://tracker.ceph.com/issues/49815
Signed-off-by: Jonas Jelten <jj@sft.lol>
(cherry picked from commit 3aa31813980d22719277a04797df48310acdff66)
src/os/bluestore/BlueFS.cc