]> git.pld-linux.org Git - packages/ceph.git/commitdiff
- trying more functionality (zbd, qat, qatlib; seastar is LP64 only)
authorJakub Bogusz <qboosh@pld-linux.org>
Mon, 29 Aug 2022 04:31:29 +0000 (06:31 +0200)
committerJakub Bogusz <qboosh@pld-linux.org>
Mon, 29 Aug 2022 04:31:29 +0000 (06:31 +0200)
ceph-libdir.patch [new file with mode: 0644]
ceph-qat.patch [new file with mode: 0644]
ceph.spec
types.patch

diff --git a/ceph-libdir.patch b/ceph-libdir.patch
new file mode 100644 (file)
index 0000000..871be3e
--- /dev/null
@@ -0,0 +1,11 @@
+--- ceph-17.2.3/src/os/CMakeLists.txt.orig     2022-07-28 23:52:12.000000000 +0200
++++ ceph-17.2.3/src/os/CMakeLists.txt  2022-08-28 13:58:09.699009978 +0200
+@@ -76,7 +76,7 @@ if(WITH_BLUEFS)
+   target_include_directories(bluefs SYSTEM PUBLIC
+     $<TARGET_PROPERTY:RocksDB::RocksDB,INTERFACE_INCLUDE_DIRECTORIES>)
+   target_link_libraries(bluefs global)
+-  install(TARGETS bluefs DESTINATION lib)
++  install(TARGETS bluefs DESTINATION lib${LIB_SUFFIX})
+ endif(WITH_BLUEFS)
+ if(WITH_FUSE)
diff --git a/ceph-qat.patch b/ceph-qat.patch
new file mode 100644 (file)
index 0000000..0954baa
--- /dev/null
@@ -0,0 +1,102 @@
+--- ceph-17.2.3/CMakeLists.txt.orig    2022-07-28 23:52:12.000000000 +0200
++++ ceph-17.2.3/CMakeLists.txt 2022-08-28 14:39:36.852487766 +0200
+@@ -278,7 +278,7 @@ option(WITH_BLUEFS "libbluefs library" O
+ option(WITH_QAT "Enable Qat driver" OFF)
+ if(WITH_QAT)
+-  find_package(QatDrv REQUIRED COMPONENTS qat_s usdm_drv_s)
++  find_package(QatDrv REQUIRED COMPONENTS qat usdm)
+   set(HAVE_QATDRV $(QatDrv_FOUND))
+ endif()
+--- ceph-17.2.3/src/crypto/qat/CMakeLists.txt.orig     2022-07-28 23:52:12.000000000 +0200
++++ ceph-17.2.3/src/crypto/qat/CMakeLists.txt  2022-08-28 14:39:51.893274653 +0200
+@@ -12,8 +12,8 @@ add_library(ceph_crypto_qat SHARED ${qat
+ add_dependencies(crypto_plugins ceph_crypto_qat)
+ target_link_libraries(ceph_crypto_qat PRIVATE
+-                      QatDrv::qat_s
+-                      QatDrv::usdm_drv_s)
++                      QatDrv::qat
++                      QatDrv::usdm)
+ add_dependencies(crypto_plugins ceph_crypto_qat)
+ set_target_properties(ceph_crypto_qat PROPERTIES VERSION 1.0.0 SOVERSION 1)
+--- ceph-17.2.3/cmake/modules/FindQatDrv.cmake.orig    2022-07-28 23:52:12.000000000 +0200
++++ ceph-17.2.3/cmake/modules/FindQatDrv.cmake 2022-08-28 17:59:19.158087689 +0200
+@@ -39,23 +39,15 @@ function(get_qatdrv_version versionfile)
+ endfunction()
+ find_path(QATDRV_INCLUDE_DIR
+-  name quickassist/include/cpa.h
+-  HINTS $ENV{ICP_ROOT} /opt/APP/driver/QAT
+-  NO_DEFAULT_PATH)
++  name qat/cpa.h
++  HINTS $ENV{ICP_ROOT}
++  )
+ if(QATDRV_INCLUDE_DIR)
+-  get_qatdrv_version(${QATDRV_INCLUDE_DIR}/versionfile)
+-  set(QatDrv_INCLUDE_DIRS
+-      ${QATDRV_INCLUDE_DIR}/quickassist/include
+-      ${QATDRV_INCLUDE_DIR}/quickassist/include/dc
+-      ${QATDRV_INCLUDE_DIR}/quickassist/lookaside/access_layer/include
+-      ${QATDRV_INCLUDE_DIR}/quickassist/include/lac
+-      ${QATDRV_INCLUDE_DIR}/quickassist/utilities/libusdm_drv
+-      ${QATDRV_INCLUDE_DIR}/quickassist/utilities/libusdm_drv/include)
++  set(QatDrv_INCLUDE_DIRS ${QATDRV_INCLUDE_DIR})
+ endif()
+ foreach(component ${QatDrv_FIND_COMPONENTS})
+   find_library(QatDrv_${component}_LIBRARIES
+-               NAMES ${component}
+-               HINTS ${QATDRV_INCLUDE_DIR}/build/)
++               NAMES ${component})
+   mark_as_advanced(QatDrv_INCLUDE_DIRS
+                    QatDrv_${component}_LIBRARIES)
+   list(APPEND QatDrv_LIBRARIES "${QatDrv_${component}_LIBRARIES}")  
+@@ -71,7 +63,7 @@ find_package_handle_standard_args(QatDrv
+ foreach(component ${QatDrv_FIND_COMPONENTS})
+   if(NOT TARGET QatDrv::${component})
+-    add_library(QatDrv::${component} STATIC IMPORTED GLOBAL)
++    add_library(QatDrv::${component} SHARED IMPORTED GLOBAL)
+     set_target_properties(QatDrv::${component} PROPERTIES
+                           INTERFACE_INCLUDE_DIRECTORIES "${QatDrv_INCLUDE_DIRS}"
+                           IMPORTED_LINK_INTERFACE_LANGUAGES "C"
+--- ceph-17.2.3/src/compressor/CMakeLists.txt.orig     2022-07-28 23:52:12.000000000 +0200
++++ ceph-17.2.3/src/compressor/CMakeLists.txt  2022-08-28 18:59:38.018324891 +0200
+@@ -7,8 +7,8 @@ endif()
+ add_library(compressor_objs OBJECT ${compressor_srcs})
+ if(HAVE_QATZIP AND HAVE_QATDRV)
+   target_link_libraries(compressor_objs PRIVATE
+-                        QatDrv::qat_s
+-                        QatDrv::usdm_drv_s
++                        QatDrv::qat
++                        QatDrv::usdm
+                         qatzip::qatzip
+                        )
+ endif()
+--- ceph-17.2.3/src/crypto/qat/qcccrypto.h.orig        2022-07-28 23:52:12.000000000 +0200
++++ ceph-17.2.3/src/crypto/qat/qcccrypto.h     2022-08-28 20:18:02.916194325 +0200
+@@ -8,13 +8,15 @@
+ #include <pthread.h>
+ #include <queue>
+ extern "C" {
+-#include "cpa.h"
+-#include "lac/cpa_cy_sym.h"
+-#include "lac/cpa_cy_im.h"
+-#include "qae_mem.h"
+-#include "icp_sal_user.h"
+-#include "icp_sal_poll.h"
+-#include "qae_mem_utils.h"
++#include "qat/cpa.h"
++#include "qat/cpa_cy_sym.h"
++#include "qat/cpa_cy_im.h"
++#include "qat/qae_mem.h"
++#include "qat/icp_sal_user.h"
++#include "qat/icp_sal_poll.h"
++
++CpaStatus qaeMemInit(void);
++void qaeMemDestroy(void);
+ }
+ class QccCrypto {
index e31c82bd299fe7af82facc18702dc74015a002d8..6e4b43e89d5d850c25e022f48796e92fa3f8b3f9 100644 (file)
--- a/ceph.spec
+++ b/ceph.spec
@@ -1,7 +1,5 @@
 # TODO:
-# - libzbd bluestore backend? (WITH_ZBD=ON, BR: libzbd-devel)
-# - bluefs? (WITH_BLUEFS=ON)
-# - QATZIP? (WITH_QATZIP=ON, BR: qatzip-devel)
+# - QATZIP? (WITH_QATZIP=ON, BR: QATzip-devel)
 # - brotli? (WITH_BROTLI=ON, uses internal brotli as downloaded subproject)
 # - seastar (WITH_SEASTAR=ON, BR: c-ares-devel >= 1.13.0)
 # - proper init scripts if non-systemd boot is to be supported
@@ -15,6 +13,7 @@
 # Conditional build:
 %bcond_without java            # Java binding
 %bcond_with    angular         # Angular-based mgr/dashboard frontend (built using npm, too outdated currently)
+%bcond_without bluefs          # BlueFS library
 %bcond_with    dpdk            # DPDK messaging
 # 15.2.x/16.2.x build fails with:
 # src/rgw/rgw_fcgi_process.cc:92:53: error: 'class rgw::sal::RGWRadosStore' has no member named 'get_new_req_id'
 %bcond_with    fio             # FIO engines support (16.x: downloads fio as internal subproject)
 %bcond_with    kerberos        # GSSAPI/KRB5 support
 %bcond_without pmem            # PMDK (persistent memory) support
+%bcond_without qat             # QAT driver
+%bcond_without qatzip          # QATZIP
 %bcond_without rdma            # RDMA transport support
+%bcond_without seastar         # seastar components (64-bit pointers required)
 %bcond_with    spdk            # Ceph SPDK support (DPDK based)
 %bcond_without system_rocksdb  # system RocksDB storage support
+%bcond_without zbd             # ZBD bluestore backend
 # 15.2.x/16.2.x: "fallthrough" define from OpenZFS's spl breaks "[[fallthrough]]" in src/include/blobhash.h
 %bcond_with    zfs             # ZFS support [not ready for zfs 0.8.x]
 %bcond_without lttng           # LTTng tracing
@@ -38,6 +41,9 @@
 %ifnarch %{x8664} aarch64
 %undefine      with_pmem
 %endif
+%ifnarch %{x8664} aarch64 mips64 ppc64 sparc64 s390x
+%undefine      with_seastar
+%endif
 #
 Summary:       User space components of the Ceph file system
 Summary(pl.UTF-8):     Działające w przestrzeni użytkownika elementy systemu plików Ceph
@@ -55,19 +61,24 @@ Patch1:             %{name}-fio.patch
 Patch2:                %{name}-cmake-static.patch
 Patch3:                %{name}-arrow-pld.patch
 Patch4:                no-virtualenvs.patch
+Patch5:                %{name}-libdir.patch
 Patch6:                types.patch
 Patch7:                use-provided-cpu-flag-values.patch
 Patch8:                ix86-no-asm.patch
 Patch9:                long-int-time_t.patch
+Patch10:       %{name}-qat.patch
 Patch11:       %{name}-liburing.patch
 URL:           https://ceph.io/
+%{?with_qatzip:BuildRequires:  QATzip-devel}
 %{?with_babeltrace:BuildRequires:      babeltrace-devel}
 BuildRequires: boost-devel >= 1.72
 BuildRequires: boost-python3-devel >= 1.72
+%{?with_seastar:BuildRequires: c-ares-devel >= 1.13.0}
 BuildRequires: cmake >= 3.22.2
+%{?with_seastar:BuildRequires: cryptopp-devel >= 5.6.5}
 BuildRequires: cryptsetup-devel >= 2.0.5
 BuildRequires: curl-devel
-%if %{with dpdk} || %{with spdk}
+%if %{with dpdk} || %{with seastar} || %{with spdk}
 BuildRequires: dpdk-devel
 %endif
 BuildRequires: doxygen
@@ -75,9 +86,11 @@ BuildRequires:       expat-devel >= 1.95
 %{?with_fcgi:BuildRequires:    fcgi-devel}
 %{?with_fio:BuildRequires:     fio-devel >= 3.15}
 BuildRequires: gdbm-devel
+%{?with_seastar:BuildRequires: gnutls-devel >= 3.3.26}
 BuildRequires: gperf
 %{?with_tcmalloc:BuildRequires:        gperftools-devel >= 2.6.2}
 %{?with_kerberos:BuildRequires:        heimdal-devel}
+%{?with_seastar:BuildRequires: hwloc-devel >= 1.11.2}
 %if %{with java}
 BuildRequires: jdk
 BuildRequires: jre-X11
@@ -97,19 +110,22 @@ BuildRequires:     libltdl-devel
 BuildRequires: libnl-devel >= 3.2
 BuildRequires: librdkafka-devel >= 0.9.2
 %{?with_rdma:BuildRequires:    librdmacm-devel}
+%{?with_seastar:BuildRequires: libsctp-devel}
 BuildRequires: libstdc++-devel >= 6:7
 %{?with_tcmalloc:BuildRequires:        libtcmalloc-devel >= 2.6.2}
 BuildRequires: libtool >= 2:1.5
 BuildRequires: liburing-devel
 BuildRequires: libuuid-devel
 BuildRequires: libxml2-devel >= 2.0
+%{?with_zbd:BuildRequires:     libzbd-devel}
 %{?with_lttng:BuildRequires:   lttng-ust-devel}
 BuildRequires: lua-devel >= 5.3
-BuildRequires: lz4-devel >= 1:1.7
+BuildRequires: lz4-devel >= 1:1.7.3
 BuildRequires: ncurses-devel
 %{?with_angular:BuildRequires: npm}
 BuildRequires: nspr-devel >= 4
 BuildRequires: nss-devel >= 3
+%{?with_seastar:BuildRequires: numactl-devel}
 BuildRequires: oath-toolkit-devel
 BuildRequires: openldap-devel
 BuildRequires: openssl-devel >= 1.1
@@ -122,8 +138,10 @@ BuildRequires:     python3-PyYAML
 BuildRequires: python3-devel >= 1:3.2
 %{?with_tests:BuildRequires:   python3-tox >= 2.9.1}
 BuildRequires: rabbitmq-c-devel
+%{?with_seastar:BuildRequires: ragel >= 6.10}
 %{?with_system_rocksdb:BuildRequires:  rocksdb-devel >= 5.14}
 BuildRequires: rpmbuild(macros) >= 1.671
+%{?with_qat:BuildRequires:     qatlib-devel}
 BuildRequires: sed >= 4.0
 BuildRequires: snappy-devel
 BuildRequires: sphinx-pdg >= 4.4.0
@@ -133,6 +151,7 @@ BuildRequires:      thrift-devel
 BuildRequires: udev-devel
 %{?with_dpdk:BuildRequires:    xorg-lib-libpciaccess-devel}
 BuildRequires: xfsprogs-devel
+%{?with_seastar:BuildRequires: yaml-cpp-devel >= 0.5.1}
 %ifarch %{x8664}
 BuildRequires: yasm
 %endif
@@ -142,7 +161,7 @@ BuildRequires:      zstd-devel >= 1.4.4
 Requires(post,preun):  /sbin/chkconfig
 Requires(preun):       rc-scripts
 Requires:      %{name}-libs = %{version}-%{release}
-Requires:      lz4 >= 1:1.7
+Requires:      lz4 >= 1:1.7.3
 Requires:      python3-%{name} = %{version}-%{release}
 %{?with_system_rocksdb:Requires:       rocksdb >= 5.14}
 Requires:      systemd-units >= 38
@@ -306,12 +325,14 @@ uruchamiania demonów.
 %patch2 -p1
 %patch3 -p1
 %patch4 -p1
+%patch5 -p1
 %patch6 -p1
 %patch7 -p1
 %patch8 -p1
 %ifarch %{ix86}
 %patch9 -p1
 %endif
+%patch10 -p1
 %patch11 -p1
 
 %{__sed} -i -e '1s,/usr/bin/env bash,/bin/bash,' \
@@ -354,6 +375,7 @@ cd build
        -DPYTHON=%{__python3} \
        -DSPHINX_BUILD=/usr/bin/sphinx-build \
        %{!?with_babeltrace:-DWITH_BABELTRACE=OFF} \
+       %{?with_bluefs:-DWITH_BLUEFS=ON} \
 %if %{with pmem}
        -DWITH_BLUESTORE_PMEM=ON \
        -DWITH_SYSTEM_PMDK:BOOL=ON \
@@ -370,6 +392,9 @@ cd build
        %{?with_fcgi:-DWITH_RADOSGW_FCGI_FRONTEND=ON} \
        %{!?with_rdma:-DWITH_RDMA=OFF} \
        -DWITH_REENTRANT_STRSIGNAL=ON \
+       %{?with_qat:-DWITH_QAT=ON} \
+       %{?with_qatzip:-DWITH_QATZIP=ON} \
+       %{?with_seastar:-DWITH_SEASTAR=ON} \
        %{?with_spdk:-DWITH_SPDK=ON} \
        -DWITH_SYSTEM_BOOST=ON \
        -DWITH_SYSTEM_LIBURING=ON \
@@ -378,6 +403,7 @@ cd build
        -DWITH_SYSTEM_ZSTD=ON \
        -DWITH_SYSTEMD=ON \
        %{!?with_tests:-DWITH_TESTS=OFF} \
+       %{?with_zbd:-DWITH_ZBD=ON} \
        %{?with_zfs:-DWITH_ZFS=ON}
 
 # some object files have missing dependencies on these, pregenerate to avoid global -j1
@@ -651,6 +677,9 @@ fi
 
 %files libs
 %defattr(644,root,root,755)
+%if %{with bluefs}
+%attr(755,root,root) %{_libdir}/libbluefs.so
+%endif
 %attr(755,root,root) %{_libdir}/libcephfs.so.*.*.*
 %attr(755,root,root) %ghost %{_libdir}/libcephfs.so.2
 %attr(755,root,root) %{_libdir}/libos_tp.so.*.*.*
index 34515e2bd534711c59e304c8aedb3fcab8bc34bf..f0cf1464f330ba079ba4757af914c3018dced045 100644 (file)
  
  out:
    return rc;
+--- ceph-17.2.3/src/seastar/src/core/file.cc.orig      2021-12-19 23:02:10.000000000 +0100
++++ ceph-17.2.3/src/seastar/src/core/file.cc   2022-08-28 09:19:17.258501014 +0200
+@@ -313,7 +313,7 @@ posix_file_impl::close() noexcept {
+ future<uint64_t>
+ blockdev_file_impl::size(void) noexcept {
+-    return engine()._thread_pool->submit<syscall_result_extra<size_t>>([this] {
++    return engine()._thread_pool->submit<syscall_result_extra<uint64_t>>([this] {
+         uint64_t size;
+         int ret = ::ioctl(_fd, BLKGETSIZE64, &size);
+         return wrap_syscall(ret, size);
+@@ -908,7 +908,7 @@ append_challenged_posix_file_impl::trunc
+ future<uint64_t>
+ append_challenged_posix_file_impl::size() noexcept {
+-    return make_ready_future<size_t>(_logical_size);
++    return make_ready_future<uint64_t>(_logical_size);
+ }
+ future<>
+@@ -996,7 +996,7 @@ make_file_impl(int fd, file_open_options
+                 engine().fstatfs(fd).then([fd, st_dev] (struct statfs sfs) {
+                     internal::fs_info fsi;
+                     fsi.block_size = sfs.f_bsize;
+-                    switch (sfs.f_type) {
++                    switch (static_cast<unsigned>(sfs.f_type)) {
+                     case 0x58465342: /* XFS */
+                         dioattr da;
+                         if (::ioctl(fd, XFS_IOC_DIOINFO, &da) == 0) {
+--- ceph-17.2.3/src/seastar/src/core/fstream.cc.orig   2021-12-19 23:02:10.000000000 +0100
++++ ceph-17.2.3/src/seastar/src/core/fstream.cc        2022-08-28 09:22:32.072057177 +0200
+@@ -419,7 +419,7 @@ private:
+         if ((buf.size() & (_file.disk_write_dma_alignment() - 1)) != 0) {
+             // If buf size isn't aligned, copy its content into a new aligned buf.
+             // This should only happen when the user calls output_stream::flush().
+-            auto tmp = allocate_buffer(align_up(buf.size(), _file.disk_write_dma_alignment()));
++            auto tmp = allocate_buffer(align_up<uint64_t>(buf.size(), _file.disk_write_dma_alignment()));
+             ::memcpy(tmp.get_write(), buf.get(), buf.size());
+             ::memset(tmp.get_write() + buf.size(), 0, tmp.size() - buf.size());
+             buf = std::move(tmp);
This page took 0.20955 seconds and 4 git commands to generate.