Skip to content

Commit

Permalink
Merge pull request #537 from tbzatek/wip-vdo
Browse files Browse the repository at this point in the history
vdo: Introduce the VDO plugin
  • Loading branch information
tbzatek committed Aug 13, 2018
2 parents fc3f71e + d2f8fd0 commit 14dc118
Show file tree
Hide file tree
Showing 27 changed files with 2,599 additions and 6 deletions.
39 changes: 38 additions & 1 deletion configure.ac
Expand Up @@ -154,7 +154,7 @@ PKG_CHECK_MODULES(GMODULE, [gmodule-2.0])
AC_SUBST(GMODULE_CFLAGS)
AC_SUBST(GMODULE_LIBS)

PKG_CHECK_MODULES(BLOCKDEV, [blockdev >= 2.18])
PKG_CHECK_MODULES(BLOCKDEV, [blockdev >= 2.19])
AC_SUBST(BLOCKDEV_CFLAGS)
AC_SUBST(BLOCKDEV_LIBS)

Expand Down Expand Up @@ -505,6 +505,36 @@ if test "x$enable_bcache" = "xyes" \
fi
AM_CONDITIONAL(HAVE_BCACHE, [test "x$have_bcache" = "xyes"])

# VDO module
have_vdo=no
AC_ARG_ENABLE(vdo, AS_HELP_STRING([--enable-vdo], [enable VDO support]))
if test "x$enable_vdo" = "xyes" \
-o "x$enable_modules" = "xyes" \
-o "x$enable_available_modules" = "xyes"; then
# libblockdev
SAVE_CFLAGS=$CFLAGS
SAVE_LDFLAGS=$LDFLAGS
CFLAGS="$GLIB_CFLAGS"
LDFLAGS="$GLIB_LIBS"

# libblockdev-vdo
AC_MSG_CHECKING([libblockdev-vdo presence])
AC_TRY_COMPILE([#include <blockdev/vdo.h>], [],
[AC_MSG_RESULT([yes])
have_vdo=yes],
[AC_MSG_RESULT([no])
have_vdo=no])
CFLAGS=$SAVE_CFLAGS
LDFLAGS=$SAVE_LDFLAGS

if test "x$have_vdo" = "xno"; then
if test "x$enable_vdo" = "xyes" -o "x$enable_modules" = "xyes"; then
AC_MSG_ERROR([VDO support requested but header or library not found])
fi
fi
fi
AM_CONDITIONAL(HAVE_VDO, [test "x$have_vdo" = "xyes"])

# libblockdev part
SAVE_CFLAGS=$CFLAGS
SAVE_LDFLAGS=$LDFLAGS
Expand Down Expand Up @@ -673,6 +703,8 @@ modules/lsm/Makefile
modules/lsm/data/Makefile
modules/bcache/Makefile
modules/bcache/data/Makefile
modules/vdo/Makefile
modules/vdo/data/Makefile
doc/Makefile
doc/udisks2-docs.xml.in
doc/udisks2-sections.txt.in
Expand Down Expand Up @@ -711,6 +743,10 @@ doc/udisks2-docs.xml.bcache.dbus
doc/udisks2-docs.xml.bcache.generated
doc/udisks2-sections.txt.bcache.sections
doc/udisks2.types.bcache
doc/udisks2-docs.xml.vdo.dbus
doc/udisks2-docs.xml.vdo.generated
doc/udisks2-sections.txt.vdo.sections
doc/udisks2.types.vdo
po/Makefile.in
])

Expand Down Expand Up @@ -755,4 +791,5 @@ echo "
Zram module: ${have_zram}
LibStorageMgmt module: ${have_lsm}
Bcache module: ${have_bcache}
VDO module: ${have_vdo}
"
24 changes: 24 additions & 0 deletions doc/Makefile.am
Expand Up @@ -133,6 +133,14 @@ else
$(AM_V_at) $(SED) -i "/<\!-- BCACHE_GENERATED_SECTIONS -->/d" $(builddir)/$(UDISKS_SECTIONS)
$(AM_V_at) $(SED) -i "/\# BCACHE_TYPES/d" $(builddir)/$(UDISKS_TYPES)
endif # HAVE_BCACHE
if HAVE_VDO
$(AM_V_at) $(SED) -i -f $(DOC_DIR)/$(DOC_MAIN_SGML_FILE).vdo.sed $(builddir)/$(DOC_MAIN_SGML_FILE)
$(AM_V_at) $(SED) -i -f $(DOC_DIR)/$(UDISKS_SECTIONS).vdo.sed $(builddir)/$(UDISKS_SECTIONS)
$(AM_V_at) $(SED) -i -f $(DOC_DIR)/$(UDISKS_TYPES).vdo.sed $(builddir)/$(UDISKS_TYPES)
else
$(AM_V_at) $(SED) -i "/<\!-- VDO_GENERATED_SECTIONS -->/d" $(builddir)/$(UDISKS_SECTIONS)
$(AM_V_at) $(SED) -i "/\# VDO_TYPES/d" $(builddir)/$(UDISKS_TYPES)
endif # HAVE_VDO

# GTKDOC for LVM2
if HAVE_LVM2
Expand Down Expand Up @@ -188,6 +196,15 @@ AM_CPPFLAGS += -I$(top_srcdir)/modules/bcache
GTKDOC_LIBS += $(top_builddir)/modules/bcache/libudisks2_bcache.la
endif # HAVE_BCACHE

# GTKDOC for VDO
if HAVE_VDO
DOC_SOURCE_DIR += $(top_srcdir)/modules/vdo
HFILE_GLOB += $(top_srcdir)/modules/vdo/*.h
CFILE_GLOB += $(top_srcdir)/modules/vdo/*.c
AM_CPPFLAGS += -I$(top_srcdir)/modules/vdo
GTKDOC_LIBS += $(top_builddir)/modules/vdo/libudisks2_vdo.la
endif # HAVE_VDO

# ------------------------------------------------------------------------------

include $(top_srcdir)/gtk-doc.make
Expand All @@ -210,6 +227,9 @@ EXTRA_DIST += \
$(DOC_MAIN_SGML_FILE).lvm2.dbus.in \
$(DOC_MAIN_SGML_FILE).lvm2.generated.in \
$(DOC_MAIN_SGML_FILE).lvm2.sed \
$(DOC_MAIN_SGML_FILE).vdo.dbus.in \
$(DOC_MAIN_SGML_FILE).vdo.generated.in \
$(DOC_MAIN_SGML_FILE).vdo.sed \
$(DOC_MAIN_SGML_FILE).zram.dbus.in \
$(DOC_MAIN_SGML_FILE).zram.generated.in \
$(DOC_MAIN_SGML_FILE).zram.block_devices.in \
Expand All @@ -226,6 +246,8 @@ EXTRA_DIST += \
$(UDISKS_TYPES).lsm.sed \
$(UDISKS_TYPES).lvm2.in \
$(UDISKS_TYPES).lvm2.sed \
$(UDISKS_TYPES).vdo.in \
$(UDISKS_TYPES).vdo.sed \
$(UDISKS_TYPES).zram.in \
$(UDISKS_TYPES).zram.sed \
$(UDISKS_SECTIONS).in.in \
Expand All @@ -240,6 +262,8 @@ EXTRA_DIST += \
$(UDISKS_SECTIONS).lsm.sed \
$(UDISKS_SECTIONS).lvm2.sections.in \
$(UDISKS_SECTIONS).lvm2.sed \
$(UDISKS_SECTIONS).vdo.sections.in \
$(UDISKS_SECTIONS).vdo.sed \
$(UDISKS_SECTIONS).zram.sections.in \
$(UDISKS_SECTIONS).zram.sed \
$(UDISKS_SECTIONS).lsm.sections.in \
Expand Down
2 changes: 2 additions & 0 deletions doc/udisks2-docs.xml.in.in
Expand Up @@ -381,6 +381,7 @@
<!-- BTRFS_DBUS_INTERFACE -->
<!-- ZRAM_DBUS_INTERFACE -->
<!-- BCACHE_DBUS_INTERFACE -->
<!-- VDO_DBUS_INTERFACE -->
</chapter>
</part>

Expand Down Expand Up @@ -411,6 +412,7 @@
<!-- BTRFS_GENERATED_CODE -->
<!-- ZRAM_GENERATED_CODE -->
<!-- BCACHE_GENERATED_CODE -->
<!-- VDO_GENERATED_CODE -->
</chapter>
</part>

Expand Down
2 changes: 2 additions & 0 deletions doc/udisks2-docs.xml.vdo.dbus.in
@@ -0,0 +1,2 @@
<xi:include href="../modules/vdo/udisks-generated-doc-org.freedesktop.UDisks2.Manager.VDO.xml"/>
<xi:include href="../modules/vdo/udisks-generated-doc-org.freedesktop.UDisks2.Block.VDO.xml"/>
2 changes: 2 additions & 0 deletions doc/udisks2-docs.xml.vdo.generated.in
@@ -0,0 +1,2 @@
<xi:include href="../doc/xml/UDisksManagerVDO.xml"/>
<xi:include href="../doc/xml/UDisksBlockVDO.xml"/>
7 changes: 7 additions & 0 deletions doc/udisks2-docs.xml.vdo.sed
@@ -0,0 +1,7 @@
/<!-- VDO_DBUS_INTERFACE -->/ {
r udisks2-docs.xml.vdo.dbus
d }

/<!-- VDO_GENERATED_CODE -->/ {
r udisks2-docs.xml.vdo.generated
d }
2 changes: 2 additions & 0 deletions doc/udisks2-sections.txt.in.in
Expand Up @@ -1387,6 +1387,8 @@ udisks_loop_skeleton_get_type

<!-- BCACHE_GENERATED_SECTIONS -->

<!-- VDO_GENERATED_SECTIONS -->

<SECTION>
<FILE>udisksfstabmonitor</FILE>
<TITLE>UDisksFstabMonitor</TITLE>
Expand Down
103 changes: 103 additions & 0 deletions doc/udisks2-sections.txt.vdo.sections.in
@@ -0,0 +1,103 @@
<SECTION>
<FILE>UDisksManagerVDO</FILE>
UDisksManagerVDO
UDisksManagerVDOIface
UDisksManagerVDOProxy
UDisksManagerVDOProxyClass
UDisksManagerVDOSkeleton
UDisksManagerVDOSkeletonClass
udisks_manager_vdo_call_create_volume
udisks_manager_vdo_call_create_volume_finish
udisks_manager_vdo_call_create_volume_sync
udisks_manager_vdo_call_activate_volume_by_name
udisks_manager_vdo_call_activate_volume_by_name_finish
udisks_manager_vdo_call_activate_volume_by_name_sync
udisks_manager_vdo_call_start_volume_by_name
udisks_manager_vdo_call_start_volume_by_name_finish
udisks_manager_vdo_call_start_volume_by_name_sync
udisks_manager_vdo_complete_create_volume
udisks_manager_vdo_complete_activate_volume_by_name
udisks_manager_vdo_complete_start_volume_by_name
udisks_manager_vdo_interface_info
udisks_manager_vdo_override_properties
udisks_manager_vdo_proxy_new
udisks_manager_vdo_proxy_new_finish
udisks_manager_vdo_proxy_new_sync
udisks_manager_vdo_proxy_new_for_bus
udisks_manager_vdo_proxy_new_for_bus_finish
udisks_manager_vdo_proxy_new_for_bus_sync
udisks_manager_vdo_skeleton_new
</SECTION>

<SECTION>
<FILE>UDisksBlockVDO</FILE>
UDisksBlockVDO
UDisksBlockVDOIface
UDisksBlockVDOProxy
UDisksBlockVDOProxyClass
UDisksBlockVDOSkeleton
UDisksBlockVDOSkeletonClass
udisks_block_vdo_call_deactivate
udisks_block_vdo_call_deactivate_finish
udisks_block_vdo_call_deactivate_sync
udisks_block_vdo_call_enable_compression
udisks_block_vdo_call_enable_compression_finish
udisks_block_vdo_call_enable_compression_sync
udisks_block_vdo_call_enable_deduplication
udisks_block_vdo_call_enable_deduplication_finish
udisks_block_vdo_call_enable_deduplication_sync
udisks_block_vdo_call_change_write_policy
udisks_block_vdo_call_change_write_policy_finish
udisks_block_vdo_call_change_write_policy_sync
udisks_block_vdo_call_remove
udisks_block_vdo_call_remove_finish
udisks_block_vdo_call_remove_sync
udisks_block_vdo_call_stop
udisks_block_vdo_call_stop_finish
udisks_block_vdo_call_stop_sync
udisks_block_vdo_call_grow_logical
udisks_block_vdo_call_grow_logical_finish
udisks_block_vdo_call_grow_logical_sync
udisks_block_vdo_call_grow_physical
udisks_block_vdo_call_grow_physical_finish
udisks_block_vdo_call_grow_physical_sync
udisks_block_vdo_call_get_statistics
udisks_block_vdo_call_get_statistics_finish
udisks_block_vdo_call_get_statistics_sync
udisks_block_vdo_complete_deactivate
udisks_block_vdo_complete_enable_compression
udisks_block_vdo_complete_enable_deduplication
udisks_block_vdo_complete_change_write_policy
udisks_block_vdo_complete_remove
udisks_block_vdo_complete_stop
udisks_block_vdo_complete_grow_logical
udisks_block_vdo_complete_grow_physical
udisks_block_vdo_complete_get_statistics
udisks_block_vdo_get_name
udisks_block_vdo_dup_name
udisks_block_vdo_set_name
udisks_block_vdo_get_active
udisks_block_vdo_set_active
udisks_block_vdo_get_compression
udisks_block_vdo_set_compression
udisks_block_vdo_get_deduplication
udisks_block_vdo_set_deduplication
udisks_block_vdo_get_logical_size
udisks_block_vdo_set_logical_size
udisks_block_vdo_get_physical_size
udisks_block_vdo_set_physical_size
udisks_block_vdo_get_index_memory
udisks_block_vdo_set_index_memory
udisks_block_vdo_get_write_policy
udisks_block_vdo_dup_write_policy
udisks_block_vdo_set_write_policy
udisks_block_vdo_interface_info
udisks_block_vdo_override_properties
udisks_block_vdo_proxy_new
udisks_block_vdo_proxy_new_finish
udisks_block_vdo_proxy_new_sync
udisks_block_vdo_proxy_new_for_bus
udisks_block_vdo_proxy_new_for_bus_finish
udisks_block_vdo_proxy_new_for_bus_sync
udisks_block_vdo_skeleton_new
</SECTION>
3 changes: 3 additions & 0 deletions doc/udisks2-sections.txt.vdo.sed
@@ -0,0 +1,3 @@
/<!-- VDO_GENERATED_SECTIONS -->/ {
r udisks2-sections.txt.vdo.sections
d }
2 changes: 2 additions & 0 deletions doc/udisks2.types.in.in
Expand Up @@ -77,3 +77,5 @@ udisks_object_manager_client_get_type
# ZRAM_TYPES

# BCACHE_TYPES

# VDO_TYPES
6 changes: 6 additions & 0 deletions doc/udisks2.types.vdo.in
@@ -0,0 +1,6 @@
udisks_manager_vdo_get_type
udisks_manager_vdo_proxy_get_type
udisks_manager_vdo_skeleton_get_type
udisks_block_vdo_get_type
udisks_block_vdo_proxy_get_type
udisks_block_vdo_skeleton_get_type
3 changes: 3 additions & 0 deletions doc/udisks2.types.vdo.sed
@@ -0,0 +1,3 @@
/\# VDO_TYPES/ {
r udisks2.types.vdo
d }
4 changes: 4 additions & 0 deletions modules/Makefile.am
Expand Up @@ -26,4 +26,8 @@ if HAVE_BCACHE
SUBDIRS += bcache
endif # HAVE_BCACHE

if HAVE_VDO
SUBDIRS += vdo
endif # HAVE_VDO

NULL =

0 comments on commit 14dc118

Please sign in to comment.