diff --git a/0010-os-bluestore-strip-trailing-slash-for-directory-list.patch b/0010-os-bluestore-strip-trailing-slash-for-directory-list.patch new file mode 100644 index 0000000..1dff588 --- /dev/null +++ b/0010-os-bluestore-strip-trailing-slash-for-directory-list.patch @@ -0,0 +1,39 @@ +From 3aa31813980d22719277a04797df48310acdff66 Mon Sep 17 00:00:00 2001 +From: Jonas Jelten +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 +--- + 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 *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 + diff --git a/ceph.spec b/ceph.spec index 4383b4c..95a4d43 100644 --- a/ceph.spec +++ b/ceph.spec @@ -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 - 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 - 2:16.1.0-0.7.snapshot - 16.1.0 RC (ceph-16.1.0-944-ge53ee8bd)