Skip to content

Commit

Permalink
Merge pull request ceph#55054 from pereman2/zns-remove
Browse files Browse the repository at this point in the history
os/bluestore: remove zoned namespace support
It has never been finished and now its in the way of future improvements.
  • Loading branch information
aclamk authored Feb 6, 2024
2 parents ac9e76f + 03e11ac commit b5bae62
Show file tree
Hide file tree
Showing 32 changed files with 83 additions and 2,409 deletions.
7 changes: 0 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down
7 changes: 0 additions & 7 deletions ceph.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -301,9 +300,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
Expand Down Expand Up @@ -1422,9 +1418,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
Expand Down
23 changes: 1 addition & 22 deletions install-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -229,19 +224,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 {
Expand Down Expand Up @@ -431,7 +413,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
Expand Down Expand Up @@ -460,12 +441,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
Expand Down Expand Up @@ -559,7 +538,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
Expand Down
18 changes: 0 additions & 18 deletions src/blk/BlockDevice.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand All @@ -142,11 +133,6 @@ BlockDevice::device_type_from_name(const std::string& blk_dev_name)
if (blk_dev_name == "pmem") {
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;
}
Expand All @@ -168,10 +154,6 @@ BlockDevice* BlockDevice::create_with_type(block_device_t device_type,
#if defined(HAVE_BLUESTORE_PMEM)
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");
Expand Down
3 changes: 0 additions & 3 deletions src/blk/BlockDevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,6 @@ class BlockDevice {
unknown,
#if defined(HAVE_LIBAIO) || defined(HAVE_POSIXAIO)
aio,
#if defined(HAVE_LIBZBD)
hm_smr,
#endif
#endif
#if defined(HAVE_SPDK)
spdk,
Expand Down
9 changes: 0 additions & 9 deletions src/blk/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 "./")
Expand All @@ -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)
Expand Down
131 changes: 0 additions & 131 deletions src/blk/zoned/HMSMRDevice.cc

This file was deleted.

52 changes: 0 additions & 52 deletions src/blk/zoned/HMSMRDevice.h

This file was deleted.

2 changes: 0 additions & 2 deletions src/common/options/global.yaml.in
Original file line number Diff line number Diff line change
Expand Up @@ -4919,7 +4919,6 @@ options:
- stupid
- avl
- hybrid
- zoned
with_legacy: true
- name: bluestore_freelist_blocks_per_key
type: size
Expand Down Expand Up @@ -6348,7 +6347,6 @@ options:
- aio
- spdk
- pmem
- hm_smr
- name: bluestore_cleaner_sleep_interval
type: float
level: advanced
Expand Down
Loading

0 comments on commit b5bae62

Please sign in to comment.