Skip to content

Commit

Permalink
vdo: Remove standalone VDO plugin
Browse files Browse the repository at this point in the history
Standalone VDO is deprecated and no longer supported. LVM plugin
now contain the deduplication and compression support.
  • Loading branch information
vojtechtrefny committed Oct 6, 2020
1 parent 52d3c94 commit e51faac
Show file tree
Hide file tree
Showing 18 changed files with 14 additions and 2,213 deletions.
3 changes: 1 addition & 2 deletions Makefile.am
Expand Up @@ -95,8 +95,7 @@ PLUGINS = btrfs \
nvdimm \
part \
s390 \
swap \
vdo
swap

ALT_PLUGINS = lvm-dbus

Expand Down
8 changes: 1 addition & 7 deletions configure.ac
Expand Up @@ -194,7 +194,6 @@ LIBBLOCKDEV_PLUGIN([KBD], [kbd])
LIBBLOCKDEV_PLUGIN([PART], [part])
LIBBLOCKDEV_PLUGIN([FS], [fs])
LIBBLOCKDEV_PLUGIN([NVDIMM], [nvdimm])
LIBBLOCKDEV_PLUGIN([VDO], [vdo])

AM_CONDITIONAL(WITH_PART_O_WITH_FS, test "x$with_part" != "xno" -o "x$with_fs" != "xno")

Expand Down Expand Up @@ -255,7 +254,7 @@ AS_IF([test "x$with_fs" != "xno" -o "x$with_crypto" != "xno" -o "x$with_swap" !=
[Define as neutral value if libblkid doesn't provide the definition])])]
[])

AS_IF([test "x$with_btrfs" != "xno" -o "x$with_mdraid" != "xno" -o "x$with_kbd" != "xno" -o "x$with_vdo" != "xno" -o "x$with_tools" != "xno"],
AS_IF([test "x$with_btrfs" != "xno" -o "x$with_mdraid" != "xno" -o "x$with_kbd" != "xno" -o "x$with_tools" != "xno"],
[LIBBLOCKDEV_PKG_CHECK_MODULES([BYTESIZE], [bytesize >= 0.1])],
[])

Expand All @@ -267,10 +266,6 @@ AS_IF([test "x$with_nvdimm" != "xno"],
[AC_DEFINE([LIBNDCTL_NEW_MODES])], [])]
[])

AS_IF([test "x$with_vdo" != "xno"],
[LIBBLOCKDEV_PKG_CHECK_MODULES([YAML], [yaml-0.1])]
[])

AC_SUBST([skip_patterns], [$skip_patterns])
AC_SUBST([MAJOR_VER], [\"2\"])

Expand Down Expand Up @@ -335,7 +330,6 @@ echo "
Part plugin: ${with_part}
S390 plugin: ${s390_info}
Swap plugin: ${with_swap}
VDO plugin (deprecated): ${with_vdo}

GObject introspection: ${found_introspection}
Python 2 bindings: ${python2_info}
Expand Down
66 changes: 1 addition & 65 deletions dist/libblockdev.spec.in
Expand Up @@ -15,7 +15,6 @@
%define with_part @WITH_PART@
%define with_fs @WITH_FS@
%define with_nvdimm @WITH_NVDIMM@
%define with_vdo @WITH_VDO@
%define with_gi @WITH_GI@
%define with_escrow @WITH_ESCROW@
%define with_dmraid @WITH_DMRAID@
Expand Down Expand Up @@ -45,14 +44,6 @@
%define lvm_dbus_copts --without-lvm-dbus
%endif

# vdo is not available on non-x86_64 on older RHEL
%if (0%{?rhel} && 0%{?rhel} <= 7)
%ifnarch x86_64
%define with_vdo 0
%define vdo_copts --without-vdo
%endif
%endif

# btrfs is not available on RHEL > 7
%if 0%{?rhel} > 7 || %{with_btrfs} == 0
%define with_btrfs 0
Expand Down Expand Up @@ -111,17 +102,14 @@
%if %{with_nvdimm} != 1
%define nvdimm_copts --without-nvdimm
%endif
%if %{with_vdo} != 1
%define vdo_copts --without-vdo
%endif
%if %{with_tools} != 1
%define tools_copts --without-tools
%endif
%if %{with_gi} != 1
%define gi_copts --disable-introspection
%endif

%define configure_opts %{?python2_copts} %{?python3_copts} %{?bcache_copts} %{?lvm_dbus_copts} %{?btrfs_copts} %{?crypto_copts} %{?dm_copts} %{?loop_copts} %{?lvm_copts} %{?lvm_dbus_copts} %{?mdraid_copts} %{?mpath_copts} %{?swap_copts} %{?kbd_copts} %{?part_copts} %{?fs_copts} %{?nvdimm_copts} %{?vdo_copts} %{?tools_copts} %{?gi_copts}
%define configure_opts %{?python2_copts} %{?python3_copts} %{?bcache_copts} %{?lvm_dbus_copts} %{?btrfs_copts} %{?crypto_copts} %{?dm_copts} %{?loop_copts} %{?lvm_copts} %{?lvm_dbus_copts} %{?mdraid_copts} %{?mpath_copts} %{?swap_copts} %{?kbd_copts} %{?part_copts} %{?fs_copts} %{?nvdimm_copts} %{?tools_copts} %{?gi_copts}

Name: libblockdev
Version: 2.99
Expand Down Expand Up @@ -549,40 +537,6 @@ This package contains header files and pkg-config files needed for development
with the libblockdev-swap plugin/library.
%endif


%if %{with_vdo}
%package vdo
BuildRequires: libbytesize-devel
BuildRequires: libyaml-devel
Summary: The vdo plugin for the libblockdev library
Requires: %{name}-utils%{?_isa} >= 0.11

# weak dependencies doesn't work on older RHEL
%if (0%{?rhel} && 0%{?rhel} <= 7)
Requires: vdo
Requires: kmod-kvdo
%else
# we want to build the plugin everywhere but the dependencies might not be
# available so just use weak dependency
Recommends: vdo
Recommends: kmod-kvdo
%endif

%description vdo
The libblockdev library plugin (and in the same time a standalone library)
providing the functionality related to VDO devices.

%package vdo-devel
Summary: Development files for the libblockdev-vdo plugin/library
Requires: %{name}-vdo%{?_isa} = %{version}-%{release}
Requires: %{name}-utils-devel%{?_isa}
Requires: glib2-devel

%description vdo-devel
This package contains header files and pkg-config files needed for development
with the libblockdev-vdo plugin/library.
%endif

%if %{with_tools}
%package tools
Summary: Various nice tools based on libblockdev
Expand Down Expand Up @@ -670,10 +624,6 @@ Requires: %{name}-part%{?_isa} = %{version}-%{release}
Requires: %{name}-swap%{?_isa} = %{version}-%{release}
%endif

%if %{with_vdo}
Requires: %{name}-vdo%{?_isa} = %{version}-%{release}
%endif

%ifarch s390 s390x
Requires: %{name}-s390%{?_isa} = %{version}-%{release}
%endif
Expand Down Expand Up @@ -746,10 +696,6 @@ find %{buildroot} -type f -name "*.la" | xargs %{__rm}
%ldconfig_scriptlets swap
%endif

%if %{with_vdo}
%ldconfig_scriptlets vdo
%endif

%ifarch s390 s390x
%ldconfig_scriptlets s390
%endif
Expand Down Expand Up @@ -960,16 +906,6 @@ find %{buildroot} -type f -name "*.la" | xargs %{__rm}
%endif


%if %{with_vdo}
%files vdo
%{_libdir}/libbd_vdo.so.*

%files vdo-devel
%{_libdir}/libbd_vdo.so
%dir %{_includedir}/blockdev
%{_includedir}/blockdev/vdo.h
%endif

%if %{with_tools}
%files tools
%{_bindir}/lvm-cache-stats
Expand Down
7 changes: 7 additions & 0 deletions docs/3.0-api-changes.xml
Expand Up @@ -16,4 +16,11 @@
</para>

</simplesect>

<simplesect><title>VDO plugin</title>
<para>
VDO plugin has been removed.
</para>

</simplesect>
</chapter>
1 change: 0 additions & 1 deletion docs/libblockdev-docs.xml.in
Expand Up @@ -42,7 +42,6 @@
<xi:include href="xml/kbd.xml"/>
<xi:include href="xml/s390.xml"/>
<xi:include href="xml/utils.xml"/>
<xi:include href="xml/vdo.xml"/>
</chapter>

<chapter>
Expand Down
39 changes: 0 additions & 39 deletions docs/libblockdev-sections.txt
Expand Up @@ -749,42 +749,3 @@ BDNVDIMMTech
BDNVDIMMTechMode
bd_nvdimm_is_tech_avail
</SECTION>

<SECTION>
<FILE>vdo</FILE>
bd_vdo_check_deps
bd_vdo_init
bd_vdo_close
bd_vdo_error_quark
BDVDOError
BD_VDO_ERROR
BDVDOInfo
BDVDOStats
bd_vdo_get_write_policy_str
bd_vdo_get_write_policy_from_str
bd_vdo_info
bd_vdo_create
bd_vdo_remove
bd_vdo_change_write_policy
bd_vdo_enable_compression
bd_vdo_disable_compression
bd_vdo_enable_deduplication
bd_vdo_disable_deduplication
bd_vdo_activate
bd_vdo_deactivate
bd_vdo_start
bd_vdo_stop
bd_vdo_grow_logical
bd_vdo_grow_physical
bd_vdo_get_stats
bd_vdo_get_stats_full
bd_lvm_get_vdo_write_policy_str
BDVDOTech
BDVDOTechMode
bd_vdo_is_tech_avail
bd_vdo_info_copy
bd_vdo_info_free
bd_vdo_stats_copy
bd_vdo_stats_free
BDVDOWritePolicy
</SECTION>
24 changes: 0 additions & 24 deletions features.rst
Expand Up @@ -303,30 +303,6 @@ NVDIMM
* namespace_reconfigure
* list_namespaces

VDO
---

Standalone VDO plugin is deprecated since 2.24 and will be removed in upcoming 3.0.
Deduplication and compression support is now provided by LVM VDO volumes and pools with
support for these added in 2.23.

:functions:
* info
* create
* remove
* change_write_policy
* enable_compression
* disable_compression
* enable_deduplication
* disable_deduplication
* activate
* deactivate
* start
* stop
* grow_logical
* grow_physical
* get_statistics

utils
------

Expand Down
2 changes: 1 addition & 1 deletion misc/Vagrantfile
Expand Up @@ -38,7 +38,7 @@ Vagrant.configure("2") do |config|
config.vm.provision :shell, inline: <<-SHELL
echo 'alias make="make -j -l4"' >> /home/vagrant/.bashrc
echo 'cd libblockdev' >> /home/vagrant/.bash_history
echo './autogen.sh && ./configure --without-vdo --without-nvdimm' >> /home/vagrant/.bash_history
echo './autogen.sh && ./configure --without-nvdimm' >> /home/vagrant/.bash_history
SHELL

config.vm.define "bd-f30", primary: true, autostart: true do |f30|
Expand Down
1 change: 0 additions & 1 deletion specs.rst
Expand Up @@ -23,7 +23,6 @@ modules as well as udisks2. It supports the following storage technologies:
* multipath
* DASD
* NVDIMM namespaces
* VDO volumes

Of course some additional technologies may be supported in the future.

Expand Down
3 changes: 1 addition & 2 deletions src/lib/Makefile.am
Expand Up @@ -31,8 +31,7 @@ GIHEADERS = ${builddir}/plugin_apis/kbd.h \
${builddir}/plugin_apis/mpath.h \
${builddir}/plugin_apis/part.h \
${builddir}/plugin_apis/fs.h \
${builddir}/plugin_apis/nvdimm.h \
${builddir}/plugin_apis/vdo.h
${builddir}/plugin_apis/nvdimm.h

GIHEADERS += $(wildcard ${srcdir}/../utils/*.[ch])
GIHEADERS += blockdev.c blockdev.h plugins.c plugins.h
Expand Down
13 changes: 2 additions & 11 deletions src/lib/blockdev.c.in
Expand Up @@ -27,8 +27,6 @@
#include "plugin_apis/fs.c"
#include "plugin_apis/nvdimm.h"
#include "plugin_apis/nvdimm.c"
#include "plugin_apis/vdo.h"
#include "plugin_apis/vdo.c"

#if defined(__s390__) || defined(__s390x__)
#include "plugin_apis/s390.h"
Expand Down Expand Up @@ -64,7 +62,7 @@ static gchar * default_plugin_so[BD_PLUGIN_UNDEF] = {
"libbd_dm.so."@MAJOR_VER@, "libbd_mdraid.so."@MAJOR_VER@,
"libbd_kbd.so."@MAJOR_VER@,"libbd_s390.so."@MAJOR_VER@,
"libbd_part.so."@MAJOR_VER@, "libbd_fs.so."@MAJOR_VER@,
"libbd_nvdimm.so."@MAJOR_VER@, "libbd_vdo.so."@MAJOR_VER@
"libbd_nvdimm.so."@MAJOR_VER@
};
static BDPluginStatus plugins[BD_PLUGIN_UNDEF] = {
{{BD_PLUGIN_LVM, NULL}, NULL},
Expand All @@ -80,10 +78,9 @@ static BDPluginStatus plugins[BD_PLUGIN_UNDEF] = {
{{BD_PLUGIN_PART, NULL}, NULL},
{{BD_PLUGIN_FS, NULL}, NULL},
{{BD_PLUGIN_NVDIMM, NULL}, NULL},
{{BD_PLUGIN_VDO, NULL}, NULL},
};
static gchar* plugin_names[BD_PLUGIN_UNDEF] = {
"lvm", "btrfs", "swap", "loop", "crypto", "mpath", "dm", "mdraid", "kbd", "s390", "part", "fs", "nvdimm", "vdo"
"lvm", "btrfs", "swap", "loop", "crypto", "mpath", "dm", "mdraid", "kbd", "s390", "part", "fs", "nvdimm"
};

static void set_plugin_so_name (BDPlugin name, const gchar *so_name) {
Expand Down Expand Up @@ -238,10 +235,6 @@ static void unload_plugins (void) {
if (plugins[BD_PLUGIN_NVDIMM].handle && !unload_nvdimm (plugins[BD_PLUGIN_NVDIMM].handle))
bd_utils_log_format (BD_UTILS_LOG_WARNING, "Failed to close the nvdimm plugin");
plugins[BD_PLUGIN_NVDIMM].handle = NULL;

if (plugins[BD_PLUGIN_VDO].handle && !unload_vdo (plugins[BD_PLUGIN_VDO].handle))
bd_utils_log_format (BD_UTILS_LOG_WARNING, "Failed to close the VDO plugin");
plugins[BD_PLUGIN_VDO].handle = NULL;
}

static void load_plugin_from_sonames (BDPlugin plugin, LoadFunc load_fn, void **handle, GSList *sonames) {
Expand Down Expand Up @@ -282,8 +275,6 @@ static void do_load (GSList **plugins_sonames) {
load_plugin_from_sonames (BD_PLUGIN_FS, load_fs_from_plugin, &(plugins[BD_PLUGIN_FS].handle), plugins_sonames[BD_PLUGIN_FS]);
if (!plugins[BD_PLUGIN_NVDIMM].handle && plugins_sonames[BD_PLUGIN_NVDIMM])
load_plugin_from_sonames (BD_PLUGIN_NVDIMM, load_nvdimm_from_plugin, &(plugins[BD_PLUGIN_NVDIMM].handle), plugins_sonames[BD_PLUGIN_NVDIMM]);
if (!plugins[BD_PLUGIN_VDO].handle && plugins_sonames[BD_PLUGIN_VDO])
load_plugin_from_sonames (BD_PLUGIN_VDO, load_vdo_from_plugin, &(plugins[BD_PLUGIN_VDO].handle), plugins_sonames[BD_PLUGIN_VDO]);
}

static gboolean load_plugins (BDPluginSpec **require_plugins, gboolean reload, guint64 *num_loaded) {
Expand Down

0 comments on commit e51faac

Please sign in to comment.