16.1.0 RC (ceph-16.1.0-944-ge53ee8bd plus fix trailing slash bluestore)

Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
This commit is contained in:
Kaleb S. KEITHLEY 2021-03-23 09:25:37 -04:00
parent ba585a6512
commit c4b36fdbe9
2 changed files with 44 additions and 1 deletions

View File

@ -0,0 +1,39 @@
From 3aa31813980d22719277a04797df48310acdff66 Mon Sep 17 00:00:00 2001
From: Jonas Jelten <jj@sft.lol>
Date: Mon, 15 Mar 2021 23:21:07 +0100
Subject: [PATCH] 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>
---
src/os/bluestore/BlueFS.cc | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/os/bluestore/BlueFS.cc b/src/os/bluestore/BlueFS.cc
index ea39626aef..62b9d27f58 100644
--- a/src/os/bluestore/BlueFS.cc
+++ b/src/os/bluestore/BlueFS.cc
@@ -3493,6 +3493,10 @@
int BlueFS::readdir(const string& dirname, vector<string> *ls)
{
+ // dirname may contain a trailing /
+ if (!dirname.empty() && dirname.back() == '/') {
+ dirname.remove_suffix(1);
+ }
std::lock_guard l(lock);
dout(10) << __func__ << " " << dirname << dendl;
if (dirname.empty()) {
--
2.26.2

View File

@ -126,7 +126,7 @@
#################################################################################
Name: ceph
Version: 16.1.0
Release: 0.7.snapshot%{?dist}
Release: 0.8.snapshot%{?dist}
%if 0%{?fedora} || 0%{?rhel}
Epoch: 2
%endif
@ -153,6 +153,7 @@ Patch0006: 0006-src-blk-CMakeLists.txt.patch
Patch0007: 0007-src-test-neorados-CMakeLists.txt.patch
Patch0008: 0008-cmake-modules-Finduring.cmake.patch
Patch0009: 0009-librgw-notifications-initialize-kafka-and-amqp.patch
Patch0010: 0010-os-bluestore-strip-trailing-slash-for-directory-list.patch
Source1: cmake-modules-BuildBoost.cmake.noautopatch
# ceph 14.0.1 does not support 32-bit architectures, bugs #1727788, #1727787
ExcludeArch: i686 armv7hl
@ -2454,6 +2455,9 @@ exit 0
%config %{_sysconfdir}/prometheus/ceph/ceph_default_alerts.yml
%changelog
* Tue Mar 23 2021 Kaleb S. KEITHLEY <kkeithle[at]redhat.com> - 2:16.1.0-0.8.snapshot
- 16.1.0 RC (ceph-16.1.0-944-ge53ee8bd plus fix trailing slash bluestore)
* Sat Mar 20 2021 Kaleb S. KEITHLEY <kkeithle[at]redhat.com> - 2:16.1.0-0.7.snapshot
- 16.1.0 RC (ceph-16.1.0-944-ge53ee8bd)