summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt7
-rw-r--r--ceph.spec.in7
-rwxr-xr-xinstall-deps.sh23
-rw-r--r--src/blk/BlockDevice.cc18
-rw-r--r--src/blk/BlockDevice.h3
-rw-r--r--src/blk/CMakeLists.txt9
-rw-r--r--src/blk/zoned/HMSMRDevice.cc131
-rw-r--r--src/blk/zoned/HMSMRDevice.h52
-rw-r--r--src/crimson/os/alienstore/CMakeLists.txt5
-rw-r--r--src/include/config-h.in.cmake3
-rw-r--r--src/os/bluestore/Allocator.cc3
-rw-r--r--src/os/bluestore/FreelistManager.cc10
-rw-r--r--src/test/objectstore/Allocator_test.cc3
-rw-r--r--src/test/objectstore/allocator_replay_test.cc2
-rw-r--r--src/test/objectstore/test_bluefs.cc6
-rwxr-xr-xsrc/vstart.sh8
16 files changed, 7 insertions, 283 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f2df55a75e1..582eda5c74d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -233,13 +233,6 @@ endif()
include(CMakeDependentOption)
-CMAKE_DEPENDENT_OPTION(WITH_ZBD "Enable libzbd bluestore backend" OFF
- "WITH_BLUESTORE" OFF)
-if(WITH_ZBD)
- find_package(zbd REQUIRED)
- set(HAVE_LIBZBD ${ZBD_FOUND})
-endif()
-
CMAKE_DEPENDENT_OPTION(WITH_LIBURING "Enable io_uring bluestore backend" ON
"WITH_BLUESTORE;HAVE_LIBAIO" OFF)
set(HAVE_LIBURING ${WITH_LIBURING})
diff --git a/ceph.spec.in b/ceph.spec.in
index 058c79c5e7f..f813407b76a 100644
--- a/ceph.spec.in
+++ b/ceph.spec.in
@@ -21,7 +21,6 @@
# https://rpm-software-management.github.io/rpm/manual/conditionalbuilds.html
#################################################################################
%bcond_with make_check
-%bcond_with zbd
%bcond_with cmake_verbose_logging
%bcond_without ceph_test_package
%ifarch s390
@@ -300,9 +299,6 @@ BuildRequires: socat
BuildRequires: python%{python3_pkgversion}-asyncssh
BuildRequires: python%{python3_pkgversion}-natsort
%endif
-%if 0%{with zbd}
-BuildRequires: libzbd-devel
-%endif
%if 0%{?suse_version}
BuildRequires: libthrift-devel >= 0.13.0
%else
@@ -1403,9 +1399,6 @@ cmake .. \
%if 0%{without lua_packages}
-DWITH_RADOSGW_LUA_PACKAGES:BOOL=OFF \
%endif
-%if 0%{with zbd}
- -DWITH_ZBD:BOOL=ON \
-%endif
%if 0%{with cmake_verbose_logging}
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
%endif
diff --git a/install-deps.sh b/install-deps.sh
index d01bc6464e6..5956b586e52 100755
--- a/install-deps.sh
+++ b/install-deps.sh
@@ -36,8 +36,6 @@ ARCH=$(uname -m)
function munge_ceph_spec_in {
local with_seastar=$1
shift
- local with_zbd=$1
- shift
local for_make_check=$1
shift
local OUTFILE=$1
@@ -46,9 +44,6 @@ function munge_ceph_spec_in {
if $with_seastar; then
sed -i -e 's/%bcond_with seastar/%bcond_without seastar/g' $OUTFILE
fi
- if $with_zbd; then
- sed -i -e 's/%bcond_with zbd/%bcond_without zbd/g' $OUTFILE
- fi
if $for_make_check; then
sed -i -e 's/%bcond_with make_check/%bcond_without make_check/g' $OUTFILE
fi
@@ -221,19 +216,6 @@ function install_boost_on_ubuntu {
}
-function install_libzbd_on_ubuntu {
- ci_debug "Running install_libzbd_on_ubuntu() in install-deps.sh"
- local codename=$1
- local project=libzbd
- local sha1=1fadde94b08fab574b17637c2bebd2b1e7f9127b
- install_pkg_on_ubuntu \
- $project \
- $sha1 \
- $codename \
- check \
- libzbd-dev
-}
-
motr_pkgs_url='https://github.com/Seagate/cortx-motr/releases/download/2.0.0-rgw'
function install_cortx_motr_on_ubuntu {
@@ -423,7 +405,6 @@ if [ x$(uname)x = xFreeBSDx ]; then
exit
else
[ $WITH_SEASTAR ] && with_seastar=true || with_seastar=false
- [ $WITH_ZBD ] && with_zbd=true || with_zbd=false
[ $WITH_PMEM ] && with_pmem=true || with_pmem=false
[ $WITH_RADOSGW_MOTR ] && with_rgw_motr=true || with_rgw_motr=false
source /etc/os-release
@@ -452,12 +433,10 @@ else
*Bionic*)
ensure_decent_gcc_on_ubuntu 9 bionic
[ ! $NO_BOOST_PKGS ] && install_boost_on_ubuntu bionic
- $with_zbd && install_libzbd_on_ubuntu bionic
;;
*Focal*)
ensure_decent_gcc_on_ubuntu 11 focal
[ ! $NO_BOOST_PKGS ] && install_boost_on_ubuntu focal
- $with_zbd && install_libzbd_on_ubuntu focal
;;
*Jammy*)
[ ! $NO_BOOST_PKGS ] && install_boost_on_ubuntu jammy
@@ -549,7 +528,7 @@ else
if [ "$INSTALL_EXTRA_PACKAGES" ]; then
$SUDO dnf install -y $INSTALL_EXTRA_PACKAGES
fi
- munge_ceph_spec_in $with_seastar $with_zbd $for_make_check $DIR/ceph.spec
+ munge_ceph_spec_in $with_seastar $for_make_check $DIR/ceph.spec
# for python3_pkgversion macro defined by python-srpm-macros, which is required by python3-devel
$SUDO dnf install -y python3-devel
$SUDO $builddepcmd $DIR/ceph.spec 2>&1 | tee $DIR/yum-builddep.out
diff --git a/src/blk/BlockDevice.cc b/src/blk/BlockDevice.cc
index fd07e443c13..33ceacc8909 100644
--- a/src/blk/BlockDevice.cc
+++ b/src/blk/BlockDevice.cc
@@ -31,10 +31,6 @@
#include "pmem/PMEMDevice.h"
#endif
-#if defined(HAVE_LIBZBD)
-#include "zoned/HMSMRDevice.h"
-#endif
-
#include "common/debug.h"
#include "common/EventTrace.h"
#include "common/errno.h"
@@ -113,11 +109,6 @@ BlockDevice::detect_device_type(const std::string& path)
return block_device_t::pmem;
}
#endif
-#if (defined(HAVE_LIBAIO) || defined(HAVE_POSIXAIO)) && defined(HAVE_LIBZBD)
- if (HMSMRDevice::support(path)) {
- return block_device_t::hm_smr;
- }
-#endif
#if defined(HAVE_LIBAIO) || defined(HAVE_POSIXAIO)
return block_device_t::aio;
#else
@@ -143,11 +134,6 @@ BlockDevice::device_type_from_name(const std::string& blk_dev_name)
return block_device_t::pmem;
}
#endif
-#if (defined(HAVE_LIBAIO) || defined(HAVE_POSIXAIO)) && defined(HAVE_LIBZBD)
- if (blk_dev_name == "hm_smr") {
- return block_device_t::hm_smr;
- }
-#endif
return block_device_t::unknown;
}
@@ -169,10 +155,6 @@ BlockDevice* BlockDevice::create_with_type(block_device_t device_type,
case block_device_t::pmem:
return new PMEMDevice(cct, cb, cbpriv);
#endif
-#if (defined(HAVE_LIBAIO) || defined(HAVE_POSIXAIO)) && defined(HAVE_LIBZBD)
- case block_device_t::hm_smr:
- return new HMSMRDevice(cct, cb, cbpriv, d_cb, d_cbpriv);
-#endif
default:
ceph_abort_msg("unsupported device");
return nullptr;
diff --git a/src/blk/BlockDevice.h b/src/blk/BlockDevice.h
index 440faf3d4b4..6c55646fc76 100644
--- a/src/blk/BlockDevice.h
+++ b/src/blk/BlockDevice.h
@@ -156,9 +156,6 @@ private:
unknown,
#if defined(HAVE_LIBAIO) || defined(HAVE_POSIXAIO)
aio,
-#if defined(HAVE_LIBZBD)
- hm_smr,
-#endif
#endif
#if defined(HAVE_SPDK)
spdk,
diff --git a/src/blk/CMakeLists.txt b/src/blk/CMakeLists.txt
index 5d9fd6a5295..62c2a5c29f4 100644
--- a/src/blk/CMakeLists.txt
+++ b/src/blk/CMakeLists.txt
@@ -20,11 +20,6 @@ if(WITH_SPDK)
spdk/NVMEDevice.cc)
endif()
-if(WITH_ZBD)
- list(APPEND libblk_srcs
- zoned/HMSMRDevice.cc)
-endif()
-
if(libblk_srcs)
add_library(blk STATIC ${libblk_srcs})
target_include_directories(blk PRIVATE "./")
@@ -39,10 +34,6 @@ if(WITH_SPDK)
PRIVATE spdk::spdk)
endif()
-if(WITH_ZBD)
- target_link_libraries(blk PRIVATE ${ZBD_LIBRARIES})
-endif()
-
if(WITH_BLUESTORE_PMEM)
if(HAVE_LIBDML)
target_link_libraries(blk PRIVATE dml::dml dml::dmlhl)
diff --git a/src/blk/zoned/HMSMRDevice.cc b/src/blk/zoned/HMSMRDevice.cc
deleted file mode 100644
index 416eae4e49f..00000000000
--- a/src/blk/zoned/HMSMRDevice.cc
+++ /dev/null
@@ -1,131 +0,0 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-/*
- * Ceph - scalable distributed file system
- *
- * Copyright (C) 2014 Red Hat
- * Copyright (C) 2020 Abutalib Aghayev
- *
- * This is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software
- * Foundation. See file COPYING.
- *
- */
-
-#include "HMSMRDevice.h"
-extern "C" {
-#include <libzbd/zbd.h>
-}
-#include "common/debug.h"
-#include "common/errno.h"
-
-#define dout_context cct
-#define dout_subsys ceph_subsys_bdev
-#undef dout_prefix
-#define dout_prefix *_dout << "smrbdev(" << this << " " << path << ") "
-
-using namespace std;
-
-HMSMRDevice::HMSMRDevice(CephContext* cct,
- aio_callback_t cb,
- void *cbpriv,
- aio_callback_t d_cb,
- void *d_cbpriv)
- : KernelDevice(cct, cb, cbpriv, d_cb, d_cbpriv)
-{
-}
-
-bool HMSMRDevice::support(const std::string& path)
-{
- return zbd_device_is_zoned(path.c_str()) == 1;
-}
-
-int HMSMRDevice::_post_open()
-{
- dout(10) << __func__ << dendl;
-
- zbd_fd = zbd_open(path.c_str(), O_RDWR | O_DIRECT | O_LARGEFILE, nullptr);
- int r;
- if (zbd_fd < 0) {
- r = errno;
- derr << __func__ << " zbd_open failed on " << path << ": "
- << cpp_strerror(r) << dendl;
- return -r;
- }
-
- unsigned int nr_zones = 0;
- std::vector<zbd_zone> zones;
- if (zbd_report_nr_zones(zbd_fd, 0, 0, ZBD_RO_NOT_WP, &nr_zones) != 0) {
- r = -errno;
- derr << __func__ << " zbd_report_nr_zones failed on " << path << ": "
- << cpp_strerror(r) << dendl;
- goto fail;
- }
-
- zones.resize(nr_zones);
- if (zbd_report_zones(zbd_fd, 0, 0, ZBD_RO_NOT_WP, zones.data(), &nr_zones) != 0) {
- r = -errno;
- derr << __func__ << " zbd_report_zones failed on " << path << dendl;
- goto fail;
- }
-
- zone_size = zbd_zone_len(&zones[0]);
- conventional_region_size = nr_zones * zone_size;
-
- dout(10) << __func__ << " setting zone size to " << zone_size
- << " and conventional region size to " << conventional_region_size
- << dendl;
-
- return 0;
-
-fail:
- zbd_close(zbd_fd);
- zbd_fd = -1;
- return r;
-}
-
-
-void HMSMRDevice::_pre_close()
-{
- if (zbd_fd >= 0) {
- zbd_close(zbd_fd);
- zbd_fd = -1;
- }
-}
-
-void HMSMRDevice::reset_all_zones()
-{
- dout(10) << __func__ << dendl;
- zbd_reset_zones(zbd_fd, conventional_region_size, 0);
-}
-
-void HMSMRDevice::reset_zone(uint64_t zone)
-{
- dout(10) << __func__ << " zone 0x" << std::hex << zone << std::dec << dendl;
- if (zbd_reset_zones(zbd_fd, zone * zone_size, zone_size) != 0) {
- derr << __func__ << " resetting zone failed for zone 0x" << std::hex
- << zone << std::dec << dendl;
- ceph_abort("zbd_reset_zones failed");
- }
-}
-
-std::vector<uint64_t> HMSMRDevice::get_zones()
-{
- std::vector<zbd_zone> zones;
- unsigned int num_zones = size / zone_size;
- zones.resize(num_zones);
-
- int r = zbd_report_zones(zbd_fd, 0, 0, ZBD_RO_ALL, zones.data(), &num_zones);
- if (r != 0) {
- derr << __func__ << " zbd_report_zones failed on " << path << ": "
- << cpp_strerror(errno) << dendl;
- ceph_abort("zbd_report_zones failed");
- }
-
- std::vector<uint64_t> wp(num_zones);
- for (unsigned i = 0; i < num_zones; ++i) {
- wp[i] = zones[i].wp;
- }
- return wp;
-}
diff --git a/src/blk/zoned/HMSMRDevice.h b/src/blk/zoned/HMSMRDevice.h
deleted file mode 100644
index edf18b5f0ba..00000000000
--- a/src/blk/zoned/HMSMRDevice.h
+++ /dev/null
@@ -1,52 +0,0 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-/*
- * Ceph - scalable distributed file system
- *
- * Copyright (C) 2014 Red Hat
- * Copyright (C) 2020 Abutalib Aghayev
- *
- * This is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software
- * Foundation. See file COPYING.
- *
- */
-
-#ifndef CEPH_BLK_HMSMRDEVICE_H
-#define CEPH_BLK_HMSMRDEVICE_H
-
-#include <atomic>
-
-#include "include/types.h"
-#include "include/interval_set.h"
-#include "common/Thread.h"
-#include "include/utime.h"
-
-#include "aio/aio.h"
-#include "BlockDevice.h"
-#include "../kernel/KernelDevice.h"
-
-
-class HMSMRDevice final : public KernelDevice {
- int zbd_fd = -1; ///< fd for the zoned block device
-
-public:
- HMSMRDevice(CephContext* cct, aio_callback_t cb, void *cbpriv,
- aio_callback_t d_cb, void *d_cbpriv);
-
- static bool support(const std::string& path);
-
- // open/close hooks for libzbd
- int _post_open() override;
- void _pre_close() override;
-
- // smr-specific methods
- bool is_smr() const final { return true; }
- void reset_all_zones() override;
- void reset_zone(uint64_t zone) override;
- std::vector<uint64_t> get_zones() override;
-
-};
-
-#endif //CEPH_BLK_HMSMRDEVICE_H
diff --git a/src/crimson/os/alienstore/CMakeLists.txt b/src/crimson/os/alienstore/CMakeLists.txt
index 20e03d3305f..e446d4099f7 100644
--- a/src/crimson/os/alienstore/CMakeLists.txt
+++ b/src/crimson/os/alienstore/CMakeLists.txt
@@ -63,11 +63,6 @@ set(alien_store_srcs
${PROJECT_SOURCE_DIR}/src/os/bluestore/StupidAllocator.cc
${PROJECT_SOURCE_DIR}/src/os/bluestore/BitmapAllocator.cc
${PROJECT_SOURCE_DIR}/src/os/memstore/MemStore.cc)
-if(WITH_ZBD)
- list(APPEND alien_store_srcs
- ${PROJECT_SOURCE_DIR}/src/os/bluestore/ZonedFreelistManager.cc
- ${PROJECT_SOURCE_DIR}/src/os/bluestore/ZonedAllocator.cc)
-endif()
add_library(crimson-alienstore STATIC
${alien_store_srcs})
if(WITH_LTTNG)
diff --git a/src/include/config-h.in.cmake b/src/include/config-h.in.cmake
index f14a1f43a60..c983eff3963 100644
--- a/src/include/config-h.in.cmake
+++ b/src/include/config-h.in.cmake
@@ -87,9 +87,6 @@
/* Defined if you have libdml */
#cmakedefine HAVE_LIBDML
-/* Defined if you have libzbd */
-#cmakedefine HAVE_LIBZBD
-
/* Defined if you have liburing */
#cmakedefine HAVE_LIBURING
diff --git a/src/os/bluestore/Allocator.cc b/src/os/bluestore/Allocator.cc
index 7029420b53d..60265939988 100644
--- a/src/os/bluestore/Allocator.cc
+++ b/src/os/bluestore/Allocator.cc
@@ -8,9 +8,6 @@
#include "AvlAllocator.h"
#include "BtreeAllocator.h"
#include "HybridAllocator.h"
-#ifdef HAVE_LIBZBD
-#include "ZonedAllocator.h"
-#endif
#include "common/debug.h"
#include "common/admin_socket.h"
#define dout_subsys ceph_subsys_bluestore
diff --git a/src/os/bluestore/FreelistManager.cc b/src/os/bluestore/FreelistManager.cc
index 37347ced66b..1ea07bf6e4c 100644
--- a/src/os/bluestore/FreelistManager.cc
+++ b/src/os/bluestore/FreelistManager.cc
@@ -3,9 +3,6 @@
#include "FreelistManager.h"
#include "BitmapFreelistManager.h"
-#ifdef HAVE_LIBZBD
-#include "ZonedFreelistManager.h"
-#endif
FreelistManager *FreelistManager::create(
CephContext* cct,
@@ -33,10 +30,5 @@ FreelistManager *FreelistManager::create(
void FreelistManager::setup_merge_operators(KeyValueDB *db,
const std::string& type)
{
-#ifdef HAVE_LIBZBD
- if (type == "zoned")
- ZonedFreelistManager::setup_merge_operator(db, "z");
- else
-#endif
- BitmapFreelistManager::setup_merge_operator(db, "b");
+ BitmapFreelistManager::setup_merge_operator(db, "b");
}
diff --git a/src/test/objectstore/Allocator_test.cc b/src/test/objectstore/Allocator_test.cc
index 0e76c479002..1325e89b0da 100644
--- a/src/test/objectstore/Allocator_test.cc
+++ b/src/test/objectstore/Allocator_test.cc
@@ -26,8 +26,7 @@ public:
void init_alloc(int64_t size, uint64_t min_alloc_size) {
std::cout << "Creating alloc type " << string(GetParam()) << " \n";
alloc.reset(Allocator::create(g_ceph_context, GetParam(), size,
- min_alloc_size,
- 256*1048576, 100*256*1048576ull));
+ min_alloc_size));
}
void init_close() {
diff --git a/src/test/objectstore/allocator_replay_test.cc b/src/test/objectstore/allocator_replay_test.cc
index 7d0d9420f6b..4405c30611e 100644
--- a/src/test/objectstore/allocator_replay_test.cc
+++ b/src/test/objectstore/allocator_replay_test.cc
@@ -391,7 +391,7 @@ int replay_free_dump_and_apply(char* fname,
std::string_view alloc_name) {
alloc.reset(
Allocator::create(
- g_ceph_context, alloc_type, capacity, alloc_unit, 0, 0, alloc_name));
+ g_ceph_context, alloc_type, capacity, alloc_unit, alloc_name));
};
auto add_fn = [&](uint64_t offset,
uint64_t len) {
diff --git a/src/test/objectstore/test_bluefs.cc b/src/test/objectstore/test_bluefs.cc
index 007f47837ce..795b8b054c9 100644
--- a/src/test/objectstore/test_bluefs.cc
+++ b/src/test/objectstore/test_bluefs.cc
@@ -1125,7 +1125,7 @@ TEST(BlueFS, test_shared_alloc) {
uint64_t shared_alloc_unit = 4096;
shared_alloc.set(
Allocator::create(g_ceph_context, g_ceph_context->_conf->bluefs_allocator,
- size, shared_alloc_unit, 0, 0, "test shared allocator"),
+ size, shared_alloc_unit, "test shared allocator"),
shared_alloc_unit);
shared_alloc.a->init_add_free(0, size);
@@ -1196,7 +1196,7 @@ TEST(BlueFS, test_shared_alloc_sparse) {
bluefs_shared_alloc_context_t shared_alloc;
shared_alloc.set(
Allocator::create(g_ceph_context, g_ceph_context->_conf->bluefs_allocator,
- size, main_unit, 0, 0, "test shared allocator"),
+ size, main_unit, "test shared allocator"),
main_unit);
// prepare sparse free space but let's have a continuous chunk at
// the beginning to fit initial log's fnode into superblock,
@@ -1273,7 +1273,7 @@ TEST(BlueFS, test_4k_shared_alloc) {
bluefs_shared_alloc_context_t shared_alloc;
shared_alloc.set(
Allocator::create(g_ceph_context, g_ceph_context->_conf->bluefs_allocator,
- size, main_unit, 0, 0, "test shared allocator"),
+ size, main_unit, "test shared allocator"),
main_unit);
shared_alloc.a->init_add_free(bluefs_alloc_unit, size - bluefs_alloc_unit);
diff --git a/src/vstart.sh b/src/vstart.sh
index a76eadfb54e..d860a6e104e 100755
--- a/src/vstart.sh
+++ b/src/vstart.sh
@@ -172,7 +172,6 @@ rgw_store="rados"
lockdep=${LOCKDEP:-1}
spdk_enabled=0 # disable SPDK by default
pmem_enabled=0
-zoned_enabled=0
io_uring_enabled=0
with_jaeger=0
@@ -842,13 +841,6 @@ EOF
BLUESTORE_OPTS=""
fi
fi
- if [ "$zoned_enabled" -eq 1 ]; then
- BLUESTORE_OPTS+="
- bluestore min alloc size = 65536
- bluestore prefer deferred size = 0
- bluestore prefer deferred size hdd = 0
- bluestore prefer deferred size ssd = 0
- fi
if [ "$io_uring_enabled" -eq 1 ]; then
BLUESTORE_OPTS+="
bdev ioring = true"