Compare commits
No commits in common. "c10-beta" and "c8s" have entirely different histories.
3
.gitignore
vendored
3
.gitignore
vendored
@ -1 +1,2 @@
|
||||
ceph-18.2.1.tar.gz
|
||||
SOURCES/ceph-12.2.7.tar.gz
|
||||
/ceph-12.2.7.tar.gz
|
||||
|
@ -1,55 +0,0 @@
|
||||
--- ceph-15.2.2/src/common/crc32c_intel_fast_zero_asm.s.orig 2020-05-26 08:34:32.226201974 -0400
|
||||
+++ ceph-15.2.2/src/common/crc32c_intel_fast_zero_asm.s 2020-05-26 17:19:32.497201974 -0400
|
||||
@@ -1,5 +1,5 @@
|
||||
;
|
||||
-; Copyright 2012-2013 Intel Corporation All Rights Reserved.
|
||||
+; Copyright 2012-2015 Intel Corporation All Rights Reserved.
|
||||
; All rights reserved.
|
||||
;
|
||||
; http://opensource.org/licenses/BSD-3-Clause
|
||||
@@ -59,6 +59,19 @@
|
||||
xor rbx, rbx ;; rbx = crc1 = 0;
|
||||
xor r10, r10 ;; r10 = crc2 = 0;
|
||||
|
||||
+ cmp len, %%bSize*3*2
|
||||
+ jbe %%non_prefetch
|
||||
+
|
||||
+ %assign i 0
|
||||
+ %rep %%bSize/8 - 1
|
||||
+ crc32 rax, bufptmp ;; update crc0
|
||||
+ crc32 rbx, bufptmp ;; update crc1
|
||||
+ crc32 r10, bufptmp ;; update crc2
|
||||
+ %assign i (i+8)
|
||||
+ %endrep
|
||||
+ jmp %%next %+ %1
|
||||
+
|
||||
+%%non_prefetch:
|
||||
%assign i 0
|
||||
%rep %%bSize/8 - 1
|
||||
crc32 rax, bufptmp ;; update crc0
|
||||
@@ -66,6 +79,8 @@
|
||||
crc32 r10, bufptmp ;; update crc2
|
||||
%assign i (i+8)
|
||||
%endrep
|
||||
+
|
||||
+%%next %+ %1:
|
||||
crc32 rax, bufptmp ;; update crc0
|
||||
crc32 rbx, bufptmp ;; update crc1
|
||||
; SKIP ;crc32 r10, bufptmp ;; update crc2
|
||||
@@ -180,12 +195,15 @@
|
||||
%define crc_init_dw r8d
|
||||
%endif
|
||||
|
||||
-
|
||||
+ endbranch
|
||||
push rdi
|
||||
push rbx
|
||||
|
||||
mov rax, crc_init ;; rax = crc_init;
|
||||
|
||||
+ cmp len, 8
|
||||
+ jb less_than_8
|
||||
+
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; 1) ALIGN: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
13
0001-src-rocksdb-util-murmurhash.patch
Normal file
13
0001-src-rocksdb-util-murmurhash.patch
Normal file
@ -0,0 +1,13 @@
|
||||
--- ceph-12.1.1.orig/src/rocksdb/util/murmurhash.cc 2017-04-27 01:13:46.000000000 +0100
|
||||
+++ ceph-12.1.1.orig/src/rocksdb/util/murmurhash.cc 2017-07-25 11:37:28.910266684 +0100
|
||||
@@ -113,8 +113,8 @@ unsigned int MurmurHash2 ( const void *
|
||||
|
||||
switch(len)
|
||||
{
|
||||
- case 3: h ^= data[2] << 16;
|
||||
- case 2: h ^= data[1] << 8;
|
||||
+ case 3: h ^= data[2] << 16; // fallthrough
|
||||
+ case 2: h ^= data[1] << 8; // fallthrough
|
||||
case 1: h ^= data[0];
|
||||
h *= m;
|
||||
};
|
127
0002-cmake-Support-ppc64.patch
Normal file
127
0002-cmake-Support-ppc64.patch
Normal file
@ -0,0 +1,127 @@
|
||||
From 2f0a7153460acc3f21462236f470ec3471fa2ee1 Mon Sep 17 00:00:00 2001
|
||||
From: Boris Ranto <branto@redhat.com>
|
||||
Date: Mon, 31 Jul 2017 19:50:23 +0200
|
||||
Subject: [PATCH] cmake: Support ppc64
|
||||
|
||||
The ppc64 support requires a couple of changes:
|
||||
- adding the ppc64 support to cmake
|
||||
- changing optimized crc32 code to compile on ppc64le only
|
||||
- moving ifdef condition before crc32_align to avoid defined but not
|
||||
used warning
|
||||
|
||||
Signed-off-by: Boris Ranto <branto@redhat.com>
|
||||
---
|
||||
cmake/modules/SIMDExt.cmake | 15 ++++++++++++++-
|
||||
src/CMakeLists.txt | 4 +++-
|
||||
src/arch/ppc.c | 8 ++++----
|
||||
src/common/crc32c_ppc.c | 6 +++---
|
||||
4 files changed, 24 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/cmake/modules/SIMDExt.cmake b/cmake/modules/SIMDExt.cmake
|
||||
index 5330835..c47667d 100644
|
||||
--- a/cmake/modules/SIMDExt.cmake
|
||||
+++ b/cmake/modules/SIMDExt.cmake
|
||||
@@ -109,7 +109,20 @@ elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "i386|i686|amd64|x86_64|AMD64")
|
||||
endif(CMAKE_SYSTEM_PROCESSOR MATCHES "i686|amd64|x86_64|AMD64")
|
||||
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "(powerpc|ppc)64le")
|
||||
set(HAVE_PPC64LE 1)
|
||||
- message(STATUS " we are ppc64le")
|
||||
+ message(STATUS " we are ppc64")
|
||||
+ CHECK_C_COMPILER_FLAG("-maltivec" HAS_ALTIVEC)
|
||||
+ if(HAS_ALTIVEC)
|
||||
+ message(STATUS " HAS_ALTIVEC yes")
|
||||
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -maltivec")
|
||||
+ set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -maltivec")
|
||||
+ endif()
|
||||
+ CHECK_C_COMPILER_FLAG("-mcpu=power8" HAVE_POWER8)
|
||||
+ if(HAVE_POWER8)
|
||||
+ message(STATUS " HAVE_POWER8 yes")
|
||||
+ endif()
|
||||
+elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "(power|ppc)64")
|
||||
+ set(HAVE_PPC64 1)
|
||||
+ message(STATUS " we are ppc64")
|
||||
CHECK_C_COMPILER_FLAG("-maltivec" HAS_ALTIVEC)
|
||||
if(HAS_ALTIVEC)
|
||||
message(STATUS " HAS_ALTIVEC yes")
|
||||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
||||
index 66f0c14..38d1913 100644
|
||||
--- a/src/CMakeLists.txt
|
||||
+++ b/src/CMakeLists.txt
|
||||
@@ -568,7 +568,9 @@ if(HAVE_INTEL)
|
||||
endif(HAVE_GOOD_YASM_ELF64)
|
||||
elseif(HAVE_POWER8)
|
||||
list(APPEND libcommon_files
|
||||
- common/crc32c_ppc.c
|
||||
+ common/crc32c_ppc.c)
|
||||
+elseif(HAVE_PPC64LE)
|
||||
+ list(APPEND libcommon_files
|
||||
common/crc32c_ppc_asm.S
|
||||
common/crc32c_ppc_fast_zero_asm.S)
|
||||
endif(HAVE_INTEL)
|
||||
diff --git a/src/arch/ppc.c b/src/arch/ppc.c
|
||||
index f21e2fe..11d3a49 100644
|
||||
--- a/src/arch/ppc.c
|
||||
+++ b/src/arch/ppc.c
|
||||
@@ -14,10 +14,10 @@ int ceph_arch_ppc_crc32 = 0;
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
-#if __linux__ && __powerpc64__
|
||||
+#ifdef HAVE_PPC64LE
|
||||
#include <sys/auxv.h>
|
||||
#include <asm/cputable.h>
|
||||
-#endif /* __linux__ && __powerpc64__ */
|
||||
+#endif /* HAVE_PPC64LE */
|
||||
|
||||
#ifndef PPC_FEATURE2_VEC_CRYPTO
|
||||
#define PPC_FEATURE2_VEC_CRYPTO 0x02000000
|
||||
@@ -31,9 +31,9 @@ int ceph_arch_ppc_probe(void)
|
||||
{
|
||||
ceph_arch_ppc_crc32 = 0;
|
||||
|
||||
-#if __linux__ && __powerpc64__
|
||||
+#ifdef HAVE_PPC64LE
|
||||
if (getauxval(AT_HWCAP2) & PPC_FEATURE2_VEC_CRYPTO) ceph_arch_ppc_crc32 = 1;
|
||||
-#endif /* __linux__ && __powerpc64__ */
|
||||
+#endif /* HAVE_PPC64LE */
|
||||
|
||||
return 0;
|
||||
}
|
||||
diff --git a/src/common/crc32c_ppc.c b/src/common/crc32c_ppc.c
|
||||
index 43756e2..52fd1c4 100644
|
||||
--- a/src/common/crc32c_ppc.c
|
||||
+++ b/src/common/crc32c_ppc.c
|
||||
@@ -20,6 +20,7 @@
|
||||
#define VMX_ALIGN 16
|
||||
#define VMX_ALIGN_MASK (VMX_ALIGN-1)
|
||||
|
||||
+#ifdef HAVE_PPC64LE
|
||||
#ifdef REFLECT
|
||||
static unsigned int crc32_align(unsigned int crc, unsigned char const *p,
|
||||
unsigned long len)
|
||||
@@ -38,7 +39,6 @@ static unsigned int crc32_align(unsigned int crc, unsigned char const *p,
|
||||
}
|
||||
#endif
|
||||
|
||||
-#ifdef HAVE_POWER8
|
||||
static inline unsigned long polynomial_multiply(unsigned int a, unsigned int b) {
|
||||
vector unsigned int va = {a, 0, 0, 0};
|
||||
vector unsigned int vb = {b, 0, 0, 0};
|
||||
@@ -134,7 +134,7 @@ uint32_t ceph_crc32c_ppc(uint32_t crc, unsigned char const *data, unsigned len)
|
||||
return crc;
|
||||
}
|
||||
|
||||
-#else /* HAVE_POWER8 */
|
||||
+#else /* HAVE_PPC64LE */
|
||||
|
||||
/* This symbol has to exist on non-ppc architectures (and on legacy
|
||||
* ppc systems using power7 or below) in order to compile properly
|
||||
@@ -145,4 +145,4 @@ uint32_t ceph_crc32c_ppc(uint32_t crc, unsigned char const *data, unsigned len)
|
||||
return 0;
|
||||
}
|
||||
|
||||
-#endif /* HAVE_POWER8 */
|
||||
+#endif /* HAVE_PPC64LE */
|
||||
--
|
||||
2.9.4
|
||||
|
31
0003-librbd-Conditionally-import-TrimRequest.cc.patch
Normal file
31
0003-librbd-Conditionally-import-TrimRequest.cc.patch
Normal file
@ -0,0 +1,31 @@
|
||||
From 74a754690736f6608b0d4d9c807df0bd777a129d Mon Sep 17 00:00:00 2001
|
||||
From: Boris Ranto <branto@redhat.com>
|
||||
Date: Fri, 8 Dec 2017 00:21:38 +0100
|
||||
Subject: [PATCH] librbd: Conditionally import TrimRequest.cc
|
||||
|
||||
We include TrimRequest.cc in librbd tests at two places:
|
||||
- operation/test_mock_TrimRequest.cc
|
||||
- operation/test_mock_ResizeRequest.cc
|
||||
|
||||
That causes linking errors when doing the builds because some of the
|
||||
structures are defined twice.
|
||||
|
||||
Signed-off-by: Boris Ranto <branto@redhat.com>
|
||||
---
|
||||
src/librbd/operation/TrimRequest.cc | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/src/librbd/operation/TrimRequest.cc b/src/librbd/operation/TrimRequest.cc
|
||||
index 28f2deb..929ca51 100644
|
||||
--- a/src/librbd/operation/TrimRequest.cc
|
||||
+++ b/src/librbd/operation/TrimRequest.cc
|
||||
@@ -362,4 +362,6 @@ void TrimRequest<I>::send_finish(int r) {
|
||||
} // namespace operation
|
||||
} // namespace librbd
|
||||
|
||||
+#ifndef TEST_F
|
||||
template class librbd::operation::TrimRequest<librbd::ImageCtx>;
|
||||
+#endif
|
||||
--
|
||||
2.9.5
|
||||
|
@ -1,10 +0,0 @@
|
||||
--- ceph-15.1.0/src/common/bit_str.h.orig 2020-02-03 09:47:20.047149798 -0500
|
||||
+++ ceph-15.1.0/src/common/bit_str.h 2020-02-03 09:47:50.213149798 -0500
|
||||
@@ -17,6 +17,7 @@
|
||||
#include <cstdint>
|
||||
#include <iosfwd>
|
||||
#include <functional>
|
||||
+#include <ostream>
|
||||
|
||||
namespace ceph {
|
||||
class Formatter;
|
26
0004-mount-Enlarge-buffer-to-fix-overflow-warning.patch
Normal file
26
0004-mount-Enlarge-buffer-to-fix-overflow-warning.patch
Normal file
@ -0,0 +1,26 @@
|
||||
From 5ef603f388957b472326180a1e23ade61e80c163 Mon Sep 17 00:00:00 2001
|
||||
From: "Adam C. Emerson" <aemerson@redhat.com>
|
||||
Date: Tue, 8 May 2018 16:50:02 -0400
|
||||
Subject: [PATCH] mount: Enlarge buffer to fix overflow warning
|
||||
|
||||
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
|
||||
---
|
||||
src/mount/canonicalize.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/mount/canonicalize.c b/src/mount/canonicalize.c
|
||||
index 7561e41ac5..02efbbedff 100644
|
||||
--- a/src/mount/canonicalize.c
|
||||
+++ b/src/mount/canonicalize.c
|
||||
@@ -154,7 +154,7 @@ canonicalize_dm_name(const char *ptname)
|
||||
{
|
||||
FILE *f;
|
||||
size_t sz;
|
||||
- char path[256], name[256], *res = NULL;
|
||||
+ char path[268], name[256], *res = NULL;
|
||||
|
||||
snprintf(path, sizeof(path), "/sys/block/%s/dm/name", ptname);
|
||||
if (!(f = fopen(path, "r")))
|
||||
--
|
||||
2.14.3
|
||||
|
33
0005-Disable-rocksdb-Werror.patch
Normal file
33
0005-Disable-rocksdb-Werror.patch
Normal file
@ -0,0 +1,33 @@
|
||||
diff -ur ceph-12.2.5/src/rocksdb/CMakeLists.txt ceph-12.2.5-mod/src/rocksdb/CMakeLists.txt
|
||||
--- ceph-12.2.5/src/rocksdb/CMakeLists.txt 2018-03-12 02:58:51.000000000 +0100
|
||||
+++ ceph-12.2.5-mod/src/rocksdb/CMakeLists.txt 2018-05-22 19:37:31.767465710 +0200
|
||||
@@ -174,15 +174,6 @@
|
||||
PROPERTIES COMPILE_FLAGS "-msse4.2")
|
||||
endif()
|
||||
|
||||
-option(FAIL_ON_WARNINGS "Treat compile warnings as errors" ON)
|
||||
-if(FAIL_ON_WARNINGS)
|
||||
- if(MSVC)
|
||||
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /WX")
|
||||
- else() # assume GCC
|
||||
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
|
||||
- endif()
|
||||
-endif()
|
||||
-
|
||||
option(WITH_ASAN "build with ASAN" OFF)
|
||||
if(WITH_ASAN)
|
||||
add_definitions(-DROCKSDB_TSAN_RUN)
|
||||
diff -ur ceph-12.2.5/src/rocksdb/Makefile ceph-12.2.5-mod/src/rocksdb/Makefile
|
||||
--- ceph-12.2.5/src/rocksdb/Makefile 2018-03-12 02:58:51.000000000 +0100
|
||||
+++ ceph-12.2.5-mod/src/rocksdb/Makefile 2018-05-22 19:37:59.043996026 +0200
|
||||
@@ -243,10 +243,6 @@
|
||||
WARNING_FLAGS = -W -Wextra -Wall -Wsign-compare -Wshadow \
|
||||
-Wno-unused-parameter
|
||||
|
||||
-ifndef DISABLE_WARNING_AS_ERROR
|
||||
- WARNING_FLAGS += -Werror
|
||||
-endif
|
||||
-
|
||||
|
||||
ifdef LUA_PATH
|
||||
|
72
0006-python-to-python3.patch
Normal file
72
0006-python-to-python3.patch
Normal file
@ -0,0 +1,72 @@
|
||||
diff -ur ceph-12.2.5/src/brag/client/ceph-brag ceph-12.2.5-mod/src/brag/client/ceph-brag
|
||||
--- ceph-12.2.5/src/brag/client/ceph-brag 2018-04-23 18:18:33.000000000 +0200
|
||||
+++ ceph-12.2.5-mod/src/brag/client/ceph-brag 2018-05-22 21:06:32.952813105 +0200
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
diff -ur ceph-12.2.5/src/ceph-create-keys ceph-12.2.5-mod/src/ceph-create-keys
|
||||
--- ceph-12.2.5/src/ceph-create-keys 2018-04-23 18:18:33.000000000 +0200
|
||||
+++ ceph-12.2.5-mod/src/ceph-create-keys 2018-05-22 21:09:49.103398176 +0200
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
import argparse
|
||||
import errno
|
||||
import json
|
||||
diff -ur ceph-12.2.5/src/ceph-detect-init/ceph_detect_init/main.py ceph-12.2.5-mod/src/ceph-detect-init/ceph_detect_init/main.py
|
||||
--- ceph-12.2.5/src/ceph-detect-init/ceph_detect_init/main.py 2018-04-23 18:18:33.000000000 +0200
|
||||
+++ ceph-12.2.5-mod/src/ceph-detect-init/ceph_detect_init/main.py 2018-05-22 21:09:14.943993086 +0200
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
#
|
||||
# Copyright (C) 2015 <contact@redhat.com>
|
||||
# Copyright (C) 2015 SUSE LINUX GmbH
|
||||
diff -ur ceph-12.2.5/src/ceph-disk/ceph_disk/main.py ceph-12.2.5-mod/src/ceph-disk/ceph_disk/main.py
|
||||
--- ceph-12.2.5/src/ceph-disk/ceph_disk/main.py 2018-04-23 18:18:33.000000000 +0200
|
||||
+++ ceph-12.2.5-mod/src/ceph-disk/ceph_disk/main.py 2018-05-22 21:11:02.606118074 +0200
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
#
|
||||
# Copyright (C) 2015, 2016, 2017 Red Hat <contact@redhat.com>
|
||||
# Copyright (C) 2014 Inktank <info@inktank.com>
|
||||
diff -ur ceph-12.2.5/src/ceph-rest-api ceph-12.2.5-mod/src/ceph-rest-api
|
||||
--- ceph-12.2.5/src/ceph-rest-api 2018-04-23 18:18:33.000000000 +0200
|
||||
+++ ceph-12.2.5-mod/src/ceph-rest-api 2018-05-22 21:10:50.202334095 +0200
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
# vim: ts=4 sw=4 smarttab expandtab
|
||||
|
||||
import argparse
|
||||
diff -ur ceph-12.2.5/src/ceph-volume/bin/ceph-volume ceph-12.2.5-mod/src/ceph-volume/bin/ceph-volume
|
||||
--- ceph-12.2.5/src/ceph-volume/bin/ceph-volume 2018-04-23 18:18:33.000000000 +0200
|
||||
+++ ceph-12.2.5-mod/src/ceph-volume/bin/ceph-volume 2018-05-22 21:07:43.104592535 +0200
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
|
||||
from ceph_volume import main
|
||||
|
||||
diff -ur ceph-12.2.5/src/ceph-volume/bin/ceph-volume-systemd ceph-12.2.5-mod/src/ceph-volume/bin/ceph-volume-systemd
|
||||
--- ceph-12.2.5/src/ceph-volume/bin/ceph-volume-systemd 2018-04-23 18:18:33.000000000 +0200
|
||||
+++ ceph-12.2.5-mod/src/ceph-volume/bin/ceph-volume-systemd 2018-05-22 21:07:46.628531163 +0200
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
|
||||
from ceph_volume.systemd import main
|
||||
|
||||
diff -ur ceph-12.2.5/src/mount.fuse.ceph ceph-12.2.5-mod/src/mount.fuse.ceph
|
||||
--- ceph-12.2.5/src/mount.fuse.ceph 2018-04-23 18:18:33.000000000 +0200
|
||||
+++ ceph-12.2.5-mod/src/mount.fuse.ceph 2018-05-22 21:08:06.355187609 +0200
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
'''
|
||||
Helper to mount ceph-fuse from /etc/fstab. To use, add an entry
|
||||
like:
|
49
0007-Strip-away-python2.patch
Normal file
49
0007-Strip-away-python2.patch
Normal file
@ -0,0 +1,49 @@
|
||||
From 680066203eb1e4c7334d4ce84e4b42e97d990ad6 Mon Sep 17 00:00:00 2001
|
||||
From: Boris Ranto <branto@redhat.com>
|
||||
Date: Wed, 30 May 2018 08:58:47 +0200
|
||||
Subject: [PATCH] Strip away python2
|
||||
|
||||
---
|
||||
src/CMakeLists.txt | 4 ----
|
||||
src/pybind/CMakeLists.txt | 3 +--
|
||||
2 files changed, 1 insertion(+), 6 deletions(-)
|
||||
|
||||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
||||
index 2b59424f74..788e29c8a2 100644
|
||||
--- a/src/CMakeLists.txt
|
||||
+++ b/src/CMakeLists.txt
|
||||
@@ -243,10 +243,6 @@ if(WITH_CEPHFS_JAVA)
|
||||
add_subdirectory(java)
|
||||
endif()
|
||||
|
||||
-# Python stuff
|
||||
-find_package(PythonInterp 2 REQUIRED)
|
||||
-find_package(PythonLibs 2 REQUIRED)
|
||||
-
|
||||
option(WITH_PYTHON3 "build python3 bindings" "CHECK")
|
||||
if(WITH_PYTHON3 MATCHES "check|CHECK")
|
||||
find_package(Python3Interp 3 QUIET)
|
||||
diff --git a/src/pybind/CMakeLists.txt b/src/pybind/CMakeLists.txt
|
||||
index dbdb23f1c5..1a14df972e 100644
|
||||
--- a/src/pybind/CMakeLists.txt
|
||||
+++ b/src/pybind/CMakeLists.txt
|
||||
@@ -6,7 +6,6 @@ set(CYTHON_MODULE_DIR ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/cython_modules)
|
||||
if(WITH_PYTHON3)
|
||||
set(py_vers 3)
|
||||
endif()
|
||||
-list(APPEND py_vers 2)
|
||||
|
||||
foreach(python_version ${py_vers})
|
||||
if(${python_version} EQUAL 2)
|
||||
@@ -58,7 +57,7 @@ endforeach()
|
||||
|
||||
install(FILES
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/ceph_rest_api.py
|
||||
- DESTINATION ${PYTHON_INSTDIR})
|
||||
+ DESTINATION ${PYTHON${PYTHON_VERSION}_INSTDIR})
|
||||
|
||||
if(WITH_MGR)
|
||||
# Location needs to match default setting for mgr_module_path, currently:
|
||||
--
|
||||
2.14.3
|
||||
|
23
0008-Fix-python-executable.patch
Normal file
23
0008-Fix-python-executable.patch
Normal file
@ -0,0 +1,23 @@
|
||||
From f1d4451ab56bd8b13ffcbafd165d5038bc7a2b19 Mon Sep 17 00:00:00 2001
|
||||
From: Boris Ranto <branto@redhat.com>
|
||||
Date: Wed, 6 Jun 2018 21:38:47 +0200
|
||||
Subject: [PATCH] Fix python executable
|
||||
|
||||
Signed-off-by: Boris Ranto <branto@redhat.com>
|
||||
---
|
||||
src/ceph.in | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/ceph.in b/src/ceph.in
|
||||
index 7c1eda2c09..5e0471cb74 100755
|
||||
--- a/src/ceph.in
|
||||
+++ b/src/ceph.in
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!@PYTHON_EXECUTABLE@
|
||||
+#!@PYTHON3_EXECUTABLE@
|
||||
# -*- mode:python -*-
|
||||
# vim: ts=4 sw=4 smarttab expandtab
|
||||
#
|
||||
--
|
||||
2.14.3
|
||||
|
@ -1,11 +0,0 @@
|
||||
--- ceph-16.1.0-43-g6b74fb5c/cmake/modules/Finduring.cmake.orig 2021-02-01 08:45:39.316108287 -0500
|
||||
+++ ceph-16.1.0-43-g6b74fb5c/cmake/modules/Finduring.cmake 2021-02-01 08:45:59.813665378 -0500
|
||||
@@ -5,7 +5,7 @@
|
||||
# uring_FOUND - True if uring found.
|
||||
|
||||
find_path(URING_INCLUDE_DIR liburing.h)
|
||||
-find_library(URING_LIBRARIES liburing.a liburing)
|
||||
+find_library(URING_LIBRARIES liburing.so liburing)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(uring DEFAULT_MSG URING_LIBRARIES URING_INCLUDE_DIR)
|
@ -1,27 +0,0 @@
|
||||
From 1999108aeb1f6f93a19ea7bb64c6ae8b87d1b264 Mon Sep 17 00:00:00 2001
|
||||
From: "H.J. Lu" <hjl.tools@gmail.com>
|
||||
Date: Thu, 20 Jan 2022 05:33:13 -0800
|
||||
Subject: [PATCH] CET: Add CET marker to crc32c_intel_fast_zero_asm.s
|
||||
|
||||
Add .note.gnu.property section to crc32c_intel_fast_zero_asm.s to mark
|
||||
for IBT and SHSTK compatibility.
|
||||
---
|
||||
src/common/crc32c_intel_fast_zero_asm.s | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/src/common/crc32c_intel_fast_zero_asm.s b/src/common/crc32c_intel_fast_zero_asm.s
|
||||
index 216ecf639f3..2e291d858f3 100644
|
||||
--- a/src/common/crc32c_intel_fast_zero_asm.s
|
||||
+++ b/src/common/crc32c_intel_fast_zero_asm.s
|
||||
@@ -654,4 +654,8 @@ slversion crc32_iscsi_zero_00, 00, 02, 0014
|
||||
%ifidn __OUTPUT_FORMAT__, elf64
|
||||
; inform linker that this doesn't require executable stack
|
||||
section .note.GNU-stack noalloc noexec nowrite progbits
|
||||
+; inform linker that this is compatible with IBT and SHSTK
|
||||
+section .note.gnu.property note alloc noexec align=8
|
||||
+DD 0x00000004,0x00000010,0x00000005,0x00554e47
|
||||
+DD 0xc0000002,0x00000004,0x00000003,0x00000000
|
||||
%endif
|
||||
--
|
||||
2.34.1
|
||||
|
@ -1,172 +0,0 @@
|
||||
From bbcc1a69f787881f16156f3c789052942a564103 Mon Sep 17 00:00:00 2001
|
||||
From: "H.J. Lu" <hjl.tools@gmail.com>
|
||||
Date: Thu, 20 Jan 2022 05:35:49 -0800
|
||||
Subject: [PATCH] isa-l/CET: Add CET marker to x86-64 crc32 assembly codes
|
||||
|
||||
Add .note.gnu.property section to x86-64 crc32 assembly codes to mark
|
||||
for IBT and SHSTK compatibility.
|
||||
---
|
||||
crc/crc32_gzip_refl_by16_10.asm | 9 +++++++++
|
||||
crc/crc32_gzip_refl_by8.asm | 9 +++++++++
|
||||
crc/crc32_gzip_refl_by8_02.asm | 9 +++++++++
|
||||
crc/crc32_ieee_01.asm | 8 ++++++++
|
||||
crc/crc32_ieee_02.asm | 9 +++++++++
|
||||
crc/crc32_ieee_by16_10.asm | 9 +++++++++
|
||||
crc/crc32_ieee_by4.asm | 9 +++++++++
|
||||
crc/crc32_iscsi_00.asm | 8 ++++++++
|
||||
crc/crc32_iscsi_01.asm | 8 ++++++++
|
||||
9 files changed, 78 insertions(+)
|
||||
|
||||
diff --git a/src/isa-l/crc/crc32_gzip_refl_by16_10.asm b/src/isa-l/crc/crc32_gzip_refl_by16_10.asm
|
||||
index 40236f6..b16874d 100644
|
||||
--- a/src/isa-l/crc/crc32_gzip_refl_by16_10.asm
|
||||
+++ b/src/isa-l/crc/crc32_gzip_refl_by16_10.asm
|
||||
@@ -566,3 +566,12 @@ global no_ %+ FUNCTION_NAME
|
||||
no_ %+ FUNCTION_NAME %+ :
|
||||
%endif
|
||||
%endif ; (AS_FEATURE_LEVEL) >= 10
|
||||
+
|
||||
+%ifidn __OUTPUT_FORMAT__, elf64
|
||||
+; inform linker that this doesn't require executable stack
|
||||
+section .note.GNU-stack noalloc noexec nowrite progbits
|
||||
+; inform linker that this is compatible with IBT and SHSTK
|
||||
+section .note.gnu.property note alloc noexec align=8
|
||||
+DD 0x00000004,0x00000010,0x00000005,0x00554e47
|
||||
+DD 0xc0000002,0x00000004,0x00000003,0x00000000
|
||||
+%endif
|
||||
diff --git a/src/isa-l/crc/crc32_gzip_refl_by8.asm b/src/isa-l/crc/crc32_gzip_refl_by8.asm
|
||||
index 62f7e7d..97b0c4a 100644
|
||||
--- a/src/isa-l/crc/crc32_gzip_refl_by8.asm
|
||||
+++ b/src/isa-l/crc/crc32_gzip_refl_by8.asm
|
||||
@@ -622,3 +622,12 @@ dq 0x0706050403020100, 0x000e0d0c0b0a0908
|
||||
|
||||
;;; func core, ver, snum
|
||||
slversion crc32_gzip_refl_by8, 01, 00, 002c
|
||||
+
|
||||
+%ifidn __OUTPUT_FORMAT__, elf64
|
||||
+; inform linker that this doesn't require executable stack
|
||||
+section .note.GNU-stack noalloc noexec nowrite progbits
|
||||
+; inform linker that this is compatible with IBT and SHSTK
|
||||
+section .note.gnu.property note alloc noexec align=8
|
||||
+DD 0x00000004,0x00000010,0x00000005,0x00554e47
|
||||
+DD 0xc0000002,0x00000004,0x00000003,0x00000000
|
||||
+%endif
|
||||
diff --git a/src/isa-l/crc/crc32_gzip_refl_by8_02.asm b/src/isa-l/crc/crc32_gzip_refl_by8_02.asm
|
||||
index 80d849e..1d5a75f 100644
|
||||
--- a/src/isa-l/crc/crc32_gzip_refl_by8_02.asm
|
||||
+++ b/src/isa-l/crc/crc32_gzip_refl_by8_02.asm
|
||||
@@ -553,3 +553,12 @@ pshufb_shf_table:
|
||||
; dq 0x060504030201008f, 0x0e0d0c0b0a090807 ; shl 1 (16-15) / shr15
|
||||
dq 0x8786858483828100, 0x8f8e8d8c8b8a8988
|
||||
dq 0x0706050403020100, 0x000e0d0c0b0a0908
|
||||
+
|
||||
+%ifidn __OUTPUT_FORMAT__, elf64
|
||||
+; inform linker that this doesn't require executable stack
|
||||
+section .note.GNU-stack noalloc noexec nowrite progbits
|
||||
+; inform linker that this is compatible with IBT and SHSTK
|
||||
+section .note.gnu.property note alloc noexec align=8
|
||||
+DD 0x00000004,0x00000010,0x00000005,0x00554e47
|
||||
+DD 0xc0000002,0x00000004,0x00000003,0x00000000
|
||||
+%endif
|
||||
diff --git a/src/isa-l/crc/crc32_ieee_01.asm b/src/isa-l/crc/crc32_ieee_01.asm
|
||||
index 32495ed..cfc443b 100644
|
||||
--- a/src/isa-l/crc/crc32_ieee_01.asm
|
||||
+++ b/src/isa-l/crc/crc32_ieee_01.asm
|
||||
@@ -653,3 +653,11 @@ dq 0x0706050403020100, 0x000e0d0c0b0a0908
|
||||
;;; func core, ver, snum
|
||||
slversion crc32_ieee_01, 01, 06, 0011
|
||||
|
||||
+%ifidn __OUTPUT_FORMAT__, elf64
|
||||
+; inform linker that this doesn't require executable stack
|
||||
+section .note.GNU-stack noalloc noexec nowrite progbits
|
||||
+; inform linker that this is compatible with IBT and SHSTK
|
||||
+section .note.gnu.property note alloc noexec align=8
|
||||
+DD 0x00000004,0x00000010,0x00000005,0x00554e47
|
||||
+DD 0xc0000002,0x00000004,0x00000003,0x00000000
|
||||
+%endif
|
||||
diff --git a/src/isa-l/crc/crc32_ieee_02.asm b/src/isa-l/crc/crc32_ieee_02.asm
|
||||
index 8a472b0..dd7096a 100644
|
||||
--- a/src/isa-l/crc/crc32_ieee_02.asm
|
||||
+++ b/src/isa-l/crc/crc32_ieee_02.asm
|
||||
@@ -649,3 +649,12 @@ pshufb_shf_table:
|
||||
; dq 0x060504030201008f, 0x0e0d0c0b0a090807 ; shl 1 (16-15) / shr15
|
||||
dq 0x8786858483828100, 0x8f8e8d8c8b8a8988
|
||||
dq 0x0706050403020100, 0x000e0d0c0b0a0908
|
||||
+
|
||||
+%ifidn __OUTPUT_FORMAT__, elf64
|
||||
+; inform linker that this doesn't require executable stack
|
||||
+section .note.GNU-stack noalloc noexec nowrite progbits
|
||||
+; inform linker that this is compatible with IBT and SHSTK
|
||||
+section .note.gnu.property note alloc noexec align=8
|
||||
+DD 0x00000004,0x00000010,0x00000005,0x00554e47
|
||||
+DD 0xc0000002,0x00000004,0x00000003,0x00000000
|
||||
+%endif
|
||||
diff --git a/src/isa-l/crc/crc32_ieee_by16_10.asm b/src/isa-l/crc/crc32_ieee_by16_10.asm
|
||||
index 200fd93..2afd597 100644
|
||||
--- a/src/isa-l/crc/crc32_ieee_by16_10.asm
|
||||
+++ b/src/isa-l/crc/crc32_ieee_by16_10.asm
|
||||
@@ -582,3 +582,12 @@ global no_ %+ FUNCTION_NAME
|
||||
no_ %+ FUNCTION_NAME %+ :
|
||||
%endif
|
||||
%endif ; (AS_FEATURE_LEVEL) >= 10
|
||||
+
|
||||
+%ifidn __OUTPUT_FORMAT__, elf64
|
||||
+; inform linker that this doesn't require executable stack
|
||||
+section .note.GNU-stack noalloc noexec nowrite progbits
|
||||
+; inform linker that this is compatible with IBT and SHSTK
|
||||
+section .note.gnu.property note alloc noexec align=8
|
||||
+DD 0x00000004,0x00000010,0x00000005,0x00554e47
|
||||
+DD 0xc0000002,0x00000004,0x00000003,0x00000000
|
||||
+%endif
|
||||
diff --git a/src/isa-l/crc/crc32_ieee_by4.asm b/src/isa-l/crc/crc32_ieee_by4.asm
|
||||
index 39bed5a..847d0bd 100644
|
||||
--- a/src/isa-l/crc/crc32_ieee_by4.asm
|
||||
+++ b/src/isa-l/crc/crc32_ieee_by4.asm
|
||||
@@ -563,3 +563,12 @@ SHUF_MASK dq 0x08090A0B0C0D0E0F, 0x0001020304050607
|
||||
|
||||
;;; func core, ver, snum
|
||||
slversion crc32_ieee_by4, 05, 02, 0017
|
||||
+
|
||||
+%ifidn __OUTPUT_FORMAT__, elf64
|
||||
+; inform linker that this doesn't require executable stack
|
||||
+section .note.GNU-stack noalloc noexec nowrite progbits
|
||||
+; inform linker that this is compatible with IBT and SHSTK
|
||||
+section .note.gnu.property note alloc noexec align=8
|
||||
+DD 0x00000004,0x00000010,0x00000005,0x00554e47
|
||||
+DD 0xc0000002,0x00000004,0x00000003,0x00000000
|
||||
+%endif
|
||||
diff --git a/src/isa-l/crc/crc32_iscsi_00.asm b/src/isa-l/crc/crc32_iscsi_00.asm
|
||||
index 4f81e3a..3d6b2d1 100644
|
||||
--- a/src/isa-l/crc/crc32_iscsi_00.asm
|
||||
+++ b/src/isa-l/crc/crc32_iscsi_00.asm
|
||||
@@ -669,3 +669,11 @@ DD 0x54851c7f,0x89e3d7c4,0xeba4fdf8,0x36c23643
|
||||
;;; func core, ver, snum
|
||||
slversion crc32_iscsi_00, 00, 04, 0014
|
||||
|
||||
+%ifidn __OUTPUT_FORMAT__, elf64
|
||||
+; inform linker that this doesn't require executable stack
|
||||
+section .note.GNU-stack noalloc noexec nowrite progbits
|
||||
+; inform linker that this is compatible with IBT and SHSTK
|
||||
+section .note.gnu.property note alloc noexec align=8
|
||||
+DD 0x00000004,0x00000010,0x00000005,0x00554e47
|
||||
+DD 0xc0000002,0x00000004,0x00000003,0x00000000
|
||||
+%endif
|
||||
diff --git a/src/isa-l/crc/crc32_iscsi_01.asm b/src/isa-l/crc/crc32_iscsi_01.asm
|
||||
index 2a81517..c048413 100644
|
||||
--- a/src/isa-l/crc/crc32_iscsi_01.asm
|
||||
+++ b/src/isa-l/crc/crc32_iscsi_01.asm
|
||||
@@ -588,3 +588,11 @@ K_table:
|
||||
;;; func core, ver, snum
|
||||
slversion crc32_iscsi_01, 01, 04, 0015
|
||||
|
||||
+%ifidn __OUTPUT_FORMAT__, elf64
|
||||
+; inform linker that this doesn't require executable stack
|
||||
+section .note.GNU-stack noalloc noexec nowrite progbits
|
||||
+; inform linker that this is compatible with IBT and SHSTK
|
||||
+section .note.gnu.property note alloc noexec align=8
|
||||
+DD 0x00000004,0x00000010,0x00000005,0x00554e47
|
||||
+DD 0xc0000002,0x00000004,0x00000003,0x00000000
|
||||
+%endif
|
||||
--
|
||||
2.34.1
|
||||
|
@ -1,100 +0,0 @@
|
||||
From 72e6d27e08c86c16e8931739a5e6ecbc06b102d5 Mon Sep 17 00:00:00 2001
|
||||
From: "H.J. Lu" <hjl.tools@gmail.com>
|
||||
Date: Thu, 20 Jan 2022 05:40:56 -0800
|
||||
Subject: [PATCH] spdk/isa-l/CET: Add CET marker to x86-64 crc32 assembly codes
|
||||
|
||||
Add .note.gnu.property section to x86-64 crc32 assembly codes to mark
|
||||
for IBT and SHSTK compatibility.
|
||||
---
|
||||
crc/crc32_gzip_refl_by8.asm | 9 +++++++++
|
||||
crc/crc32_ieee_01.asm | 8 ++++++++
|
||||
crc/crc32_ieee_by4.asm | 9 +++++++++
|
||||
crc/crc32_iscsi_00.asm | 8 ++++++++
|
||||
crc/crc32_iscsi_01.asm | 8 ++++++++
|
||||
5 files changed, 42 insertions(+)
|
||||
|
||||
diff --git a/src/spdk/isa-l/crc/crc32_gzip_refl_by8.asm b/src/spdk/isa-l/crc/crc32_gzip_refl_by8.asm
|
||||
index 62f7e7d..97b0c4a 100644
|
||||
--- a/src/spdk/isa-l/crc/crc32_gzip_refl_by8.asm
|
||||
+++ b/src/spdk/isa-l/crc/crc32_gzip_refl_by8.asm
|
||||
@@ -622,3 +622,12 @@ dq 0x0706050403020100, 0x000e0d0c0b0a0908
|
||||
|
||||
;;; func core, ver, snum
|
||||
slversion crc32_gzip_refl_by8, 01, 00, 002c
|
||||
+
|
||||
+%ifidn __OUTPUT_FORMAT__, elf64
|
||||
+; inform linker that this doesn't require executable stack
|
||||
+section .note.GNU-stack noalloc noexec nowrite progbits
|
||||
+; inform linker that this is compatible with IBT and SHSTK
|
||||
+section .note.gnu.property note alloc noexec align=8
|
||||
+DD 0x00000004,0x00000010,0x00000005,0x00554e47
|
||||
+DD 0xc0000002,0x00000004,0x00000003,0x00000000
|
||||
+%endif
|
||||
diff --git a/src/spdk/isa-l/crc/crc32_ieee_01.asm b/src/spdk/isa-l/crc/crc32_ieee_01.asm
|
||||
index 32495ed..cfc443b 100644
|
||||
--- a/src/spdk/isa-l/crc/crc32_ieee_01.asm
|
||||
+++ b/src/spdk/isa-l/crc/crc32_ieee_01.asm
|
||||
@@ -653,3 +653,11 @@ dq 0x0706050403020100, 0x000e0d0c0b0a0908
|
||||
;;; func core, ver, snum
|
||||
slversion crc32_ieee_01, 01, 06, 0011
|
||||
|
||||
+%ifidn __OUTPUT_FORMAT__, elf64
|
||||
+; inform linker that this doesn't require executable stack
|
||||
+section .note.GNU-stack noalloc noexec nowrite progbits
|
||||
+; inform linker that this is compatible with IBT and SHSTK
|
||||
+section .note.gnu.property note alloc noexec align=8
|
||||
+DD 0x00000004,0x00000010,0x00000005,0x00554e47
|
||||
+DD 0xc0000002,0x00000004,0x00000003,0x00000000
|
||||
+%endif
|
||||
diff --git a/src/spdk/isa-l/crc/crc32_ieee_by4.asm b/src/spdk/isa-l/crc/crc32_ieee_by4.asm
|
||||
index 39bed5a..847d0bd 100644
|
||||
--- a/src/spdk/isa-l/crc/crc32_ieee_by4.asm
|
||||
+++ b/src/spdk/isa-l/crc/crc32_ieee_by4.asm
|
||||
@@ -563,3 +563,12 @@ SHUF_MASK dq 0x08090A0B0C0D0E0F, 0x0001020304050607
|
||||
|
||||
;;; func core, ver, snum
|
||||
slversion crc32_ieee_by4, 05, 02, 0017
|
||||
+
|
||||
+%ifidn __OUTPUT_FORMAT__, elf64
|
||||
+; inform linker that this doesn't require executable stack
|
||||
+section .note.GNU-stack noalloc noexec nowrite progbits
|
||||
+; inform linker that this is compatible with IBT and SHSTK
|
||||
+section .note.gnu.property note alloc noexec align=8
|
||||
+DD 0x00000004,0x00000010,0x00000005,0x00554e47
|
||||
+DD 0xc0000002,0x00000004,0x00000003,0x00000000
|
||||
+%endif
|
||||
diff --git a/src/spdk/isa-l/crc/crc32_iscsi_00.asm b/src/spdk/isa-l/crc/crc32_iscsi_00.asm
|
||||
index 4f81e3a..3d6b2d1 100644
|
||||
--- a/src/spdk/isa-l/crc/crc32_iscsi_00.asm
|
||||
+++ b/src/spdk/isa-l/crc/crc32_iscsi_00.asm
|
||||
@@ -669,3 +669,11 @@ DD 0x54851c7f,0x89e3d7c4,0xeba4fdf8,0x36c23643
|
||||
;;; func core, ver, snum
|
||||
slversion crc32_iscsi_00, 00, 04, 0014
|
||||
|
||||
+%ifidn __OUTPUT_FORMAT__, elf64
|
||||
+; inform linker that this doesn't require executable stack
|
||||
+section .note.GNU-stack noalloc noexec nowrite progbits
|
||||
+; inform linker that this is compatible with IBT and SHSTK
|
||||
+section .note.gnu.property note alloc noexec align=8
|
||||
+DD 0x00000004,0x00000010,0x00000005,0x00554e47
|
||||
+DD 0xc0000002,0x00000004,0x00000003,0x00000000
|
||||
+%endif
|
||||
diff --git a/src/spdk/isa-l/crc/crc32_iscsi_01.asm b/src/spdk/isa-l/crc/crc32_iscsi_01.asm
|
||||
index 2a81517..c048413 100644
|
||||
--- a/src/spdk/isa-l/crc/crc32_iscsi_01.asm
|
||||
+++ b/src/spdk/isa-l/crc/crc32_iscsi_01.asm
|
||||
@@ -588,3 +588,11 @@ K_table:
|
||||
;;; func core, ver, snum
|
||||
slversion crc32_iscsi_01, 01, 04, 0015
|
||||
|
||||
+%ifidn __OUTPUT_FORMAT__, elf64
|
||||
+; inform linker that this doesn't require executable stack
|
||||
+section .note.GNU-stack noalloc noexec nowrite progbits
|
||||
+; inform linker that this is compatible with IBT and SHSTK
|
||||
+section .note.gnu.property note alloc noexec align=8
|
||||
+DD 0x00000004,0x00000010,0x00000005,0x00554e47
|
||||
+DD 0xc0000002,0x00000004,0x00000003,0x00000000
|
||||
+%endif
|
||||
--
|
||||
2.34.1
|
||||
|
@ -1,23 +0,0 @@
|
||||
--- ceph-16.2.6-681-gfdc003bc/src/tracing/bluestore.tp.orig 2021-12-07 08:02:04.682972474 -0500
|
||||
+++ ceph-16.2.6-681-gfdc003bc/src/tracing/bluestore.tp 2021-12-07 08:03:13.840771852 -0500
|
||||
@@ -1,3 +1,9 @@
|
||||
+
|
||||
+#ifdef __x86_64__
|
||||
+#undef STAP_SDT_ARG_CONSTRAINT
|
||||
+#define STAP_SDT_ARG_CONSTRAINT norx
|
||||
+#endif
|
||||
+
|
||||
#include "include/int_types.h"
|
||||
|
||||
TRACEPOINT_EVENT(bluestore, transaction_state_duration,
|
||||
--- ceph-16.2.6-681-gfdc003bc/src/tracing/librbd.tp.orig 2021-12-07 09:50:16.467579483 -0500
|
||||
+++ ceph-16.2.6-681-gfdc003bc/src/tracing/librbd.tp 2021-12-07 09:50:47.620026940 -0500
|
||||
@@ -1,3 +1,8 @@
|
||||
+#ifdef __x86_64__
|
||||
+#undef STAP_SDT_ARG_CONSTRAINT
|
||||
+#define STAP_SDT_ARG_CONSTRAINT norx
|
||||
+#endif
|
||||
+
|
||||
#include "tracing/tracing-common.h"
|
||||
#include "include/rbd/librbd.h"
|
||||
#include "include/int_types.h"
|
@ -1,42 +0,0 @@
|
||||
--- ceph-16.2.7/src/common/LogEntry.cc.orig 2022-01-17 13:52:10.799134159 -0500
|
||||
+++ ceph-16.2.7/src/common/LogEntry.cc 2022-01-17 13:52:47.244469274 -0500
|
||||
@@ -183,7 +183,7 @@
|
||||
return "crit";
|
||||
default:
|
||||
ceph_abort();
|
||||
- return 0;
|
||||
+ return "";
|
||||
}
|
||||
}
|
||||
|
||||
--- ceph-16.2.7/src/test/librados/tier_cxx.cc.orig 2022-01-19 09:30:47.209459506 -0500
|
||||
+++ ceph-16.2.7/src/test/librados/tier_cxx.cc 2022-01-19 10:02:47.783240298 -0500
|
||||
@@ -120,7 +120,7 @@
|
||||
}
|
||||
|
||||
void check_fp_oid_refcount(librados::IoCtx& ioctx, std::string foid, uint64_t count,
|
||||
- std::string fp_algo = NULL)
|
||||
+ std::string fp_algo = "")
|
||||
{
|
||||
bufferlist t;
|
||||
int size = foid.length();
|
||||
@@ -148,7 +148,7 @@
|
||||
ASSERT_LE(count, refs.count());
|
||||
}
|
||||
|
||||
-string get_fp_oid(string oid, std::string fp_algo = NULL)
|
||||
+string get_fp_oid(string oid, std::string fp_algo = "")
|
||||
{
|
||||
if (fp_algo == "sha1") {
|
||||
unsigned char fingerprint[CEPH_CRYPTO_SHA1_DIGESTSIZE + 1];
|
||||
--- ceph-17.0.0-10335-gfd206722/src/s3select/include/s3select_functions.h.orig 2022-02-11 17:21:40.268627997 -0500
|
||||
+++ ceph-17.0.0-10335-gfd206722/src/s3select/include/s3select_functions.h 2022-02-11 17:21:57.155325437 -0500
|
||||
@@ -466,7 +466,7 @@
|
||||
|
||||
std::string print(int ident) override
|
||||
{
|
||||
- return std::string(0);
|
||||
+ return std::string("");
|
||||
}
|
||||
|
||||
void push_argument(base_statement* arg)
|
@ -1,19 +0,0 @@
|
||||
--- ceph-18.0.0-3078-gc4847bf8/src/rgw/driver/dbstore/CMakeLists.txt.orig 2023-05-10 08:23:50.000000000 -0400
|
||||
+++ ceph-18.0.0-3078-gc4847bf8/src/rgw/driver/dbstore/CMakeLists.txt 2023-05-11 08:21:13.794152904 -0400
|
||||
@@ -24,7 +24,7 @@
|
||||
dbstore_mgr.cc
|
||||
)
|
||||
|
||||
-add_library(dbstore_lib ${dbstore_srcs})
|
||||
+add_library(dbstore_lib STATIC ${dbstore_srcs})
|
||||
target_include_directories(dbstore_lib
|
||||
PUBLIC "${CMAKE_SOURCE_DIR}/src/rgw"
|
||||
PUBLIC "${CMAKE_SOURCE_DIR}/src/rgw/store/rados"
|
||||
@@ -49,6 +49,7 @@
|
||||
|
||||
# add pthread library
|
||||
set (CMAKE_LINK_LIBRARIES ${CMAKE_LINK_LIBRARIES} pthread)
|
||||
+set (CMAKE_LINK_LIBRARIES ${CMAKE_LINK_LIBRARIES} global)
|
||||
|
||||
find_package(gtest QUIET)
|
||||
if(WITH_TESTS)
|
@ -1,11 +0,0 @@
|
||||
--- ceph-17.1.0-175-g086c8f84/src/arrow/cpp/cmake_modules/ThirdpartyToolchain.cmake.orig 2022-04-08 11:27:53.593570634 -0400
|
||||
+++ ceph-17.1.0-175-g086c8f84/src/arrow/cpp/cmake_modules/ThirdpartyToolchain.cmake 2022-04-08 11:28:20.778087653 -0400
|
||||
@@ -1991,7 +1991,7 @@
|
||||
|
||||
if((NOT ARROW_SIMD_LEVEL STREQUAL "NONE") OR (NOT ARROW_RUNTIME_SIMD_LEVEL STREQUAL "NONE"
|
||||
))
|
||||
- set(xsimd_SOURCE "BUNDLED")
|
||||
+ set(xsimd_SOURCE "SYSTEM")
|
||||
resolve_dependency(xsimd)
|
||||
# TODO: Don't use global includes but rather target_include_directories
|
||||
include_directories(SYSTEM ${XSIMD_INCLUDE_DIR})
|
@ -1,42 +0,0 @@
|
||||
--- ceph-18.1.2/src/common/subsys_types.h.orig 2023-06-27 15:59:59.000000000 -0400
|
||||
+++ ceph-18.1.2/src/common/subsys_types.h 2023-07-04 19:36:55.941238973 -0400
|
||||
@@ -54,7 +54,7 @@
|
||||
#undef DEFAULT_SUBSYS
|
||||
}
|
||||
|
||||
-constexpr static std::uint8_t
|
||||
+constexpr static uint8_t
|
||||
ceph_subsys_get_max_default_level(const std::size_t subidx) {
|
||||
const auto item = ceph_subsys_get_as_array()[subidx];
|
||||
return std::max(item.log_level, item.gather_level);
|
||||
--- ceph-18.1.2/src/msg/async/crypto_onwire.h.orig 2023-06-27 15:59:59.000000000 -0400
|
||||
+++ ceph-18.1.2/src/msg/async/crypto_onwire.h 2023-07-04 19:36:55.957238704 -0400
|
||||
@@ -95,7 +95,7 @@
|
||||
// Transmitter can append extra bytes of ciphertext at the -final step.
|
||||
// This method return how much was added, and thus let client translate
|
||||
// plaintext size into ciphertext size to grab from wire.
|
||||
- virtual std::uint32_t get_extra_size_at_final() = 0;
|
||||
+ virtual uint32_t get_extra_size_at_final() = 0;
|
||||
|
||||
// Instance of RxHandler must be reset before doing any decrypt-update
|
||||
// step. This applies also to situation when decrypt-final was already
|
||||
--- ceph-18.1.2/src/rocksdb/table/block_based/data_block_hash_index.h.orig 2023-05-24 15:55:23.000000000 -0400
|
||||
+++ ceph-18.1.2/src/rocksdb/table/block_based/data_block_hash_index.h 2023-07-04 19:36:55.971238469 -0400
|
||||
@@ -8,6 +8,7 @@
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
+#include <cstdint>
|
||||
|
||||
#include "rocksdb/slice.h"
|
||||
|
||||
--- ceph-18.1.2/src/rocksdb/util/string_util.h.orig 2023-05-24 15:55:23.000000000 -0400
|
||||
+++ ceph-18.1.2/src/rocksdb/util/string_util.h 2023-07-04 19:36:55.991238133 -0400
|
||||
@@ -11,6 +11,7 @@
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
+#include <cstdint>
|
||||
|
||||
#include "rocksdb/rocksdb_namespace.h"
|
||||
|
@ -1,17 +0,0 @@
|
||||
--- ceph-18.0.0-2726-g7cea3740/src/rgw/rgw_amqp.cc.orig 2023-03-14 18:22:35.636864260 -0400
|
||||
+++ ceph-18.0.0-2726-g7cea3740/src/rgw/rgw_amqp.cc 2023-03-14 18:24:36.362756771 -0400
|
||||
@@ -2,10 +2,10 @@
|
||||
// vim: ts=8 sw=2 smarttab ft=cpp
|
||||
|
||||
#include "rgw_amqp.h"
|
||||
-#include <amqp.h>
|
||||
-#include <amqp_ssl_socket.h>
|
||||
-#include <amqp_tcp_socket.h>
|
||||
-#include <amqp_framing.h>
|
||||
+#include <rabbitmq-c/amqp.h>
|
||||
+#include <rabbitmq-c/ssl_socket.h>
|
||||
+#include <rabbitmq-c/tcp_socket.h>
|
||||
+#include <rabbitmq-c/framing.h>
|
||||
#include "include/ceph_assert.h"
|
||||
#include <sstream>
|
||||
#include <cstring>
|
@ -1,61 +0,0 @@
|
||||
--- ceph-18.0.0-2726-g7cea3740/src/rgw/rgw_asio_client.cc.orig 2023-03-14 18:46:02.037195570 -0400
|
||||
+++ ceph-18.0.0-2726-g7cea3740/src/rgw/rgw_asio_client.cc 2023-03-14 18:55:14.446438244 -0400
|
||||
@@ -39,11 +39,13 @@
|
||||
const auto& value = header->value();
|
||||
|
||||
if (field == beast::http::field::content_length) {
|
||||
- env.set("CONTENT_LENGTH", value.to_string());
|
||||
+ std::string scratch{value.data(), value.size()};
|
||||
+ env.set("CONTENT_LENGTH", scratch.c_str());
|
||||
continue;
|
||||
}
|
||||
if (field == beast::http::field::content_type) {
|
||||
- env.set("CONTENT_TYPE", value.to_string());
|
||||
+ std::string scratch{value.data(), value.size()};
|
||||
+ env.set("CONTENT_TYPE", scratch.c_str());
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -62,26 +64,37 @@
|
||||
}
|
||||
*dest = '\0';
|
||||
|
||||
- env.set(buf, value.to_string());
|
||||
+ std::string scratch{value.data(), value.size()};
|
||||
+ env.set(buf, scratch.c_str());
|
||||
}
|
||||
|
||||
int major = request.version() / 10;
|
||||
int minor = request.version() % 10;
|
||||
env.set("HTTP_VERSION", std::to_string(major) + '.' + std::to_string(minor));
|
||||
|
||||
- env.set("REQUEST_METHOD", request.method_string().to_string());
|
||||
+ {
|
||||
+ std::string scratch {request.method_string().data(),request.method_string().size()};
|
||||
+ env.set("REQUEST_METHOD", scratch.c_str());
|
||||
+ }
|
||||
|
||||
// split uri from query
|
||||
auto uri = request.target();
|
||||
auto pos = uri.find('?');
|
||||
if (pos != uri.npos) {
|
||||
auto query = uri.substr(pos + 1);
|
||||
- env.set("QUERY_STRING", query.to_string());
|
||||
+ std::string scratch{query.data(), query.size()};
|
||||
+ env.set("QUERY_STRING", scratch.c_str());
|
||||
uri = uri.substr(0, pos);
|
||||
}
|
||||
- env.set("SCRIPT_URI", uri.to_string());
|
||||
+ {
|
||||
+ std::string scratch {uri.data(), uri.size()};
|
||||
+ env.set("SCRIPT_URI", scratch.c_str());
|
||||
+ }
|
||||
|
||||
- env.set("REQUEST_URI", request.target().to_string());
|
||||
+ {
|
||||
+ std::string scratch {request.target().data(), request.target().size()};
|
||||
+ env.set("REQUEST_URI", scratch.c_str());
|
||||
+ }
|
||||
|
||||
char port_buf[16];
|
||||
snprintf(port_buf, sizeof(port_buf), "%d", local_endpoint.port());
|
@ -1,24 +0,0 @@
|
||||
--- ceph-18.0.0-2950-g1c931bc4/cmake/modules/BuildBoost.cmake.orig 2023-04-28 18:30:19.133064577 -0400
|
||||
+++ ceph-18.0.0-2950-g1c931bc4/cmake/modules/BuildBoost.cmake 2023-04-28 18:31:55.290354383 -0400
|
||||
@@ -104,12 +104,21 @@
|
||||
set(user_config ${CMAKE_BINARY_DIR}/user-config.jam)
|
||||
# edit the user-config.jam so b2 will be able to use the specified
|
||||
# toolset and python
|
||||
+if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64")
|
||||
+ file(WRITE ${user_config}
|
||||
+ "using ${toolset}"
|
||||
+ " : "
|
||||
+ " : ${CMAKE_CXX_COMPILER}"
|
||||
+ " : <compileflags>-fPIC <compileflags>-w <compileflags>-fcf-protection <compileflags>-Wno-everything"
|
||||
+ " ;\n")
|
||||
+else()
|
||||
file(WRITE ${user_config}
|
||||
"using ${toolset}"
|
||||
" : "
|
||||
" : ${CMAKE_CXX_COMPILER}"
|
||||
" : <compileflags>-fPIC <compileflags>-w <compileflags>-Wno-everything"
|
||||
" ;\n")
|
||||
+endif()
|
||||
if(with_python_version)
|
||||
find_package(Python3 ${with_python_version} QUIET REQUIRED
|
||||
COMPONENTS Development)
|
@ -1,61 +0,0 @@
|
||||
--- ceph-17.2.6/src/boost/libs/context/src/asm/make_x86_64_sysv_elf_gas.S.orig 2023-04-30 14:25:35.009605033 -0400
|
||||
+++ ceph-17.2.6/src/boost/libs/context/src/asm/make_x86_64_sysv_elf_gas.S 2023-04-30 14:28:32.239465067 -0400
|
||||
@@ -80,3 +80,18 @@
|
||||
|
||||
/* Mark that we don't need executable stack. */
|
||||
.section .note.GNU-stack,"",%progbits
|
||||
+
|
||||
+.section .note.gnu.property
|
||||
+.align=8
|
||||
+
|
||||
+ .byte 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00
|
||||
+ .byte 0x05, 0x00, 0x00, 0x00, 0x47, 0x4E, 0x55, 0x00
|
||||
+ .byte 0x00, 0x00, 0x00, 0xC0, 0x04, 0x00, 0x00, 0x00
|
||||
+ .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
+ .byte 0x01, 0x00, 0x00, 0xC0, 0x04, 0x00, 0x00, 0x00
|
||||
+ .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
+ .byte 0x04, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00
|
||||
+ .byte 0x05, 0x00, 0x00, 0x00, 0x47, 0x4E, 0x55, 0x00
|
||||
+ .byte 0x02, 0x00, 0x00, 0xC0, 0x04, 0x00, 0x00, 0x00
|
||||
+ .byte 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
+
|
||||
--- ceph-17.2.6/src/boost/libs/context/src/asm/jump_x86_64_sysv_elf_gas.S.orig 2023-04-30 14:25:35.008605050 -0400
|
||||
+++ ceph-17.2.6/src/boost/libs/context/src/asm/jump_x86_64_sysv_elf_gas.S 2023-04-30 14:27:50.145210847 -0400
|
||||
@@ -89,3 +89,17 @@
|
||||
|
||||
/* Mark that we don't need executable stack. */
|
||||
.section .note.GNU-stack,"",%progbits
|
||||
+
|
||||
+.section .note.gnu.property
|
||||
+.align=8
|
||||
+
|
||||
+ .byte 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00
|
||||
+ .byte 0x05, 0x00, 0x00, 0x00, 0x47, 0x4E, 0x55, 0x00
|
||||
+ .byte 0x00, 0x00, 0x00, 0xC0, 0x04, 0x00, 0x00, 0x00
|
||||
+ .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
+ .byte 0x01, 0x00, 0x00, 0xC0, 0x04, 0x00, 0x00, 0x00
|
||||
+ .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
+ .byte 0x04, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00
|
||||
+ .byte 0x05, 0x00, 0x00, 0x00, 0x47, 0x4E, 0x55, 0x00
|
||||
+ .byte 0x02, 0x00, 0x00, 0xC0, 0x04, 0x00, 0x00, 0x00
|
||||
+ .byte 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
--- ceph-17.2.6/src/boost/libs/context/src/asm/ontop_x86_64_sysv_elf_gas.S.orig 2023-04-30 14:25:35.009605033 -0400
|
||||
+++ ceph-17.2.6/src/boost/libs/context/src/asm/ontop_x86_64_sysv_elf_gas.S 2023-04-30 14:29:30.402434597 -0400
|
||||
@@ -92,3 +92,17 @@
|
||||
|
||||
/* Mark that we don't need executable stack. */
|
||||
.section .note.GNU-stack,"",%progbits
|
||||
+
|
||||
+.section .note.gnu.property
|
||||
+.align=8
|
||||
+
|
||||
+ .byte 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00
|
||||
+ .byte 0x05, 0x00, 0x00, 0x00, 0x47, 0x4E, 0x55, 0x00
|
||||
+ .byte 0x00, 0x00, 0x00, 0xC0, 0x04, 0x00, 0x00, 0x00
|
||||
+ .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
+ .byte 0x01, 0x00, 0x00, 0xC0, 0x04, 0x00, 0x00, 0x00
|
||||
+ .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
+ .byte 0x04, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00
|
||||
+ .byte 0x05, 0x00, 0x00, 0x00, 0x47, 0x4E, 0x55, 0x00
|
||||
+ .byte 0x02, 0x00, 0x00, 0xC0, 0x04, 0x00, 0x00, 0x00
|
||||
+ .byte 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
@ -1,24 +0,0 @@
|
||||
--- ceph-18.1.2/src/pybind/rbd/rbd.pyx.orig 2023-07-21 13:30:08.156825317 -0400
|
||||
+++ ceph-18.1.2/src/pybind/rbd/rbd.pyx 2023-07-24 09:09:27.930137117 -0400
|
||||
@@ -371,10 +371,10 @@
|
||||
cdef rados_ioctx_t convert_ioctx(rados.Ioctx ioctx) except? NULL:
|
||||
return <rados_ioctx_t>ioctx.io
|
||||
|
||||
-cdef int progress_callback(uint64_t offset, uint64_t total, void* ptr) with gil:
|
||||
+cdef int progress_callback(uint64_t offset, uint64_t total, void* ptr) noexcept with gil:
|
||||
return (<object>ptr)(offset, total)
|
||||
|
||||
-cdef int no_op_progress_callback(uint64_t offset, uint64_t total, void* ptr):
|
||||
+cdef int no_op_progress_callback(uint64_t offset, uint64_t total, void* ptr) noexcept:
|
||||
return 0
|
||||
|
||||
def cstr(val, name, encoding="utf-8", opt=False):
|
||||
@@ -426,7 +426,7 @@
|
||||
|
||||
cdef class Completion
|
||||
|
||||
-cdef void __aio_complete_cb(rbd_completion_t completion, void *args) with gil:
|
||||
+cdef void __aio_complete_cb(rbd_completion_t completion, void *args) noexcept with gil:
|
||||
"""
|
||||
Callback to oncomplete() for asynchronous operations
|
||||
"""
|
@ -1,18 +0,0 @@
|
||||
--- ceph/src/CMakeLists.txt.orig 2023-11-01 11:53:53.618167190 -0400
|
||||
+++ ceph/src/CMakeLists.txt 2023-11-01 13:52:51.292643490 -0400
|
||||
@@ -625,6 +625,7 @@
|
||||
add_subdirectory(perfglue)
|
||||
|
||||
add_library(rados_snap_set_diff_obj OBJECT librados/snap_set_diff.cc)
|
||||
+add_dependencies(rados_snap_set_diff_obj legacy-option-headers)
|
||||
|
||||
option(WITH_LIBRADOSSTRIPER "build with libradosstriper support" ON)
|
||||
|
||||
@@ -881,6 +882,7 @@
|
||||
add_library(krbd STATIC krbd.cc
|
||||
$<TARGET_OBJECTS:parse_secret_objs>)
|
||||
target_link_libraries(krbd keyutils::keyutils)
|
||||
+ add_dependencies(krbd legacy-option-headers)
|
||||
endif()
|
||||
add_subdirectory(librbd)
|
||||
if(WITH_FUSE)
|
@ -1,986 +0,0 @@
|
||||
diff -ur ceph-18.2.1~/debian/changelog ceph-18.2.1/debian/changelog
|
||||
--- ceph-18.2.1~/debian/changelog 2023-11-14 14:36:19.000000000 -0500
|
||||
+++ ceph-18.2.1/debian/changelog 2023-12-11 16:55:38.000000000 -0500
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
* New upstream release
|
||||
|
||||
- -- Ceph Release Team <ceph-maintainers@ceph.io> Tue, 14 Nov 2023 19:36:16 +0000
|
||||
+ -- Ceph Release Team <ceph-maintainers@ceph.io> Mon, 11 Dec 2023 21:55:36 +0000
|
||||
|
||||
ceph (18.2.0-1) stable; urgency=medium
|
||||
|
||||
diff -ur ceph-18.2.1~/doc/architecture.rst ceph-18.2.1/doc/architecture.rst
|
||||
--- ceph-18.2.1~/doc/architecture.rst 2023-11-14 14:36:19.000000000 -0500
|
||||
+++ ceph-18.2.1/doc/architecture.rst 2023-12-11 16:55:38.000000000 -0500
|
||||
@@ -30,6 +30,8 @@
|
||||
- :term:`Ceph Manager`
|
||||
- :term:`Ceph Metadata Server`
|
||||
|
||||
+.. _arch_monitor:
|
||||
+
|
||||
Ceph Monitors maintain the master copy of the cluster map, which they provide
|
||||
to Ceph clients. Provisioning multiple monitors within the Ceph cluster ensures
|
||||
availability in the event that one of the monitor daemons or its host fails.
|
||||
diff -ur ceph-18.2.1~/doc/glossary.rst ceph-18.2.1/doc/glossary.rst
|
||||
--- ceph-18.2.1~/doc/glossary.rst 2023-11-14 14:36:19.000000000 -0500
|
||||
+++ ceph-18.2.1/doc/glossary.rst 2023-12-11 16:55:38.000000000 -0500
|
||||
@@ -271,7 +271,7 @@
|
||||
The Ceph manager software, which collects all the state from
|
||||
the whole cluster in one place.
|
||||
|
||||
- MON
|
||||
+ :ref:`MON<arch_monitor>`
|
||||
The Ceph monitor software.
|
||||
|
||||
Node
|
||||
@@ -337,6 +337,12 @@
|
||||
Firefly (v. 0.80). See :ref:`Primary Affinity
|
||||
<rados_ops_primary_affinity>`.
|
||||
|
||||
+ Quorum
|
||||
+ Quorum is the state that exists when a majority of the
|
||||
+ :ref:`Monitors<arch_monitor>` in the cluster are ``up``. A
|
||||
+ minimum of three :ref:`Monitors<arch_monitor>` must exist in
|
||||
+ the cluster in order for Quorum to be possible.
|
||||
+
|
||||
RADOS
|
||||
**R**\eliable **A**\utonomic **D**\istributed **O**\bject
|
||||
**S**\tore. RADOS is the object store that provides a scalable
|
||||
diff -ur ceph-18.2.1~/doc/rados/troubleshooting/troubleshooting-mon.rst ceph-18.2.1/doc/rados/troubleshooting/troubleshooting-mon.rst
|
||||
--- ceph-18.2.1~/doc/rados/troubleshooting/troubleshooting-mon.rst 2023-11-14 14:36:19.000000000 -0500
|
||||
+++ ceph-18.2.1/doc/rados/troubleshooting/troubleshooting-mon.rst 2023-12-11 16:55:38.000000000 -0500
|
||||
@@ -17,59 +17,66 @@
|
||||
Initial Troubleshooting
|
||||
=======================
|
||||
|
||||
-#. **Make sure that the monitors are running.**
|
||||
+The first steps in the process of troubleshooting Ceph Monitors involve making
|
||||
+sure that the Monitors are running and that they are able to communicate with
|
||||
+the network and on the network. Follow the steps in this section to rule out
|
||||
+the simplest causes of Monitor malfunction.
|
||||
+
|
||||
+#. **Make sure that the Monitors are running.**
|
||||
+
|
||||
+ Make sure that the Monitor (*mon*) daemon processes (``ceph-mon``) are
|
||||
+ running. It might be the case that the mons have not be restarted after an
|
||||
+ upgrade. Checking for this simple oversight can save hours of painstaking
|
||||
+ troubleshooting.
|
||||
+
|
||||
+ It is also important to make sure that the manager daemons (``ceph-mgr``)
|
||||
+ are running. Remember that typical cluster configurations provide one
|
||||
+ Manager (``ceph-mgr``) for each Monitor (``ceph-mon``).
|
||||
|
||||
- First, make sure that the monitor (*mon*) daemon processes (``ceph-mon``)
|
||||
- are running. Sometimes Ceph admins either forget to start the mons or
|
||||
- forget to restart the mons after an upgrade. Checking for this simple
|
||||
- oversight can save hours of painstaking troubleshooting. It is also
|
||||
- important to make sure that the manager daemons (``ceph-mgr``) are running.
|
||||
- Remember that typical cluster configurations provide one ``ceph-mgr`` for
|
||||
- each ``ceph-mon``.
|
||||
+ .. note:: In releases prior to v1.12.5, Rook will not run more than two
|
||||
+ managers.
|
||||
|
||||
- .. note:: Rook will not run more than two managers.
|
||||
+#. **Make sure that you can reach the Monitor nodes.**
|
||||
|
||||
-#. **Make sure that you can reach the monitor nodes.**
|
||||
-
|
||||
- In certain rare cases, there may be ``iptables`` rules that block access to
|
||||
- monitor nodes or TCP ports. These rules might be left over from earlier
|
||||
+ In certain rare cases, ``iptables`` rules might be blocking access to
|
||||
+ Monitor nodes or TCP ports. These rules might be left over from earlier
|
||||
stress testing or rule development. To check for the presence of such
|
||||
- rules, SSH into the server and then try to connect to the monitor's ports
|
||||
- (``tcp/3300`` and ``tcp/6789``) using ``telnet``, ``nc``, or a similar
|
||||
- tool.
|
||||
-
|
||||
-#. **Make sure that the ``ceph status`` command runs and receives a reply from the cluster.**
|
||||
-
|
||||
- If the ``ceph status`` command does receive a reply from the cluster, then
|
||||
- the cluster is up and running. The monitors will answer to a ``status``
|
||||
- request only if there is a formed quorum. Confirm that one or more ``mgr``
|
||||
- daemons are reported as running. Under ideal conditions, all ``mgr``
|
||||
- daemons will be reported as running.
|
||||
-
|
||||
+ rules, SSH into each Monitor node and use ``telnet`` or ``nc`` or a similar
|
||||
+ tool to attempt to connect to each of the other Monitor nodes on ports
|
||||
+ ``tcp/3300`` and ``tcp/6789``.
|
||||
+
|
||||
+#. **Make sure that the "ceph status" command runs and receives a reply from the cluster.**
|
||||
+
|
||||
+ If the ``ceph status`` command receives a reply from the cluster, then the
|
||||
+ cluster is up and running. Monitors answer to a ``status`` request only if
|
||||
+ there is a formed quorum. Confirm that one or more ``mgr`` daemons are
|
||||
+ reported as running. In a cluster with no deficiencies, ``ceph status``
|
||||
+ will report that all ``mgr`` daemons are running.
|
||||
|
||||
If the ``ceph status`` command does not receive a reply from the cluster,
|
||||
- then there are probably not enough monitors ``up`` to form a quorum. The
|
||||
- ``ceph -s`` command with no further options specified connects to an
|
||||
- arbitrarily selected monitor. In certain cases, however, it might be
|
||||
- helpful to connect to a specific monitor (or to several specific monitors
|
||||
+ then there are probably not enough Monitors ``up`` to form a quorum. If the
|
||||
+ ``ceph -s`` command is run with no further options specified, it connects
|
||||
+ to an arbitrarily selected Monitor. In certain cases, however, it might be
|
||||
+ helpful to connect to a specific Monitor (or to several specific Monitors
|
||||
in sequence) by adding the ``-m`` flag to the command: for example, ``ceph
|
||||
status -m mymon1``.
|
||||
|
||||
#. **None of this worked. What now?**
|
||||
|
||||
If the above solutions have not resolved your problems, you might find it
|
||||
- helpful to examine each individual monitor in turn. Whether or not a quorum
|
||||
- has been formed, it is possible to contact each monitor individually and
|
||||
+ helpful to examine each individual Monitor in turn. Even if no quorum has
|
||||
+ been formed, it is possible to contact each Monitor individually and
|
||||
request its status by using the ``ceph tell mon.ID mon_status`` command
|
||||
- (here ``ID`` is the monitor's identifier).
|
||||
+ (here ``ID`` is the Monitor's identifier).
|
||||
|
||||
- Run the ``ceph tell mon.ID mon_status`` command for each monitor in the
|
||||
+ Run the ``ceph tell mon.ID mon_status`` command for each Monitor in the
|
||||
cluster. For more on this command's output, see :ref:`Understanding
|
||||
mon_status
|
||||
<rados_troubleshoting_troubleshooting_mon_understanding_mon_status>`.
|
||||
|
||||
- There is also an alternative method: SSH into each monitor node and query
|
||||
- the daemon's admin socket. See :ref:`Using the Monitor's Admin
|
||||
+ There is also an alternative method for contacting each individual Monitor:
|
||||
+ SSH into each Monitor node and query the daemon's admin socket. See
|
||||
+ :ref:`Using the Monitor's Admin
|
||||
Socket<rados_troubleshoting_troubleshooting_mon_using_admin_socket>`.
|
||||
|
||||
.. _rados_troubleshoting_troubleshooting_mon_using_admin_socket:
|
||||
diff -ur ceph-18.2.1~/qa/tasks/cephfs/kernel_mount.py ceph-18.2.1/qa/tasks/cephfs/kernel_mount.py
|
||||
--- ceph-18.2.1~/qa/tasks/cephfs/kernel_mount.py 2023-11-14 14:36:19.000000000 -0500
|
||||
+++ ceph-18.2.1/qa/tasks/cephfs/kernel_mount.py 2023-12-11 16:55:38.000000000 -0500
|
||||
@@ -68,7 +68,10 @@
|
||||
self.enable_dynamic_debug()
|
||||
self.ctx[f'kmount_count.{self.client_remote.hostname}'] = kmount_count + 1
|
||||
|
||||
- self.gather_mount_info()
|
||||
+ try:
|
||||
+ self.gather_mount_info()
|
||||
+ except:
|
||||
+ log.warn('failed to fetch mount info - tests depending on mount addr/inst may fail!')
|
||||
|
||||
def gather_mount_info(self):
|
||||
self.id = self._get_global_id()
|
||||
diff -ur ceph-18.2.1~/qa/tasks/cephfs/mount.py ceph-18.2.1/qa/tasks/cephfs/mount.py
|
||||
--- ceph-18.2.1~/qa/tasks/cephfs/mount.py 2023-11-14 14:36:19.000000000 -0500
|
||||
+++ ceph-18.2.1/qa/tasks/cephfs/mount.py 2023-12-11 16:55:38.000000000 -0500
|
||||
@@ -186,6 +186,12 @@
|
||||
sudo=True).decode())
|
||||
|
||||
def is_blocked(self):
|
||||
+ if not self.addr:
|
||||
+ # can't infer if our addr is blocklisted - let the caller try to
|
||||
+ # umount without lazy/force. If the client was blocklisted, then
|
||||
+ # the umount would be stuck and the test would fail on timeout.
|
||||
+ # happens only with Ubuntu 20.04 (missing kclient patches :/).
|
||||
+ return False
|
||||
self.fs = Filesystem(self.ctx, name=self.cephfs_name)
|
||||
|
||||
try:
|
||||
diff -ur ceph-18.2.1~/src/ceph-volume/ceph_volume/devices/raw/list.py ceph-18.2.1/src/ceph-volume/ceph_volume/devices/raw/list.py
|
||||
--- ceph-18.2.1~/src/ceph-volume/ceph_volume/devices/raw/list.py 2023-11-14 14:36:19.000000000 -0500
|
||||
+++ ceph-18.2.1/src/ceph-volume/ceph_volume/devices/raw/list.py 2023-12-11 16:55:38.000000000 -0500
|
||||
@@ -5,7 +5,7 @@
|
||||
from textwrap import dedent
|
||||
from ceph_volume import decorators, process
|
||||
from ceph_volume.util import disk
|
||||
-
|
||||
+from typing import Any, Dict, List
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@@ -66,50 +66,57 @@
|
||||
def __init__(self, argv):
|
||||
self.argv = argv
|
||||
|
||||
+ def is_atari_partitions(self, _lsblk: Dict[str, Any]) -> bool:
|
||||
+ dev = _lsblk['NAME']
|
||||
+ if _lsblk.get('PKNAME'):
|
||||
+ parent = _lsblk['PKNAME']
|
||||
+ try:
|
||||
+ if disk.has_bluestore_label(parent):
|
||||
+ logger.warning(('ignoring child device {} whose parent {} is a BlueStore OSD.'.format(dev, parent),
|
||||
+ 'device is likely a phantom Atari partition. device info: {}'.format(_lsblk)))
|
||||
+ return True
|
||||
+ except OSError as e:
|
||||
+ logger.error(('ignoring child device {} to avoid reporting invalid BlueStore data from phantom Atari partitions.'.format(dev),
|
||||
+ 'failed to determine if parent device {} is BlueStore. err: {}'.format(parent, e)))
|
||||
+ return True
|
||||
+ return False
|
||||
+
|
||||
+ def exclude_atari_partitions(self, _lsblk_all: Dict[str, Any]) -> List[Dict[str, Any]]:
|
||||
+ return [_lsblk for _lsblk in _lsblk_all if not self.is_atari_partitions(_lsblk)]
|
||||
+
|
||||
def generate(self, devs=None):
|
||||
logger.debug('Listing block devices via lsblk...')
|
||||
- info_devices = disk.lsblk_all(abspath=True)
|
||||
+ info_devices = []
|
||||
if not devs or not any(devs):
|
||||
# If no devs are given initially, we want to list ALL devices including children and
|
||||
# parents. Parent disks with child partitions may be the appropriate device to return if
|
||||
# the parent disk has a bluestore header, but children may be the most appropriate
|
||||
# devices to return if the parent disk does not have a bluestore header.
|
||||
+ info_devices = disk.lsblk_all(abspath=True)
|
||||
devs = [device['NAME'] for device in info_devices if device.get('NAME',)]
|
||||
+ else:
|
||||
+ for dev in devs:
|
||||
+ info_devices.append(disk.lsblk(dev, abspath=True))
|
||||
+
|
||||
+ # Linux kernels built with CONFIG_ATARI_PARTITION enabled can falsely interpret
|
||||
+ # bluestore's on-disk format as an Atari partition table. These false Atari partitions
|
||||
+ # can be interpreted as real OSDs if a bluestore OSD was previously created on the false
|
||||
+ # partition. See https://tracker.ceph.com/issues/52060 for more info. If a device has a
|
||||
+ # parent, it is a child. If the parent is a valid bluestore OSD, the child will only
|
||||
+ # exist if it is a phantom Atari partition, and the child should be ignored. If the
|
||||
+ # parent isn't bluestore, then the child could be a valid bluestore OSD. If we fail to
|
||||
+ # determine whether a parent is bluestore, we should err on the side of not reporting
|
||||
+ # the child so as not to give a false negative.
|
||||
+ info_devices = self.exclude_atari_partitions(info_devices)
|
||||
|
||||
result = {}
|
||||
logger.debug('inspecting devices: {}'.format(devs))
|
||||
- for dev in devs:
|
||||
- # Linux kernels built with CONFIG_ATARI_PARTITION enabled can falsely interpret
|
||||
- # bluestore's on-disk format as an Atari partition table. These false Atari partitions
|
||||
- # can be interpreted as real OSDs if a bluestore OSD was previously created on the false
|
||||
- # partition. See https://tracker.ceph.com/issues/52060 for more info. If a device has a
|
||||
- # parent, it is a child. If the parent is a valid bluestore OSD, the child will only
|
||||
- # exist if it is a phantom Atari partition, and the child should be ignored. If the
|
||||
- # parent isn't bluestore, then the child could be a valid bluestore OSD. If we fail to
|
||||
- # determine whether a parent is bluestore, we should err on the side of not reporting
|
||||
- # the child so as not to give a false negative.
|
||||
- matched_info_devices = [info for info in info_devices if info['NAME'] == dev]
|
||||
- if not matched_info_devices:
|
||||
- logger.warning('device {} does not exist'.format(dev))
|
||||
- continue
|
||||
- info_device = matched_info_devices[0]
|
||||
- if 'PKNAME' in info_device and info_device['PKNAME'] != "":
|
||||
- parent = info_device['PKNAME']
|
||||
- try:
|
||||
- if disk.has_bluestore_label(parent):
|
||||
- logger.warning(('ignoring child device {} whose parent {} is a BlueStore OSD.'.format(dev, parent),
|
||||
- 'device is likely a phantom Atari partition. device info: {}'.format(info_device)))
|
||||
- continue
|
||||
- except OSError as e:
|
||||
- logger.error(('ignoring child device {} to avoid reporting invalid BlueStore data from phantom Atari partitions.'.format(dev),
|
||||
- 'failed to determine if parent device {} is BlueStore. err: {}'.format(parent, e)))
|
||||
- continue
|
||||
-
|
||||
- bs_info = _get_bluestore_info(dev)
|
||||
+ for info_device in info_devices:
|
||||
+ bs_info = _get_bluestore_info(info_device['NAME'])
|
||||
if bs_info is None:
|
||||
# None is also returned in the rare event that there is an issue reading info from
|
||||
# a BlueStore disk, so be sure to log our assumption that it isn't bluestore
|
||||
- logger.info('device {} does not have BlueStore information'.format(dev))
|
||||
+ logger.info('device {} does not have BlueStore information'.format(info_device['NAME']))
|
||||
continue
|
||||
uuid = bs_info['osd_uuid']
|
||||
if uuid not in result:
|
||||
diff -ur ceph-18.2.1~/src/ceph-volume/ceph_volume/tests/util/test_disk.py ceph-18.2.1/src/ceph-volume/ceph_volume/tests/util/test_disk.py
|
||||
--- ceph-18.2.1~/src/ceph-volume/ceph_volume/tests/util/test_disk.py 2023-11-14 14:36:19.000000000 -0500
|
||||
+++ ceph-18.2.1/src/ceph-volume/ceph_volume/tests/util/test_disk.py 2023-12-11 16:55:38.000000000 -0500
|
||||
@@ -1,7 +1,37 @@
|
||||
import os
|
||||
import pytest
|
||||
from ceph_volume.util import disk
|
||||
-from mock.mock import patch
|
||||
+from mock.mock import patch, MagicMock
|
||||
+
|
||||
+
|
||||
+class TestFunctions:
|
||||
+ @patch('ceph_volume.util.disk.os.path.exists', MagicMock(return_value=False))
|
||||
+ def test_is_device_path_does_not_exist(self):
|
||||
+ assert not disk.is_device('/dev/foo')
|
||||
+
|
||||
+ @patch('ceph_volume.util.disk.os.path.exists', MagicMock(return_value=True))
|
||||
+ def test_is_device_dev_doesnt_startswith_dev(self):
|
||||
+ assert not disk.is_device('/foo')
|
||||
+
|
||||
+ @patch('ceph_volume.util.disk.allow_loop_devices', MagicMock(return_value=False))
|
||||
+ @patch('ceph_volume.util.disk.os.path.exists', MagicMock(return_value=True))
|
||||
+ def test_is_device_loop_not_allowed(self):
|
||||
+ assert not disk.is_device('/dev/loop123')
|
||||
+
|
||||
+ @patch('ceph_volume.util.disk.lsblk', MagicMock(return_value={'NAME': 'foo', 'TYPE': 'disk'}))
|
||||
+ @patch('ceph_volume.util.disk.os.path.exists', MagicMock(return_value=True))
|
||||
+ def test_is_device_type_disk(self):
|
||||
+ assert disk.is_device('/dev/foo')
|
||||
+
|
||||
+ @patch('ceph_volume.util.disk.lsblk', MagicMock(return_value={'NAME': 'foo', 'TYPE': 'mpath'}))
|
||||
+ @patch('ceph_volume.util.disk.os.path.exists', MagicMock(return_value=True))
|
||||
+ def test_is_device_type_mpath(self):
|
||||
+ assert disk.is_device('/dev/foo')
|
||||
+
|
||||
+ @patch('ceph_volume.util.disk.lsblk', MagicMock(return_value={'NAME': 'foo1', 'TYPE': 'part'}))
|
||||
+ @patch('ceph_volume.util.disk.os.path.exists', MagicMock(return_value=True))
|
||||
+ def test_is_device_type_part(self):
|
||||
+ assert not disk.is_device('/dev/foo1')
|
||||
|
||||
|
||||
class TestLsblkParser(object):
|
||||
diff -ur ceph-18.2.1~/src/ceph-volume/ceph_volume/util/disk.py ceph-18.2.1/src/ceph-volume/ceph_volume/util/disk.py
|
||||
--- ceph-18.2.1~/src/ceph-volume/ceph_volume/util/disk.py 2023-11-14 14:36:19.000000000 -0500
|
||||
+++ ceph-18.2.1/src/ceph-volume/ceph_volume/util/disk.py 2023-12-11 16:55:38.000000000 -0500
|
||||
@@ -359,6 +359,10 @@
|
||||
if not allow_loop_devices():
|
||||
return False
|
||||
|
||||
+ TYPE = lsblk(dev).get('TYPE')
|
||||
+ if TYPE:
|
||||
+ return TYPE in ['disk', 'mpath']
|
||||
+
|
||||
# fallback to stat
|
||||
return _stat_is_device(os.lstat(dev).st_mode)
|
||||
|
||||
diff -ur ceph-18.2.1~/src/.git_version ceph-18.2.1/src/.git_version
|
||||
--- ceph-18.2.1~/src/.git_version 2023-11-14 14:37:51.000000000 -0500
|
||||
+++ ceph-18.2.1/src/.git_version 2023-12-11 16:57:17.000000000 -0500
|
||||
@@ -1,2 +1,2 @@
|
||||
-e3fce6809130d78ac0058fc87e537ecd926cd213
|
||||
+7fe91d5d5842e04be3b4f514d6dd990c54b29c76
|
||||
18.2.1
|
||||
diff -ur ceph-18.2.1~/src/messages/MClientRequest.h ceph-18.2.1/src/messages/MClientRequest.h
|
||||
--- ceph-18.2.1~/src/messages/MClientRequest.h 2023-11-14 14:36:19.000000000 -0500
|
||||
+++ ceph-18.2.1/src/messages/MClientRequest.h 2023-12-11 16:55:38.000000000 -0500
|
||||
@@ -234,6 +234,12 @@
|
||||
copy_from_legacy_head(&head, &old_mds_head);
|
||||
head.version = 0;
|
||||
|
||||
+ head.ext_num_retry = head.num_retry;
|
||||
+ head.ext_num_fwd = head.num_fwd;
|
||||
+
|
||||
+ head.owner_uid = head.caller_uid;
|
||||
+ head.owner_gid = head.caller_gid;
|
||||
+
|
||||
/* Can't set the btime from legacy struct */
|
||||
if (head.op == CEPH_MDS_OP_SETATTR) {
|
||||
int localmask = head.args.setattr.mask;
|
||||
diff -ur ceph-18.2.1~/src/os/bluestore/AvlAllocator.cc ceph-18.2.1/src/os/bluestore/AvlAllocator.cc
|
||||
--- ceph-18.2.1~/src/os/bluestore/AvlAllocator.cc 2023-11-14 14:36:19.000000000 -0500
|
||||
+++ ceph-18.2.1/src/os/bluestore/AvlAllocator.cc 2023-12-11 16:55:38.000000000 -0500
|
||||
@@ -39,7 +39,7 @@
|
||||
uint64_t search_bytes = 0;
|
||||
auto rs_start = range_tree.lower_bound(range_t{*cursor, size}, compare);
|
||||
for (auto rs = rs_start; rs != range_tree.end(); ++rs) {
|
||||
- uint64_t offset = p2roundup(rs->start, align);
|
||||
+ uint64_t offset = rs->start;
|
||||
*cursor = offset + size;
|
||||
if (offset + size <= rs->end) {
|
||||
return offset;
|
||||
@@ -59,7 +59,7 @@
|
||||
}
|
||||
// If we reached end, start from beginning till cursor.
|
||||
for (auto rs = range_tree.begin(); rs != rs_start; ++rs) {
|
||||
- uint64_t offset = p2roundup(rs->start, align);
|
||||
+ uint64_t offset = rs->start;
|
||||
*cursor = offset + size;
|
||||
if (offset + size <= rs->end) {
|
||||
return offset;
|
||||
@@ -82,7 +82,7 @@
|
||||
const auto compare = range_size_tree.key_comp();
|
||||
auto rs_start = range_size_tree.lower_bound(range_t{0, size}, compare);
|
||||
for (auto rs = rs_start; rs != range_size_tree.end(); ++rs) {
|
||||
- uint64_t offset = p2roundup(rs->start, align);
|
||||
+ uint64_t offset = rs->start;
|
||||
if (offset + size <= rs->end) {
|
||||
return offset;
|
||||
}
|
||||
diff -ur ceph-18.2.1~/src/os/bluestore/BlueFS.cc ceph-18.2.1/src/os/bluestore/BlueFS.cc
|
||||
--- ceph-18.2.1~/src/os/bluestore/BlueFS.cc 2023-11-14 14:36:19.000000000 -0500
|
||||
+++ ceph-18.2.1/src/os/bluestore/BlueFS.cc 2023-12-11 16:55:38.000000000 -0500
|
||||
@@ -658,16 +658,24 @@
|
||||
}
|
||||
logger->set(l_bluefs_wal_alloc_unit, wal_alloc_size);
|
||||
|
||||
+
|
||||
+ uint64_t shared_alloc_size = cct->_conf->bluefs_shared_alloc_size;
|
||||
+ if (shared_alloc && shared_alloc->a) {
|
||||
+ uint64_t unit = shared_alloc->a->get_block_size();
|
||||
+ shared_alloc_size = std::max(
|
||||
+ unit,
|
||||
+ shared_alloc_size);
|
||||
+ ceph_assert(0 == p2phase(shared_alloc_size, unit));
|
||||
+ }
|
||||
if (bdev[BDEV_SLOW]) {
|
||||
alloc_size[BDEV_DB] = cct->_conf->bluefs_alloc_size;
|
||||
- alloc_size[BDEV_SLOW] = cct->_conf->bluefs_shared_alloc_size;
|
||||
- logger->set(l_bluefs_db_alloc_unit, cct->_conf->bluefs_alloc_size);
|
||||
- logger->set(l_bluefs_main_alloc_unit, cct->_conf->bluefs_shared_alloc_size);
|
||||
+ alloc_size[BDEV_SLOW] = shared_alloc_size;
|
||||
} else {
|
||||
- alloc_size[BDEV_DB] = cct->_conf->bluefs_shared_alloc_size;
|
||||
- logger->set(l_bluefs_main_alloc_unit, 0);
|
||||
- logger->set(l_bluefs_db_alloc_unit, cct->_conf->bluefs_shared_alloc_size);
|
||||
+ alloc_size[BDEV_DB] = shared_alloc_size;
|
||||
+ alloc_size[BDEV_SLOW] = 0;
|
||||
}
|
||||
+ logger->set(l_bluefs_db_alloc_unit, alloc_size[BDEV_DB]);
|
||||
+ logger->set(l_bluefs_main_alloc_unit, alloc_size[BDEV_SLOW]);
|
||||
// new wal and db devices are never shared
|
||||
if (bdev[BDEV_NEWWAL]) {
|
||||
alloc_size[BDEV_NEWWAL] = cct->_conf->bluefs_alloc_size;
|
||||
@@ -681,13 +689,13 @@
|
||||
continue;
|
||||
}
|
||||
ceph_assert(bdev[id]->get_size());
|
||||
- ceph_assert(alloc_size[id]);
|
||||
if (is_shared_alloc(id)) {
|
||||
dout(1) << __func__ << " shared, id " << id << std::hex
|
||||
<< ", capacity 0x" << bdev[id]->get_size()
|
||||
<< ", block size 0x" << alloc_size[id]
|
||||
<< std::dec << dendl;
|
||||
} else {
|
||||
+ ceph_assert(alloc_size[id]);
|
||||
std::string name = "bluefs-";
|
||||
const char* devnames[] = { "wal","db","slow" };
|
||||
if (id <= BDEV_SLOW)
|
||||
diff -ur ceph-18.2.1~/src/os/bluestore/BtreeAllocator.cc ceph-18.2.1/src/os/bluestore/BtreeAllocator.cc
|
||||
--- ceph-18.2.1~/src/os/bluestore/BtreeAllocator.cc 2023-11-14 14:36:19.000000000 -0500
|
||||
+++ ceph-18.2.1/src/os/bluestore/BtreeAllocator.cc 2023-12-11 16:55:38.000000000 -0500
|
||||
@@ -25,7 +25,7 @@
|
||||
{
|
||||
auto rs_start = range_tree.lower_bound(*cursor);
|
||||
for (auto rs = rs_start; rs != range_tree.end(); ++rs) {
|
||||
- uint64_t offset = p2roundup(rs->first, align);
|
||||
+ uint64_t offset = rs->first;
|
||||
if (offset + size <= rs->second) {
|
||||
*cursor = offset + size;
|
||||
return offset;
|
||||
@@ -37,7 +37,7 @@
|
||||
}
|
||||
// If we reached end, start from beginning till cursor.
|
||||
for (auto rs = range_tree.begin(); rs != rs_start; ++rs) {
|
||||
- uint64_t offset = p2roundup(rs->first, align);
|
||||
+ uint64_t offset = rs->first;
|
||||
if (offset + size <= rs->second) {
|
||||
*cursor = offset + size;
|
||||
return offset;
|
||||
@@ -53,7 +53,7 @@
|
||||
// the needs
|
||||
auto rs_start = range_size_tree.lower_bound(range_value_t{0,size});
|
||||
for (auto rs = rs_start; rs != range_size_tree.end(); ++rs) {
|
||||
- uint64_t offset = p2roundup(rs->start, align);
|
||||
+ uint64_t offset = rs->start;
|
||||
if (offset + size <= rs->start + rs->size) {
|
||||
return offset;
|
||||
}
|
||||
diff -ur ceph-18.2.1~/src/os/bluestore/fastbmap_allocator_impl.cc ceph-18.2.1/src/os/bluestore/fastbmap_allocator_impl.cc
|
||||
--- ceph-18.2.1~/src/os/bluestore/fastbmap_allocator_impl.cc 2023-11-14 14:36:19.000000000 -0500
|
||||
+++ ceph-18.2.1/src/os/bluestore/fastbmap_allocator_impl.cc 2023-12-11 16:55:38.000000000 -0500
|
||||
@@ -17,19 +17,9 @@
|
||||
|
||||
inline interval_t _align2units(uint64_t offset, uint64_t len, uint64_t min_length)
|
||||
{
|
||||
- interval_t res;
|
||||
- if (len >= min_length) {
|
||||
- res.offset = p2roundup(offset, min_length);
|
||||
- auto delta_off = res.offset - offset;
|
||||
- if (len > delta_off) {
|
||||
- res.length = len - delta_off;
|
||||
- res.length = p2align<uint64_t>(res.length, min_length);
|
||||
- if (res.length) {
|
||||
- return res;
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
- return interval_t();
|
||||
+ return len >= min_length ?
|
||||
+ interval_t(offset, p2align<uint64_t>(len, min_length)) :
|
||||
+ interval_t();
|
||||
}
|
||||
|
||||
interval_t AllocatorLevel01Loose::_get_longest_from_l0(uint64_t pos0,
|
||||
diff -ur ceph-18.2.1~/src/os/bluestore/StupidAllocator.cc ceph-18.2.1/src/os/bluestore/StupidAllocator.cc
|
||||
--- ceph-18.2.1~/src/os/bluestore/StupidAllocator.cc 2023-11-14 14:36:19.000000000 -0500
|
||||
+++ ceph-18.2.1/src/os/bluestore/StupidAllocator.cc 2023-12-11 16:55:38.000000000 -0500
|
||||
@@ -52,20 +52,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
-/// return the effective length of the extent if we align to alloc_unit
|
||||
-uint64_t StupidAllocator::_aligned_len(
|
||||
- StupidAllocator::interval_set_t::iterator p,
|
||||
- uint64_t alloc_unit)
|
||||
-{
|
||||
- uint64_t skew = p.get_start() % alloc_unit;
|
||||
- if (skew)
|
||||
- skew = alloc_unit - skew;
|
||||
- if (skew > p.get_len())
|
||||
- return 0;
|
||||
- else
|
||||
- return p.get_len() - skew;
|
||||
-}
|
||||
-
|
||||
int64_t StupidAllocator::allocate_int(
|
||||
uint64_t want_size, uint64_t alloc_unit, int64_t hint,
|
||||
uint64_t *offset, uint32_t *length)
|
||||
@@ -89,7 +75,7 @@
|
||||
for (bin = orig_bin; bin < (int)free.size(); ++bin) {
|
||||
p = free[bin].lower_bound(hint);
|
||||
while (p != free[bin].end()) {
|
||||
- if (_aligned_len(p, alloc_unit) >= want_size) {
|
||||
+ if (p.get_len() >= want_size) {
|
||||
goto found;
|
||||
}
|
||||
++p;
|
||||
@@ -102,7 +88,7 @@
|
||||
p = free[bin].begin();
|
||||
auto end = hint ? free[bin].lower_bound(hint) : free[bin].end();
|
||||
while (p != end) {
|
||||
- if (_aligned_len(p, alloc_unit) >= want_size) {
|
||||
+ if (p.get_len() >= want_size) {
|
||||
goto found;
|
||||
}
|
||||
++p;
|
||||
@@ -114,7 +100,7 @@
|
||||
for (bin = orig_bin; bin >= 0; --bin) {
|
||||
p = free[bin].lower_bound(hint);
|
||||
while (p != free[bin].end()) {
|
||||
- if (_aligned_len(p, alloc_unit) >= alloc_unit) {
|
||||
+ if (p.get_len() >= alloc_unit) {
|
||||
goto found;
|
||||
}
|
||||
++p;
|
||||
@@ -127,7 +113,7 @@
|
||||
p = free[bin].begin();
|
||||
auto end = hint ? free[bin].lower_bound(hint) : free[bin].end();
|
||||
while (p != end) {
|
||||
- if (_aligned_len(p, alloc_unit) >= alloc_unit) {
|
||||
+ if (p.get_len() >= alloc_unit) {
|
||||
goto found;
|
||||
}
|
||||
++p;
|
||||
@@ -137,11 +123,9 @@
|
||||
return -ENOSPC;
|
||||
|
||||
found:
|
||||
- uint64_t skew = p.get_start() % alloc_unit;
|
||||
- if (skew)
|
||||
- skew = alloc_unit - skew;
|
||||
- *offset = p.get_start() + skew;
|
||||
- *length = std::min(std::max(alloc_unit, want_size), p2align((p.get_len() - skew), alloc_unit));
|
||||
+ *offset = p.get_start();
|
||||
+ *length = std::min(std::max(alloc_unit, want_size), p2align(p.get_len(), alloc_unit));
|
||||
+
|
||||
if (cct->_conf->bluestore_debug_small_allocations) {
|
||||
uint64_t max =
|
||||
alloc_unit * (rand() % cct->_conf->bluestore_debug_small_allocations);
|
||||
@@ -158,7 +142,7 @@
|
||||
|
||||
free[bin].erase(*offset, *length);
|
||||
uint64_t off, len;
|
||||
- if (*offset && free[bin].contains(*offset - skew - 1, &off, &len)) {
|
||||
+ if (*offset && free[bin].contains(*offset - 1, &off, &len)) {
|
||||
int newbin = _choose_bin(len);
|
||||
if (newbin != bin) {
|
||||
ldout(cct, 30) << __func__ << " demoting 0x" << std::hex << off << "~" << len
|
||||
diff -ur ceph-18.2.1~/src/os/bluestore/StupidAllocator.h ceph-18.2.1/src/os/bluestore/StupidAllocator.h
|
||||
--- ceph-18.2.1~/src/os/bluestore/StupidAllocator.h 2023-11-14 14:36:19.000000000 -0500
|
||||
+++ ceph-18.2.1/src/os/bluestore/StupidAllocator.h 2023-12-11 16:55:38.000000000 -0500
|
||||
@@ -31,10 +31,6 @@
|
||||
unsigned _choose_bin(uint64_t len);
|
||||
void _insert_free(uint64_t offset, uint64_t len);
|
||||
|
||||
- uint64_t _aligned_len(
|
||||
- interval_set_t::iterator p,
|
||||
- uint64_t alloc_unit);
|
||||
-
|
||||
public:
|
||||
StupidAllocator(CephContext* cct,
|
||||
int64_t size,
|
||||
diff -ur ceph-18.2.1~/src/test/objectstore/Allocator_test.cc ceph-18.2.1/src/test/objectstore/Allocator_test.cc
|
||||
--- ceph-18.2.1~/src/test/objectstore/Allocator_test.cc 2023-11-14 14:36:19.000000000 -0500
|
||||
+++ ceph-18.2.1/src/test/objectstore/Allocator_test.cc 2023-12-11 16:55:38.000000000 -0500
|
||||
@@ -516,8 +516,7 @@
|
||||
PExtentVector extents;
|
||||
auto need = 0x3f980000;
|
||||
auto got = alloc->allocate(need, 0x10000, 0, (int64_t)0, &extents);
|
||||
- EXPECT_GT(got, 0);
|
||||
- EXPECT_EQ(got, 0x630000);
|
||||
+ EXPECT_GE(got, 0x630000);
|
||||
}
|
||||
|
||||
TEST_P(AllocTest, test_alloc_50656_best_fit)
|
||||
diff -ur ceph-18.2.1~/src/test/objectstore/fastbmap_allocator_test.cc ceph-18.2.1/src/test/objectstore/fastbmap_allocator_test.cc
|
||||
--- ceph-18.2.1~/src/test/objectstore/fastbmap_allocator_test.cc 2023-11-14 14:36:19.000000000 -0500
|
||||
+++ ceph-18.2.1/src/test/objectstore/fastbmap_allocator_test.cc 2023-12-11 16:55:38.000000000 -0500
|
||||
@@ -625,6 +625,8 @@
|
||||
ASSERT_EQ(bins_overall[cbits(num_chunks / 2) - 1], 1u);
|
||||
|
||||
{
|
||||
+ // Original free space disposition (start chunk, count):
|
||||
+ // <NC/2, NC/2>
|
||||
size_t to_release = 2 * _1m + 0x1000;
|
||||
// release 2M + 4K at the beginning
|
||||
interval_vector_t r;
|
||||
@@ -637,6 +639,8 @@
|
||||
ASSERT_EQ(bins_overall[cbits(num_chunks / 2) - 1], 1u);
|
||||
}
|
||||
{
|
||||
+ // Original free space disposition (start chunk, count):
|
||||
+ // <0, 513>, <NC / 2, NC / 2>
|
||||
// allocate 4K within the deallocated range
|
||||
uint64_t allocated4 = 0;
|
||||
interval_vector_t a4;
|
||||
@@ -652,79 +656,91 @@
|
||||
ASSERT_EQ(bins_overall[cbits(num_chunks / 2) - 1], 1u);
|
||||
}
|
||||
{
|
||||
- // allocate 1M - should go to the second 1M chunk
|
||||
+ // Original free space disposition (start chunk, count):
|
||||
+ // <1, 512>, <NC / 2, NC / 2>
|
||||
+ // allocate 1M - should go to offset 4096
|
||||
uint64_t allocated4 = 0;
|
||||
interval_vector_t a4;
|
||||
al2.allocate_l2(_1m, _1m, &allocated4, &a4);
|
||||
ASSERT_EQ(a4.size(), 1u);
|
||||
ASSERT_EQ(allocated4, _1m);
|
||||
- ASSERT_EQ(a4[0].offset, _1m);
|
||||
+ ASSERT_EQ(a4[0].offset, 4096);
|
||||
ASSERT_EQ(a4[0].length, _1m);
|
||||
bins_overall.clear();
|
||||
al2.collect_stats(bins_overall);
|
||||
- ASSERT_EQ(bins_overall.size(), 3u);
|
||||
- ASSERT_EQ(bins_overall[0], 1u);
|
||||
- ASSERT_EQ(bins_overall[cbits((_1m - 0x1000) / 0x1000) - 1], 1u);
|
||||
+ ASSERT_EQ(bins_overall.size(), 2u);
|
||||
+ ASSERT_EQ(bins_overall[cbits(_1m / 0x1000) - 1], 1u);
|
||||
ASSERT_EQ(bins_overall[cbits(num_chunks / 2) - 1], 1u);
|
||||
}
|
||||
{
|
||||
+ // Original free space disposition (start chunk, count):
|
||||
+ // <257, 256>, <NC / 2, NC / 2>
|
||||
// and allocate yet another 8K within the deallocated range
|
||||
uint64_t allocated4 = 0;
|
||||
interval_vector_t a4;
|
||||
al2.allocate_l2(0x2000, 0x1000, &allocated4, &a4);
|
||||
ASSERT_EQ(a4.size(), 1u);
|
||||
ASSERT_EQ(allocated4, 0x2000u);
|
||||
- ASSERT_EQ(a4[0].offset, 0x1000u);
|
||||
+ ASSERT_EQ(a4[0].offset, _1m + 0x1000u);
|
||||
ASSERT_EQ(a4[0].length, 0x2000u);
|
||||
bins_overall.clear();
|
||||
al2.collect_stats(bins_overall);
|
||||
- ASSERT_EQ(bins_overall[0], 1u);
|
||||
- ASSERT_EQ(bins_overall[cbits((_1m - 0x3000) / 0x1000) - 1], 1u);
|
||||
+ ASSERT_EQ(bins_overall.size(), 2u);
|
||||
+ ASSERT_EQ(bins_overall[cbits((_1m - 0x2000) / 0x1000) - 1], 1u);
|
||||
ASSERT_EQ(bins_overall[cbits(num_chunks / 2) - 1], 1u);
|
||||
}
|
||||
{
|
||||
- // release just allocated 1M
|
||||
+ // Original free space disposition (start chunk, count):
|
||||
+ // <259, 254>, <NC / 2, NC / 2>
|
||||
+ // release 4K~1M
|
||||
interval_vector_t r;
|
||||
- r.emplace_back(_1m, _1m);
|
||||
+ r.emplace_back(0x1000, _1m);
|
||||
al2.free_l2(r);
|
||||
bins_overall.clear();
|
||||
al2.collect_stats(bins_overall);
|
||||
- ASSERT_EQ(bins_overall.size(), 2u);
|
||||
- ASSERT_EQ(bins_overall[cbits((2 * _1m - 0x3000) / 0x1000) - 1], 1u);
|
||||
+ ASSERT_EQ(bins_overall.size(), 3u);
|
||||
+ //ASSERT_EQ(bins_overall[cbits((2 * _1m - 0x3000) / 0x1000) - 1], 1u);
|
||||
+ ASSERT_EQ(bins_overall[cbits(_1m / 0x1000) - 1], 1u);
|
||||
+ ASSERT_EQ(bins_overall[cbits((_1m - 0x2000) / 0x1000) - 1], 1u);
|
||||
ASSERT_EQ(bins_overall[cbits(num_chunks / 2) - 1], 1u);
|
||||
}
|
||||
{
|
||||
- // allocate 3M - should go to the second 1M chunk and @capacity/2
|
||||
+ // Original free space disposition (start chunk, count):
|
||||
+ // <1, 257>, <259, 254>, <NC / 2, NC / 2>
|
||||
+ // allocate 3M - should go to the first 1M chunk and @capacity/2
|
||||
uint64_t allocated4 = 0;
|
||||
interval_vector_t a4;
|
||||
al2.allocate_l2(3 * _1m, _1m, &allocated4, &a4);
|
||||
ASSERT_EQ(a4.size(), 2u);
|
||||
ASSERT_EQ(allocated4, 3 * _1m);
|
||||
- ASSERT_EQ(a4[0].offset, _1m);
|
||||
+ ASSERT_EQ(a4[0].offset, 0x1000);
|
||||
ASSERT_EQ(a4[0].length, _1m);
|
||||
ASSERT_EQ(a4[1].offset, capacity / 2);
|
||||
ASSERT_EQ(a4[1].length, 2 * _1m);
|
||||
bins_overall.clear();
|
||||
al2.collect_stats(bins_overall);
|
||||
- ASSERT_EQ(bins_overall.size(), 3u);
|
||||
- ASSERT_EQ(bins_overall[0], 1u);
|
||||
- ASSERT_EQ(bins_overall[cbits((_1m - 0x3000) / 0x1000) - 1], 1u);
|
||||
+ ASSERT_EQ(bins_overall.size(), 2u);
|
||||
+ ASSERT_EQ(bins_overall[cbits((_1m - 0x2000) / 0x1000) - 1], 1u);
|
||||
ASSERT_EQ(bins_overall[cbits((num_chunks - 512) / 2) - 1], 1u);
|
||||
}
|
||||
{
|
||||
- // release allocated 1M in the second meg chunk except
|
||||
+ // Original free space disposition (start chunk, count):
|
||||
+ // <259, 254>, <NC / 2 - 512, NC / 2 - 512>
|
||||
+ // release allocated 1M in the first meg chunk except
|
||||
// the first 4K chunk
|
||||
interval_vector_t r;
|
||||
- r.emplace_back(_1m + 0x1000, _1m);
|
||||
+ r.emplace_back(0x1000, _1m);
|
||||
al2.free_l2(r);
|
||||
bins_overall.clear();
|
||||
al2.collect_stats(bins_overall);
|
||||
ASSERT_EQ(bins_overall.size(), 3u);
|
||||
ASSERT_EQ(bins_overall[cbits(_1m / 0x1000) - 1], 1u);
|
||||
- ASSERT_EQ(bins_overall[cbits((_1m - 0x3000) / 0x1000) - 1], 1u);
|
||||
+ ASSERT_EQ(bins_overall[cbits((_1m - 0x2000) / 0x1000) - 1], 1u);
|
||||
ASSERT_EQ(bins_overall[cbits((num_chunks - 512) / 2) - 1], 1u);
|
||||
}
|
||||
{
|
||||
+ // Original free space disposition (start chunk, count):
|
||||
+ // <1, 256>, <259, 254>, <NC / 2 - 512, NC / 2 - 512>
|
||||
// release 2M @(capacity / 2)
|
||||
interval_vector_t r;
|
||||
r.emplace_back(capacity / 2, 2 * _1m);
|
||||
@@ -733,10 +749,12 @@
|
||||
al2.collect_stats(bins_overall);
|
||||
ASSERT_EQ(bins_overall.size(), 3u);
|
||||
ASSERT_EQ(bins_overall[cbits(_1m / 0x1000) - 1], 1u);
|
||||
- ASSERT_EQ(bins_overall[cbits((_1m - 0x3000) / 0x1000) - 1], 1u);
|
||||
+ ASSERT_EQ(bins_overall[cbits((_1m - 0x2000) / 0x1000) - 1], 1u);
|
||||
ASSERT_EQ(bins_overall[cbits((num_chunks) / 2) - 1], 1u);
|
||||
}
|
||||
{
|
||||
+ // Original free space disposition (start chunk, count):
|
||||
+ // <1, 256>, <259, 254>, <NC / 2, NC / 2>
|
||||
// allocate 4x512K - should go to the second halves of
|
||||
// the first and second 1M chunks and @(capacity / 2)
|
||||
uint64_t allocated4 = 0;
|
||||
@@ -744,51 +762,54 @@
|
||||
al2.allocate_l2(2 * _1m, _1m / 2, &allocated4, &a4);
|
||||
ASSERT_EQ(a4.size(), 3u);
|
||||
ASSERT_EQ(allocated4, 2 * _1m);
|
||||
- ASSERT_EQ(a4[0].offset, _1m / 2);
|
||||
+ ASSERT_EQ(a4[1].offset, 0x1000);
|
||||
+ ASSERT_EQ(a4[1].length, _1m);
|
||||
+ ASSERT_EQ(a4[0].offset, _1m + 0x3000);
|
||||
ASSERT_EQ(a4[0].length, _1m / 2);
|
||||
- ASSERT_EQ(a4[1].offset, _1m + _1m / 2);
|
||||
- ASSERT_EQ(a4[1].length, _1m / 2);
|
||||
ASSERT_EQ(a4[2].offset, capacity / 2);
|
||||
- ASSERT_EQ(a4[2].length, _1m);
|
||||
+ ASSERT_EQ(a4[2].length, _1m / 2);
|
||||
|
||||
bins_overall.clear();
|
||||
al2.collect_stats(bins_overall);
|
||||
- ASSERT_EQ(bins_overall.size(), 3u);
|
||||
- ASSERT_EQ(bins_overall[0], 1u);
|
||||
- // below we have 512K - 4K & 512K - 12K chunks which both fit into
|
||||
- // the same bin = 6
|
||||
- ASSERT_EQ(bins_overall[6], 2u);
|
||||
+ ASSERT_EQ(bins_overall.size(), 2u);
|
||||
+ ASSERT_EQ(bins_overall[cbits((_1m - 0x2000 - 0x80000) / 0x1000) - 1], 1u);
|
||||
ASSERT_EQ(bins_overall[cbits((num_chunks - 256) / 2) - 1], 1u);
|
||||
|
||||
}
|
||||
{
|
||||
- // cleanup first 2M except except the last 4K chunk
|
||||
+ // Original free space disposition (start chunk, count):
|
||||
+ // <387, 126>, <NC / 2 + 128, NC / 2 - 128>
|
||||
+ // cleanup first 1536K except the last 4K chunk
|
||||
interval_vector_t r;
|
||||
- r.emplace_back(0, 2 * _1m - 0x1000);
|
||||
+ r.emplace_back(0, _1m + _1m / 2 - 0x1000);
|
||||
al2.free_l2(r);
|
||||
bins_overall.clear();
|
||||
al2.collect_stats(bins_overall);
|
||||
|
||||
ASSERT_EQ(bins_overall.size(), 3u);
|
||||
- ASSERT_EQ(bins_overall[0], 1u);
|
||||
- ASSERT_EQ(bins_overall[cbits((_2m - 0x1000) / 0x1000) - 1], 1u);
|
||||
+ ASSERT_EQ(bins_overall[cbits((_1m + _1m / 2 - 0x1000) / 0x1000) - 1], 1u);
|
||||
+ ASSERT_EQ(bins_overall[cbits((_1m - 0x2000 - 0x80000) / 0x1000) - 1], 1u);
|
||||
ASSERT_EQ(bins_overall[cbits((num_chunks - 256) / 2) - 1], 1u);
|
||||
}
|
||||
{
|
||||
- // release 2M @(capacity / 2)
|
||||
+ // Original free space disposition (start chunk, count):
|
||||
+ // <0, 383> <387, 126>, <NC / 2 + 128, NC / 2 - 128>
|
||||
+ // release 512K @(capacity / 2)
|
||||
interval_vector_t r;
|
||||
- r.emplace_back(capacity / 2, 2 * _1m);
|
||||
+ r.emplace_back(capacity / 2, _1m / 2);
|
||||
al2.free_l2(r);
|
||||
bins_overall.clear();
|
||||
al2.collect_stats(bins_overall);
|
||||
|
||||
ASSERT_EQ(bins_overall.size(), 3u);
|
||||
- ASSERT_EQ(bins_overall[0], 1u);
|
||||
- ASSERT_EQ(bins_overall[cbits((_2m - 0x1000) / 0x1000) - 1], 1u);
|
||||
+ ASSERT_EQ(bins_overall[cbits((_1m + _1m / 2 - 0x1000) / 0x1000) - 1], 1u);
|
||||
+ ASSERT_EQ(bins_overall[cbits((_1m - 0x2000 - 0x80000) / 0x1000) - 1], 1u);
|
||||
ASSERT_EQ(bins_overall[cbits(num_chunks / 2) - 1], 1u);
|
||||
}
|
||||
{
|
||||
- // allocate 132M using 4M granularity should go to (capacity / 2)
|
||||
+ // Original free space disposition (start chunk, count):
|
||||
+ // <0, 383> <387, 126>, <NC / 2, NC / 2>
|
||||
+ // allocate 132M (=33792*4096) = using 4M granularity should go to (capacity / 2)
|
||||
uint64_t allocated4 = 0;
|
||||
interval_vector_t a4;
|
||||
al2.allocate_l2(132 * _1m, 4 * _1m , &allocated4, &a4);
|
||||
@@ -799,24 +820,40 @@
|
||||
bins_overall.clear();
|
||||
al2.collect_stats(bins_overall);
|
||||
ASSERT_EQ(bins_overall.size(), 3u);
|
||||
+ ASSERT_EQ(bins_overall[cbits((_1m + _1m / 2 - 0x1000) / 0x1000) - 1], 1u);
|
||||
+ ASSERT_EQ(bins_overall[cbits((_1m - 0x2000 - 0x80000) / 0x1000) - 1], 1u);
|
||||
+ ASSERT_EQ(bins_overall[cbits(num_chunks / 2 - 33792) - 1], 1u);
|
||||
}
|
||||
{
|
||||
- // cleanup left 4K chunk in the first 2M
|
||||
+ // Original free space disposition (start chunk, count):
|
||||
+ // <0, 383> <387, 126>, <NC / 2 + 33792, NC / 2 - 33792>
|
||||
+ // cleanup remaining 4*4K chunks in the first 2M
|
||||
interval_vector_t r;
|
||||
- r.emplace_back(2 * _1m - 0x1000, 0x1000);
|
||||
+ r.emplace_back(383 * 4096, 4 * 0x1000);
|
||||
al2.free_l2(r);
|
||||
bins_overall.clear();
|
||||
al2.collect_stats(bins_overall);
|
||||
|
||||
ASSERT_EQ(bins_overall.size(), 2u);
|
||||
+ ASSERT_EQ(bins_overall[cbits((2 * _1m + 0x1000) / 0x1000) - 1], 1u);
|
||||
+ ASSERT_EQ(bins_overall[cbits(num_chunks / 2 - 33792) - 1], 1u);
|
||||
}
|
||||
{
|
||||
+ // Original free space disposition (start chunk, count):
|
||||
+ // <0, 513>, <NC / 2 + 33792, NC / 2 - 33792>
|
||||
// release 132M @(capacity / 2)
|
||||
interval_vector_t r;
|
||||
r.emplace_back(capacity / 2, 132 * _1m);
|
||||
al2.free_l2(r);
|
||||
+ bins_overall.clear();
|
||||
+ al2.collect_stats(bins_overall);
|
||||
+ ASSERT_EQ(bins_overall.size(), 2u);
|
||||
+ ASSERT_EQ(bins_overall[cbits((2 * _1m + 0x1000) / 0x1000) - 1], 1u);
|
||||
+ ASSERT_EQ(bins_overall[cbits(num_chunks / 2) - 1], 1u);
|
||||
}
|
||||
{
|
||||
+ // Original free space disposition (start chunk, count):
|
||||
+ // <0, 513>, <NC / 2, NC / 2>
|
||||
// allocate 132M using 2M granularity should go to the first chunk and to
|
||||
// (capacity / 2)
|
||||
uint64_t allocated4 = 0;
|
||||
@@ -827,14 +864,31 @@
|
||||
ASSERT_EQ(a4[0].length, 2 * _1m);
|
||||
ASSERT_EQ(a4[1].offset, capacity / 2);
|
||||
ASSERT_EQ(a4[1].length, 130 * _1m);
|
||||
+
|
||||
+ bins_overall.clear();
|
||||
+ al2.collect_stats(bins_overall);
|
||||
+
|
||||
+ ASSERT_EQ(bins_overall.size(), 2u);
|
||||
+ ASSERT_EQ(bins_overall[cbits(0)], 1u);
|
||||
+ ASSERT_EQ(bins_overall[cbits(num_chunks / 2 - 33792) - 1], 1u);
|
||||
}
|
||||
{
|
||||
+ // Original free space disposition (start chunk, count):
|
||||
+ // <512, 1>, <NC / 2 + 33792, NC / 2 - 33792>
|
||||
// release 130M @(capacity / 2)
|
||||
interval_vector_t r;
|
||||
r.emplace_back(capacity / 2, 132 * _1m);
|
||||
al2.free_l2(r);
|
||||
+ bins_overall.clear();
|
||||
+ al2.collect_stats(bins_overall);
|
||||
+
|
||||
+ ASSERT_EQ(bins_overall.size(), 2u);
|
||||
+ ASSERT_EQ(bins_overall[cbits(0)], 1u);
|
||||
+ ASSERT_EQ(bins_overall[cbits(num_chunks / 2) - 1], 1u);
|
||||
}
|
||||
{
|
||||
+ // Original free space disposition (start chunk, count):
|
||||
+ // <512,1>, <NC / 2, NC / 2>
|
||||
// release 4K~16K
|
||||
// release 28K~32K
|
||||
// release 68K~24K
|
||||
@@ -843,21 +897,46 @@
|
||||
r.emplace_back(0x7000, 0x8000);
|
||||
r.emplace_back(0x11000, 0x6000);
|
||||
al2.free_l2(r);
|
||||
+
|
||||
+ bins_overall.clear();
|
||||
+ al2.collect_stats(bins_overall);
|
||||
+
|
||||
+ ASSERT_EQ(bins_overall.size(), 4u);
|
||||
+ ASSERT_EQ(bins_overall[cbits(0)], 1u);
|
||||
+ ASSERT_EQ(bins_overall[cbits(0x4000 / 0x1000) - 1], 2u); // accounts both 0x4000 & 0x6000
|
||||
+ ASSERT_EQ(bins_overall[cbits(0x8000 / 0x1000) - 1], 1u);
|
||||
+ ASSERT_EQ(bins_overall[cbits(num_chunks / 2) - 1], 1u);
|
||||
}
|
||||
{
|
||||
- // allocate 32K using 16K granularity - should bypass the first
|
||||
- // unaligned extent, use the second free extent partially given
|
||||
- // the 16K alignment and then fallback to capacity / 2
|
||||
+ // Original free space disposition (start chunk, count):
|
||||
+ // <1, 4>, <7, 8>, <17, 6> <512,1>, <NC / 2, NC / 2>
|
||||
+ // allocate 80K using 16K granularity
|
||||
uint64_t allocated4 = 0;
|
||||
interval_vector_t a4;
|
||||
- al2.allocate_l2(0x8000, 0x4000, &allocated4, &a4);
|
||||
- ASSERT_EQ(a4.size(), 2u);
|
||||
- ASSERT_EQ(a4[0].offset, 0x8000u);
|
||||
- ASSERT_EQ(a4[0].length, 0x4000u);
|
||||
- ASSERT_EQ(a4[1].offset, capacity / 2);
|
||||
+ al2.allocate_l2(0x14000, 0x4000, &allocated4, &a4);
|
||||
+
|
||||
+ ASSERT_EQ(a4.size(), 4);
|
||||
+ ASSERT_EQ(a4[1].offset, 0x1000u);
|
||||
ASSERT_EQ(a4[1].length, 0x4000u);
|
||||
- }
|
||||
+ ASSERT_EQ(a4[0].offset, 0x7000u);
|
||||
+ ASSERT_EQ(a4[0].length, 0x8000u);
|
||||
+ ASSERT_EQ(a4[2].offset, 0x11000u);
|
||||
+ ASSERT_EQ(a4[2].length, 0x4000u);
|
||||
+ ASSERT_EQ(a4[3].offset, capacity / 2);
|
||||
+ ASSERT_EQ(a4[3].length, 0x4000u);
|
||||
+
|
||||
+ bins_overall.clear();
|
||||
+ al2.collect_stats(bins_overall);
|
||||
|
||||
+ ASSERT_EQ(bins_overall.size(), 3u);
|
||||
+ ASSERT_EQ(bins_overall[cbits(0)], 1u);
|
||||
+ ASSERT_EQ(bins_overall[cbits(0x2000 / 0x1000) - 1], 1u);
|
||||
+ ASSERT_EQ(bins_overall[cbits(num_chunks / 2 - 1) - 1], 1u);
|
||||
+ }
|
||||
+ {
|
||||
+ // Original free space disposition (start chunk, count):
|
||||
+ // <21, 2> <512,1>, <NC / 2 + 1, NC / 2 - 1>
|
||||
+ }
|
||||
}
|
||||
std::cout << "Done L2 cont aligned" << std::endl;
|
||||
}
|
||||
@@ -913,7 +992,7 @@
|
||||
al2.allocate_l2(0x3e000000, _1m, &allocated4, &a4);
|
||||
ASSERT_EQ(a4.size(), 2u);
|
||||
ASSERT_EQ(allocated4, 0x3e000000u);
|
||||
- ASSERT_EQ(a4[0].offset, 0x5fed00000u);
|
||||
+ ASSERT_EQ(a4[0].offset, 0x5fec30000u);
|
||||
ASSERT_EQ(a4[0].length, 0x1300000u);
|
||||
ASSERT_EQ(a4[1].offset, 0x628000000u);
|
||||
ASSERT_EQ(a4[1].length, 0x3cd00000u);
|
||||
diff -ur ceph-18.2.1~/src/test/objectstore/store_test.cc ceph-18.2.1/src/test/objectstore/store_test.cc
|
||||
--- ceph-18.2.1~/src/test/objectstore/store_test.cc 2023-11-14 14:36:19.000000000 -0500
|
||||
+++ ceph-18.2.1/src/test/objectstore/store_test.cc 2023-12-11 16:55:38.000000000 -0500
|
||||
@@ -9524,9 +9524,9 @@
|
||||
string key;
|
||||
_key_encode_u64(1, &key);
|
||||
bluestore_shared_blob_t sb(1);
|
||||
- sb.ref_map.get(0x2000, block_size);
|
||||
- sb.ref_map.get(0x4000, block_size);
|
||||
- sb.ref_map.get(0x4000, block_size);
|
||||
+ sb.ref_map.get(0x822000, block_size);
|
||||
+ sb.ref_map.get(0x824000, block_size);
|
||||
+ sb.ref_map.get(0x824000, block_size);
|
||||
bufferlist bl;
|
||||
encode(sb, bl);
|
||||
bstore->inject_broken_shared_blob_key(key, bl);
|
@ -1,37 +0,0 @@
|
||||
diff --git a/src/common/dout.h b/src/common/dout.h
|
||||
index 4cd60efff8fef..db68a042a7f1b 100644
|
||||
--- a/src/common/dout.h
|
||||
+++ b/src/common/dout.h
|
||||
@@ -144,17 +144,24 @@ struct is_dynamic<dynamic_marker_t<T>> : public std::true_type {};
|
||||
#else
|
||||
#define dout_impl(cct, sub, v) \
|
||||
do { \
|
||||
- const bool should_gather = [&](const auto cctX) { \
|
||||
- if constexpr (ceph::dout::is_dynamic<decltype(sub)>::value || \
|
||||
- ceph::dout::is_dynamic<decltype(v)>::value) { \
|
||||
+ const bool should_gather = [&](const auto cctX, auto sub_, auto v_) { \
|
||||
+ /* The check is performed on `sub_` and `v_` to leverage the C++'s \
|
||||
+ * guarantee on _discarding_ one of blocks of `if constexpr`, which \
|
||||
+ * includes also the checks for ill-formed code (`should_gather<>` \
|
||||
+ * must not be feed with non-const expresions), BUT ONLY within \
|
||||
+ * a template (thus the generic lambda) and under the restriction \
|
||||
+ * it's dependant on a parameter of this template). \
|
||||
+ * GCC prior to v14 was not enforcing these restrictions. */ \
|
||||
+ if constexpr (ceph::dout::is_dynamic<decltype(sub_)>::value || \
|
||||
+ ceph::dout::is_dynamic<decltype(v_)>::value) { \
|
||||
return cctX->_conf->subsys.should_gather(sub, v); \
|
||||
} else { \
|
||||
- /* The parentheses are **essential** because commas in angle \
|
||||
- * brackets are NOT ignored on macro expansion! A language's \
|
||||
- * limitation, sorry. */ \
|
||||
- return (cctX->_conf->subsys.template should_gather<sub, v>()); \
|
||||
+ constexpr auto sub_helper = static_cast<decltype(sub_)>(sub); \
|
||||
+ constexpr auto v_helper = static_cast<decltype(v_)>(v); \
|
||||
+ return cctX->_conf->subsys.template should_gather<sub_helper, \
|
||||
+ v_helper>(); \
|
||||
} \
|
||||
- }(cct); \
|
||||
+ }(cct, sub, v); \
|
||||
\
|
||||
if (should_gather) { \
|
||||
ceph::logging::MutableEntry _dout_e(v, sub); \
|
178
ceph-c99-2.patch
178
ceph-c99-2.patch
@ -1,178 +0,0 @@
|
||||
commit a49d154f4a8e493baf2296a15c7b5c56cd25e993
|
||||
Author: Florian Weimer <fweimer@redhat.com>
|
||||
Date: Wed Dec 20 14:59:19 2023 +0100
|
||||
|
||||
pybind: Fix C type errors in Cython-generated Python bindings
|
||||
|
||||
Several Ceph APIs use bool * types, which correspond to
|
||||
libcpp.bool * types in Cython. The bint type has an incorrect
|
||||
size 4 and cannot be used as a replacement.
|
||||
|
||||
This prevents a compilation failure with future compilers:
|
||||
|
||||
…-build/src/pybind/rbd/rbd.c: In function ‘__pyx_pf_3rbd_3RBD_104namespace_exists’:
|
||||
…-build/src/pybind/rbd/rbd.c:42165:76: error: passing argument 3 of ‘rbd_namespace_exists’ from incompatible pointer type
|
||||
42165 | __pyx_v_ret = rbd_namespace_exists(__pyx_v__ioctx, __pyx_v__name, (&__pyx_v__exists));
|
||||
| ~^~~~~~~~~~~~~~~~~
|
||||
| |
|
||||
| int *
|
||||
In file included from …-build/src/pybind/rbd/rbd.c:1268:
|
||||
…/src/include/rbd/librbd.h:1496:45: note: expected ‘_Bool *’ but argument is of type ‘int *’
|
||||
1496 | bool *exists);
|
||||
| ^
|
||||
|
||||
Signed-off-by: Florian Weimer <fweimer@redhat.com>
|
||||
|
||||
diff --git a/src/pybind/rbd/c_rbd.pxd b/src/pybind/rbd/c_rbd.pxd
|
||||
index 885f7bd46a..bda23bbc47 100644
|
||||
--- a/src/pybind/rbd/c_rbd.pxd
|
||||
+++ b/src/pybind/rbd/c_rbd.pxd
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
from libc.stdint cimport *
|
||||
from ctime cimport time_t, timespec
|
||||
+cimport libcpp
|
||||
|
||||
cdef extern from "rados/librados.h":
|
||||
enum:
|
||||
@@ -525,7 +526,7 @@ cdef extern from "rbd/librbd.h" nogil:
|
||||
int rbd_snap_unprotect(rbd_image_t image, const char *snap_name)
|
||||
int rbd_snap_is_protected(rbd_image_t image, const char *snap_name,
|
||||
int *is_protected)
|
||||
- int rbd_snap_exists(rbd_image_t image, const char *snapname, bint *exists)
|
||||
+ int rbd_snap_exists(rbd_image_t image, const char *snapname, libcpp.bool *exists)
|
||||
int rbd_snap_get_limit(rbd_image_t image, uint64_t *limit)
|
||||
int rbd_snap_set_limit(rbd_image_t image, uint64_t limit)
|
||||
int rbd_snap_get_timestamp(rbd_image_t image, uint64_t snap_id, timespec *timestamp)
|
||||
@@ -711,7 +712,7 @@ cdef extern from "rbd/librbd.h" nogil:
|
||||
int rbd_namespace_list(rados_ioctx_t io, char *namespace_names,
|
||||
size_t *size)
|
||||
int rbd_namespace_exists(rados_ioctx_t io, const char *namespace_name,
|
||||
- bint *exists)
|
||||
+ libcpp.bool *exists)
|
||||
|
||||
int rbd_pool_init(rados_ioctx_t, bint force)
|
||||
|
||||
diff --git a/src/pybind/rbd/mock_rbd.pxi b/src/pybind/rbd/mock_rbd.pxi
|
||||
index 11872bd814..364f965fba 100644
|
||||
--- a/src/pybind/rbd/mock_rbd.pxi
|
||||
+++ b/src/pybind/rbd/mock_rbd.pxi
|
||||
@@ -3,6 +3,11 @@
|
||||
from libc.stdint cimport *
|
||||
from ctime cimport time_t, timespec
|
||||
|
||||
+# Make the bool type available as libcpp.bool, for both C and C++.
|
||||
+cimport libcpp
|
||||
+cdef extern from "<stdbool.h>":
|
||||
+ pass
|
||||
+
|
||||
cdef nogil:
|
||||
enum:
|
||||
_LIBRADOS_SNAP_HEAD "LIBRADOS_SNAP_HEAD"
|
||||
@@ -637,7 +642,7 @@ cdef nogil:
|
||||
int rbd_snap_is_protected(rbd_image_t image, const char *snap_name,
|
||||
int *is_protected):
|
||||
pass
|
||||
- int rbd_snap_exists(rbd_image_t image, const char *snapname, bint *exists):
|
||||
+ int rbd_snap_exists(rbd_image_t image, const char *snapname, libcpp.bool *exists):
|
||||
pass
|
||||
int rbd_snap_get_limit(rbd_image_t image, uint64_t *limit):
|
||||
pass
|
||||
@@ -896,7 +901,7 @@ cdef nogil:
|
||||
size_t *size):
|
||||
pass
|
||||
int rbd_namespace_exists(rados_ioctx_t io, const char *namespace_name,
|
||||
- bint *exists):
|
||||
+ libcpp.bool *exists):
|
||||
pass
|
||||
int rbd_pool_init(rados_ioctx_t io, bint force):
|
||||
pass
|
||||
diff --git a/src/pybind/rbd/rbd.pyx b/src/pybind/rbd/rbd.pyx
|
||||
index fcb2fb3470..f59ba23f0f 100644
|
||||
--- a/src/pybind/rbd/rbd.pyx
|
||||
+++ b/src/pybind/rbd/rbd.pyx
|
||||
@@ -23,6 +23,7 @@ from libc cimport errno
|
||||
from libc.stdint cimport *
|
||||
from libc.stdlib cimport malloc, realloc, free
|
||||
from libc.string cimport strdup, memset
|
||||
+cimport libcpp
|
||||
|
||||
try:
|
||||
from collections.abc import Iterable
|
||||
@@ -1935,12 +1936,12 @@ class RBD(object):
|
||||
cdef:
|
||||
rados_ioctx_t _ioctx = convert_ioctx(ioctx)
|
||||
const char *_name = name
|
||||
- bint _exists = False
|
||||
+ libcpp.bool _exists = False
|
||||
with nogil:
|
||||
ret = rbd_namespace_exists(_ioctx, _name, &_exists)
|
||||
if ret != 0:
|
||||
raise make_ex(ret, 'error verifying namespace')
|
||||
- return bool(_exists != 0)
|
||||
+ return _exists
|
||||
|
||||
def namespace_list(self, ioctx):
|
||||
"""
|
||||
@@ -3679,12 +3680,12 @@ cdef class Image(object):
|
||||
name = cstr(name, 'name')
|
||||
cdef:
|
||||
char *_name = name
|
||||
- bint _exists = False
|
||||
+ libcpp.bool _exists = False
|
||||
with nogil:
|
||||
ret = rbd_snap_exists(self.image, _name, &_exists)
|
||||
if ret != 0:
|
||||
raise make_ex(ret, 'error getting snapshot exists for %s' % self.name)
|
||||
- return bool(_exists != 0)
|
||||
+ return _exists
|
||||
|
||||
@requires_not_closed
|
||||
def get_snap_limit(self):
|
||||
diff --git a/src/pybind/rgw/mock_rgw.pxi b/src/pybind/rgw/mock_rgw.pxi
|
||||
index ca893a5bb8..806d4df75d 100644
|
||||
--- a/src/pybind/rgw/mock_rgw.pxi
|
||||
+++ b/src/pybind/rgw/mock_rgw.pxi
|
||||
@@ -1,5 +1,10 @@
|
||||
# cython: embedsignature=True
|
||||
|
||||
+# Make the bool type available as libcpp.bool, for both C and C++.
|
||||
+cimport libcpp
|
||||
+cdef extern from "<stdbool.h>":
|
||||
+ pass
|
||||
+
|
||||
cdef nogil:
|
||||
ctypedef void* librgw_t
|
||||
|
||||
@@ -111,8 +116,8 @@ cdef nogil:
|
||||
|
||||
int rgw_readdir(rgw_fs *fs,
|
||||
rgw_file_handle *parent_fh, uint64_t *offset,
|
||||
- bint (*cb)(const char *name, void *arg, uint64_t offset, stat *st, uint32_t st_mask, uint32_t flags) nogil except? -9000,
|
||||
- void *cb_arg, bint *eof, uint32_t flags) except? -9000:
|
||||
+ libcpp.bool (*cb)(const char *name, void *arg, uint64_t offset, stat *st, uint32_t st_mask, uint32_t flags) nogil except? -9000,
|
||||
+ void *cb_arg, libcpp.bool *eof, uint32_t flags) except? -9000:
|
||||
pass
|
||||
|
||||
int rgw_getattr(rgw_fs *fs,
|
||||
diff --git a/src/pybind/rgw/rgw.pyx b/src/pybind/rgw/rgw.pyx
|
||||
index 9bbcdfff58..d210a70bbb 100644
|
||||
--- a/src/pybind/rgw/rgw.pyx
|
||||
+++ b/src/pybind/rgw/rgw.pyx
|
||||
@@ -7,6 +7,7 @@ from cpython cimport PyObject, ref, exc, array
|
||||
from libc.stdint cimport *
|
||||
from libc.stdlib cimport malloc, realloc, free
|
||||
from cstat cimport stat
|
||||
+cimport libcpp
|
||||
|
||||
IF BUILD_DOC:
|
||||
include "mock_rgw.pxi"
|
||||
@@ -373,7 +374,7 @@ cdef class LibRGWFS(object):
|
||||
cdef:
|
||||
rgw_file_handle *_dir_handler = <rgw_file_handle*>dir_handler.handler
|
||||
uint64_t _offset = offset
|
||||
- bint _eof
|
||||
+ libcpp.bool _eof
|
||||
uint32_t _flags = flags
|
||||
with nogil:
|
||||
ret = rgw_readdir(self.fs, _dir_handler, &_offset, &readdir_cb,
|
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (ceph-18.2.1.tar.gz) = 88e1c18bc6c824b6203cf026cca4c9409000e7cf5b2b986e22ab74d2790d8b93d91556bd3af15a320dbdd0cf2302308f0b2c75fd1243bc5a65f76fc6b3d70736
|
||||
SHA512 (ceph-12.2.7.tar.gz) = 90ea11b805e9a82116626013df6cf764bf8b7d441303bfe06d236930ee11df30d5d52b1a61b973c92186cd948b573f11fc68d15014475c3f70620c874de490cd
|
||||
|
Loading…
Reference in New Issue
Block a user