From b57f552794519cc60f026ebd1c92e975243f4764 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Fri, 15 Nov 2019 08:45:19 +0100 Subject: [PATCH] backport fix for possible rocksdb corruption Signed-off-by: Thomas Lamprecht --- ...solidate-extents-from-the-same-devic.patch | 27 +++++++++++++++++++ patches/series | 1 + 2 files changed, 28 insertions(+) create mode 100644 patches/0012-os-bluestore-consolidate-extents-from-the-same-devic.patch diff --git a/patches/0012-os-bluestore-consolidate-extents-from-the-same-devic.patch b/patches/0012-os-bluestore-consolidate-extents-from-the-same-devic.patch new file mode 100644 index 000000000..b3bd53f5c --- /dev/null +++ b/patches/0012-os-bluestore-consolidate-extents-from-the-same-devic.patch @@ -0,0 +1,27 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Igor Fedotov +Date: Wed, 13 Nov 2019 22:09:53 +0300 +Subject: [PATCH] os/bluestore: consolidate extents from the same device only + +Presumably Fixes: https://tracker.ceph.com/issues/42223 + +Signed-off-by: Igor Fedotov +(cherry picked from commit 20a90698a262905e97bae771b5950af04c00c67a) +[ https://github.com/ceph/ceph/pull/31621 ] +Signed-off-by: Thomas Lamprecht +--- + src/os/bluestore/bluefs_types.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/os/bluestore/bluefs_types.h b/src/os/bluestore/bluefs_types.h +index fde0384..d841264 100644 +--- a/src/os/bluestore/bluefs_types.h ++++ b/src/os/bluestore/bluefs_types.h +@@ -91,6 +91,7 @@ struct bluefs_fnode_t { + void append_extent(const bluefs_extent_t& ext) { + if (!extents.empty() && + extents.back().end() == ext.offset && ++ extents.back().bdev == ext.bdev && + (uint64_t)extents.back().length + (uint64_t)ext.length < 0xffffffff) { + extents.back().length += ext.length; + } else { diff --git a/patches/series b/patches/series index 1701a0e54..ce50bcace 100644 --- a/patches/series +++ b/patches/series @@ -6,3 +6,4 @@ 0009-remove-legacy-pve-ceph-osd-activation-script-in-post.patch 0010-remove-legacy-init.d-ceph-script.patch 0011-only-suggest-mgr-plugins.patch +0012-os-bluestore-consolidate-extents-from-the-same-devic.patch -- 2.39.2