From 15c840c1d79357d2b909342979da7e7036b3d94e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Piotr=20Da=C5=82ek?= Date: Fri, 11 Dec 2015 16:42:51 +0100 Subject: [PATCH] rbd: fix build with "--without-rbd" MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit It's not possible to build Ceph configured with "--without-rbd", as tests and FileStore depends on components provided by RBD. This changeset fixes this. Fixes: #14058 Signed-off-by: Piotr Dałek --- src/common/Makefile.am | 3 +-- src/test/Makefile.am | 2 ++ src/test/encoding/types.h | 4 ++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/common/Makefile.am b/src/common/Makefile.am index 4e1ce9bc2ea4..182295f9e6d6 100644 --- a/src/common/Makefile.am +++ b/src/common/Makefile.am @@ -97,12 +97,11 @@ libcommon_internal_la_SOURCES += \ common/aix_errno.cc endif -if WITH_RBD +# used by RBD and FileStore if LINUX libcommon_internal_la_SOURCES += \ common/blkdev.cc endif -endif if ENABLE_XIO libcommon_internal_la_SOURCES += \ diff --git a/src/test/Makefile.am b/src/test/Makefile.am index 3d6353534d14..ab6650400601 100644 --- a/src/test/Makefile.am +++ b/src/test/Makefile.am @@ -433,9 +433,11 @@ bin_DEBUGPROGRAMS += ceph_test_objectcacher_stress ceph_test_cfuse_cache_invalidate_SOURCES = test/test_cfuse_cache_invalidate.cc bin_DEBUGPROGRAMS += ceph_test_cfuse_cache_invalidate +if LINUX ceph_test_get_blkdev_size_SOURCES = test/test_get_blkdev_size.cc ceph_test_get_blkdev_size_LDADD = $(LIBCOMMON) bin_DEBUGPROGRAMS += ceph_test_get_blkdev_size +endif noinst_HEADERS += \ test/bench/backend.h \ diff --git a/src/test/encoding/types.h b/src/test/encoding/types.h index 5e06c2c9e6ca..26e672c73499 100644 --- a/src/test/encoding/types.h +++ b/src/test/encoding/types.h @@ -226,6 +226,7 @@ TYPE(ETableServer) #include "mds/events/EUpdate.h" TYPE(EUpdate) +#ifdef WITH_RBD #include "librbd/JournalTypes.h" TYPE(librbd::journal::EventEntry) #include "librbd/WatchNotifyTypes.h" @@ -235,6 +236,7 @@ TYPE(librbd::watch_notify::ResponseMessage) #include "rbd_replay/ActionTypes.h" TYPE(rbd_replay::action::Dependency) TYPE(rbd_replay::action::ActionEntry); +#endif #ifdef WITH_RADOSGW @@ -331,12 +333,14 @@ TYPE(rgw_obj) #include "rgw/rgw_log.h" TYPE(rgw_log_entry) +#ifdef WITH_RBD #include "cls/rbd/cls_rbd.h" TYPE(cls_rbd_parent) TYPE(cls_rbd_snap) #include "cls/rbd/cls_rbd_types.h" TYPE(cls::rbd::MirrorPeer) +#endif #endif -- 2.47.3