summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--admin/doc-requirements.txt2
-rw-r--r--configure.ac4
-rw-r--r--doc/dev/corpus.rst72
-rw-r--r--doc/dev/osd_internals/erasure_coding/pgbackend.rst13
-rw-r--r--doc/dev/osd_internals/snaps.rst11
-rw-r--r--doc/dev/release-process.rst60
-rw-r--r--doc/dev/repo-lab-access.rst30
-rw-r--r--doc/dev/versions.rst5
-rw-r--r--doc/man/8/ceph-conf.rst1
-rw-r--r--doc/man/8/ceph-osd.rst3
-rw-r--r--doc/man/8/ceph-post-file.rst4
-rw-r--r--doc/man/8/ceph.rst1
-rw-r--r--doc/man/8/crushtool.rst1
-rw-r--r--doc/man/8/mkcephfs.rst123
-rw-r--r--doc/man/8/monmaptool.rst1
-rw-r--r--doc/man/8/osdmaptool.rst1
-rw-r--r--doc/rados/man/index.rst6
-rw-r--r--doc/rados/operations/add-or-rm-mons.rst2
-rw-r--r--doc/release-notes.rst22
-rw-r--r--m4/ax_check_compile_flag.m472
-rw-r--r--src/Makefile-env.am172
-rw-r--r--src/Makefile.am2411
-rw-r--r--src/arch/Makefile.am11
-rw-r--r--src/auth/AuthMethodList.h3
-rw-r--r--src/auth/Makefile.am46
-rw-r--r--src/client/Makefile.am35
-rw-r--r--src/client/ioctl.h3
-rw-r--r--src/cls/Makefile.am118
-rw-r--r--src/cls/rbd/cls_rbd.cc4
-rw-r--r--src/cls/rgw/cls_rgw.cc6
-rw-r--r--src/common/Formatter.cc3
-rw-r--r--src/common/Formatter.h3
-rw-r--r--src/common/Makefile.am195
-rw-r--r--src/common/OutputDataSocket.cc3
-rw-r--r--src/common/addr_parsing.c (renamed from src/include/addr_parsing.c)0
-rw-r--r--src/common/admin_socket.cc3
-rw-r--r--src/common/admin_socket_client.cc3
-rw-r--r--src/common/blkdev.cc4
-rw-r--r--src/common/ceph_frag.cc (renamed from src/include/ceph_frag.cc)2
-rw-r--r--src/common/ceph_fs.cc (renamed from src/include/ceph_fs.cc)2
-rw-r--r--src/common/ceph_hash.cc (renamed from src/include/ceph_hash.cc)2
-rw-r--r--src/common/ceph_strings.cc (renamed from src/include/ceph_strings.cc)2
-rw-r--r--src/common/crc32c_intel_baseline.c3
-rw-r--r--src/common/crc32c_intel_baseline.h2
-rw-r--r--src/common/crc32c_intel_fast.c3
-rw-r--r--src/common/hobject.cc (renamed from src/os/hobject.cc)0
-rw-r--r--src/common/hobject.h (renamed from src/os/hobject.h)0
-rw-r--r--src/common/perf_counters.cc3
-rw-r--r--src/crush/Makefile.am30
-rw-r--r--src/crush/crush.h3
-rw-r--r--src/crush/hash.c3
-rw-r--r--src/global/Makefile.am14
-rw-r--r--src/include/Makefile.am80
-rw-r--r--src/include/buffer.h4
-rw-r--r--src/include/crc32c.h3
-rw-r--r--src/include/encoding.h4
-rw-r--r--src/include/int_types.h75
-rw-r--r--src/include/inttypes.h28
-rw-r--r--src/include/linux_fiemap.h4
-rw-r--r--src/include/rados/librados.h3
-rw-r--r--src/include/types.h3
-rw-r--r--src/init-radosgw2
-rw-r--r--src/init-radosgw.sysv2
-rw-r--r--src/json_spirit/Makefile.am18
-rw-r--r--src/key_value_store/Makefile.am10
-rw-r--r--src/librados/Makefile.am20
-rw-r--r--src/librbd/AioRequest.h4
-rw-r--r--src/librbd/ImageCtx.h2
-rw-r--r--src/librbd/Makefile.am24
-rw-r--r--src/librbd/SnapInfo.h2
-rw-r--r--src/librbd/WatchCtx.h2
-rw-r--r--src/librbd/internal.cc3
-rw-r--r--src/librbd/internal.h2
-rw-r--r--src/librbd/librbd.cc2
-rw-r--r--src/log/Makefile.am11
-rw-r--r--src/mds/CInode.cc3
-rw-r--r--src/mds/Makefile.am92
-rw-r--r--src/mds/locks.c4
-rw-r--r--src/mds/mdstypes.h3
-rw-r--r--src/messages/Makefile.am113
-rw-r--r--src/mon/Makefile.am45
-rw-r--r--src/msg/Makefile.am20
-rw-r--r--src/os/BtrfsFileStoreBackend.cc5
-rw-r--r--src/os/DBObjectMap.cc6
-rw-r--r--src/os/FDCache.h2
-rw-r--r--src/os/FileStore.cc6
-rw-r--r--src/os/GenericFileStoreBackend.cc5
-rw-r--r--src/os/Makefile.am49
-rw-r--r--src/os/WBThrottle.h2
-rw-r--r--src/os/ZFSFileStoreBackend.cc5
-rw-r--r--src/os/chain_xattr.cc7
-rw-r--r--src/osd/ErasureCodeInterface.h210
-rw-r--r--src/osd/ErasureCodePlugin.cc134
-rw-r--r--src/osd/ErasureCodePlugin.h69
-rw-r--r--src/osd/Makefile.am38
-rw-r--r--src/osd/OSD.h2
-rw-r--r--src/osd/PG.cc126
-rw-r--r--src/osd/PG.h4
-rw-r--r--src/osd/ReplicatedPG.cc17
-rw-r--r--src/osd/SnapMapper.h2
-rw-r--r--src/osd/osd_types.h2
-rw-r--r--src/osdc/Makefile.am17
-rw-r--r--src/perfglue/Makefile.am23
-rw-r--r--src/rbd.cc2
-rw-r--r--src/rbd_fuse/rbd-fuse.c3
-rw-r--r--src/rgw/Makefile.am155
-rw-r--r--src/rgw/rgw_op.cc1
-rw-r--r--src/rgw/rgw_op.h1
-rw-r--r--src/test/Makefile.am838
-rw-r--r--src/test/barclass.cc (renamed from src/barclass.cc)0
-rw-r--r--src/test/buildtest_skeleton.cc (renamed from src/test/test_libcommon_build.cc)0
-rw-r--r--src/test/encoding/types.h2
-rw-r--r--src/test/fooclass.cc (renamed from src/fooclass.cc)0
-rw-r--r--src/test/libcephfs/caps.cc2
-rw-r--r--src/test/librbd/test_librbd.cc2
-rw-r--r--src/test/osd/ErasureCodeExample.h115
-rw-r--r--src/test/osd/ErasureCodePluginExample.cc34
-rw-r--r--src/test/osd/RadosModel.h3
-rw-r--r--src/test/osd/TestErasureCodeExample.cc146
-rw-r--r--src/test/osd/TestErasureCodePluginExample.cc51
-rw-r--r--src/test/perf_counters.cc8
-rw-r--r--src/test/streamtest.cc (renamed from src/streamtest.cc)0
-rw-r--r--src/test/test_trans.cc (renamed from src/test_trans.cc)0
-rw-r--r--src/test/testclass.cc (renamed from src/testclass.cc)0
-rw-r--r--src/test/testcrypto.cc (renamed from src/testcrypto.cc)0
-rw-r--r--src/test/testkeys.cc (renamed from src/testkeys.cc)0
-rw-r--r--src/test/testmsgr.cc (renamed from src/testmsgr.cc)0
-rw-r--r--src/tools/Makefile.am87
-rw-r--r--src/tools/ceph-filestore-dump.cc2
-rw-r--r--src/tools/ceph_authtool.cc (renamed from src/ceph_authtool.cc)0
-rw-r--r--src/tools/ceph_conf.cc (renamed from src/ceph_conf.cc)0
-rw-r--r--src/tools/crushtool.cc (renamed from src/crushtool.cc)0
-rw-r--r--src/tools/dupstore.cc (renamed from src/dupstore.cc)0
-rw-r--r--src/tools/mon_store_converter.cc (renamed from src/mon_store_converter.cc)0
-rw-r--r--src/tools/monmaptool.cc (renamed from src/monmaptool.cc)0
-rw-r--r--src/tools/osdmaptool.cc (renamed from src/osdmaptool.cc)0
-rw-r--r--src/tools/psim.cc (renamed from src/psim.cc)0
-rw-r--r--src/tools/rados/rados.cc (renamed from src/rados.cc)2
-rw-r--r--src/tools/rados/rados_export.cc (renamed from src/rados_export.cc)2
-rw-r--r--src/tools/rados/rados_import.cc (renamed from src/rados_import.cc)2
-rw-r--r--src/tools/rados/rados_sync.cc (renamed from src/rados_sync.cc)2
-rw-r--r--src/tools/rados/rados_sync.h (renamed from src/rados_sync.h)0
-rw-r--r--src/tools/radosacl.cc (renamed from src/radosacl.cc)0
-rw-r--r--src/tools/scratchtool.c (renamed from src/scratchtool.c)0
-rw-r--r--src/tools/scratchtoolpp.cc (renamed from src/scratchtoolpp.cc)0
145 files changed, 3666 insertions, 2639 deletions
diff --git a/admin/doc-requirements.txt b/admin/doc-requirements.txt
index b088df083db..ce4654c6600 100644
--- a/admin/doc-requirements.txt
+++ b/admin/doc-requirements.txt
@@ -1,3 +1,3 @@
-Sphinx >=1.1.2
+Sphinx == 1.1.3
-e git+https://github.com/ceph/sphinx-ditaa.git#egg=sphinx-ditaa
-e git+https://github.com/ceph/asphyxiate.git#egg=asphyxiate
diff --git a/configure.ac b/configure.ac
index d042d3d2821..d2bf5959881 100644
--- a/configure.ac
+++ b/configure.ac
@@ -109,6 +109,10 @@ AC_CHECK_CC_FLAG([-Wignored-qualifiers], [WARN_IGNORED_QUALIFIERS])
# Checks for architecture stuff
AM_CONDITIONAL([ENABLE_FPU_NEON], [case $target_cpu in arm*) true;; *) false;; esac])
+# Check for compiler VTA support
+AX_CHECK_COMPILE_FLAG([-fvar-tracking-assignments], [HAS_VTA_SUPPORT=1], [HAS_VTA_SUPPORT=0])
+AM_CONDITIONAL(COMPILER_HAS_VTA, [test "$HAS_VTA_SUPPORT" = 1])
+
# Checks for libraries.
ACX_PTHREAD
AC_CHECK_LIB([uuid], [uuid_parse], [true], AC_MSG_FAILURE([libuuid not found]))
diff --git a/doc/dev/corpus.rst b/doc/dev/corpus.rst
index 92f480a01a3..64f71c12fdf 100644
--- a/doc/dev/corpus.rst
+++ b/doc/dev/corpus.rst
@@ -22,71 +22,71 @@ We can generate an object corpus for a particular version of ceph like so.
#. Checkout a clean repo (best not to do this where you normally work)::
- git clone ceph.git
- cd ceph
- git submodule update --init
+ git clone ceph.git
+ cd ceph
+ git submodule update --init
#. Build with flag to dump objects to /tmp/foo::
- rm -rf /tmp/foo ; mkdir /tmp/foo
- ./do_autogen.sh -e /tmp/foo
- make
+ rm -rf /tmp/foo ; mkdir /tmp/foo
+ ./do_autogen.sh -e /tmp/foo
+ make
#. Start via vstart::
- cd src
- MON=3 OSD=3 MDS=3 RGW=1 ./vstart.sh -n -x
+ cd src
+ MON=3 OSD=3 MDS=3 RGW=1 ./vstart.sh -n -x
#. Use a much functionality of the cluster as you can, to exercise as many object encoder methods as possible::
- ./rados -p rbd bench 10 write -b 123
- ./ceph osd out 0
- ./init-ceph stop osd.1
- for f in ../qa/workunits/cls/*.sh ; do PATH=".:$PATH" $f ; done
- ../qa/workunits/rados/test.sh
- ./ceph_test_librbd
- ./ceph_test_libcephfs
- ./init-ceph restart mds.a
+ ./rados -p rbd bench 10 write -b 123
+ ./ceph osd out 0
+ ./init-ceph stop osd.1
+ for f in ../qa/workunits/cls/*.sh ; do PATH=".:$PATH" $f ; done
+ ../qa/workunits/rados/test.sh
+ ./ceph_test_librbd
+ ./ceph_test_libcephfs
+ ./init-ceph restart mds.a
Do some more stuff with rgw if you know how.
#. Stop::
- ./stop.sh
+ ./stop.sh
#. Import the corpus (this will take a few minutes)::
- test/encoding/import.sh /tmp/foo `./ceph-dencoder version` ../ceph-object-corpus/archive
- test/encoding/import-generated.sh ../ceph-object-corpus/archive
+ test/encoding/import.sh /tmp/foo `./ceph-dencoder version` ../ceph-object-corpus/archive
+ test/encoding/import-generated.sh ../ceph-object-corpus/archive
#. Prune it! There will be a bazillion copies of various objects, and we only want a representative sample.::
- pushd ../ceph-object-corpus
- bin/prune-archive.sh
- popd
+ pushd ../ceph-object-corpus
+ bin/prune-archive.sh
+ popd
#. Verify the tests pass::
- make check-local
+ make check-local
#. Commit it to the corpus repo and push::
- pushd ../ceph-object-corpus
- git checkout -b wip-new
- git add archive/`../src/ceph-dencoder version`
- git commit -m `../src/ceph-dencoder version`
- git remote add cc ceph.com:/git/ceph-object-corpus.git
- git push cc wip-new
- popd
+ pushd ../ceph-object-corpus
+ git checkout -b wip-new
+ git add archive/`../src/ceph-dencoder version`
+ git commit -m `../src/ceph-dencoder version`
+ git remote add cc ceph.com:/git/ceph-object-corpus.git
+ git push cc wip-new
+ popd
#. Go test it out::
- cd my/regular/tree
- cd ceph-object-corpus
- git fetch origin
- git checkout wip-new
- cd ../src
- make check-local
+ cd my/regular/tree
+ cd ceph-object-corpus
+ git fetch origin
+ git checkout wip-new
+ cd ../src
+ make check-local
#. If everything looks good, update the submodule master branch, and commit the submodule in ceph.git.
diff --git a/doc/dev/osd_internals/erasure_coding/pgbackend.rst b/doc/dev/osd_internals/erasure_coding/pgbackend.rst
index 7b3b6f53326..c16354f5116 100644
--- a/doc/dev/osd_internals/erasure_coding/pgbackend.rst
+++ b/doc/dev/osd_internals/erasure_coding/pgbackend.rst
@@ -257,10 +257,10 @@ Core changes:
- Ensure that crush behaves as above for INDEP.
-`Recovery <http://tracker.ceph.com/issues/5857>`_
+Recovery
--------
-The logic for recovering an object depends on the backend. With
+See `Issue #5857`_. The logic for recovering an object depends on the backend. With
the current replicated strategy, we first pull the object replica
to the primary and then concurrently push it out to the replicas.
With the erasure coded strategy, we probably want to read the
@@ -274,6 +274,7 @@ PGBackend impementation will have to be able to direct the search
for pg replicas with unrecoverable object chunks and to be able
to determine whether a particular object is recoverable.
+
Core changes:
- s/unfound/unrecoverable
@@ -284,10 +285,10 @@ PGBackend interfaces:
- recoverable()
- recover_object()
-`Backfill <http://tracker.ceph.com/issues/5856>`_
+Backfill
--------
-For the most part, backfill itself should behave similarly between
+See `Issue #5856`_. For the most part, backfill itself should behave similarly between
replicated and erasure coded pools with a few exceptions:
1. We probably want to be able to backfill multiple osds concurrently
@@ -314,3 +315,7 @@ PGBackend interfaces:
- choose_backfill(): allows the implementation to determine which osds
should be backfilled in a particular interval.
+
+
+.. _Issue #5857: http://tracker.ceph.com/issues/5857
+.. _Issue #5856: http://tracker.ceph.com/issues/5856 \ No newline at end of file
diff --git a/doc/dev/osd_internals/snaps.rst b/doc/dev/osd_internals/snaps.rst
index a1e9020ba02..63b1bc0503c 100644
--- a/doc/dev/osd_internals/snaps.rst
+++ b/doc/dev/osd_internals/snaps.rst
@@ -70,18 +70,19 @@ See ReplicatedPG::SnapTrimmer, SnapMapper
This trimming is performed asynchronously by the snap_trim_wq while the
pg is clean and not scrubbing.
- 1. The next snap in PG::snaptrimq is selected for trimming
- 2. We determine the next object for trimming out of PG::snap_mapper.
+ #. The next snap in PG::snaptrimq is selected for trimming
+ #. We determine the next object for trimming out of PG::snap_mapper.
For each object, we create a log entry and repop updating the
object info and the snap set (including adjusting the overlaps).
- 3. We also locally update our *SnapMapper* instance with the object's
+ #. We also locally update our *SnapMapper* instance with the object's
new snaps.
- 4. The log entry containing the modification of the object also
+ #. The log entry containing the modification of the object also
contains the new set of snaps, which the replica uses to update
its own *SnapMapper* instance.
- 6. The primary shares the info with the replica, which persists
+ #. The primary shares the info with the replica, which persists
the new set of purged_snaps along with the rest of the info.
+
Recovery
--------
Because the trim operations are implemented using repops and log entries,
diff --git a/doc/dev/release-process.rst b/doc/dev/release-process.rst
index 656d5ca76c5..b48934831bb 100644
--- a/doc/dev/release-process.rst
+++ b/doc/dev/release-process.rst
@@ -26,7 +26,7 @@ Prior to building, it's necessary to update the pbuilder seed tarballs::
The release key should be present::
pub 4096R/17ED316D 2012-05-20
- uid Ceph Release Key <sage@newdream.net>
+ uid Ceph Release Key <sage@newdream.net>
3. Set up build area
@@ -48,24 +48,25 @@ Checkout the submodules::
4. Update Build version numbers
================================
-Substitute the ceph release number where indicated below by the string 0.xx::
+Substitute the ceph release number where indicated below by the string ``0.xx``.
Edit configure.ac and update the version number. Example diff::
- -AC_INIT([ceph], [0.54], [ceph-devel@vger.kernel.org])
- +AC_INIT([ceph], [0.55], [ceph-devel@vger.kernel.org])
+ -AC_INIT([ceph], [0.54], [ceph-devel@vger.kernel.org])
+ +AC_INIT([ceph], [0.55], [ceph-devel@vger.kernel.org])
Update the version number in the debian change log::
- DEBEMAIL user@host dch -v 0.xx-1
+ DEBEMAIL user@host dch -v 0.xx-1
Commit the changes::
- git commit -a
+ git commit -a
Tag the release::
- ../ceph-build/tag-release v0.xx
+ ../ceph-build/tag-release v0.xx
+
5. Create Makefiles
===================
@@ -74,7 +75,7 @@ The actual configure options used to build packages are in the
``ceph.spec.in`` and ``debian/rules`` files. At this point we just
need to create a Makefile.::
- ./do_autogen.sh
+ ./do_autogen.sh
6. Run the release scripts
@@ -84,7 +85,8 @@ This creates tarballs and copies them, with other needed files to
the build hosts listed in deb_hosts and rpm_hosts, runs a local build
script, then rsyncs the results back tot the specified release directory.::
- ../ceph-build/do_release.sh /tmp/release
+ ../ceph-build/do_release.sh /tmp/release
+
7. Create RPM Repo
==================
@@ -92,35 +94,38 @@ script, then rsyncs the results back tot the specified release directory.::
Copy the rpms to the destination repo, creates the yum repository
rpm and indexes.::
- ../ceph-build/push_to_rpm_repo.sh /tmp/release /tmp/rpm-repo 0.xx
+ ../ceph-build/push_to_rpm_repo.sh /tmp/release /tmp/rpm-repo 0.xx
+
8. Create debian repo
=====================
The key-id used below is the id of the ceph release key from step 2::
- mkdir /tmp/debian-repo
- ../ceph-build/gen_reprepro_conf.sh /tmp/debian-repo key-id
- ../ceph-build/push_to_deb_repo.sh /tmp/release /tmp/debian-repo 0.xx main
+ mkdir /tmp/debian-repo
+ ../ceph-build/gen_reprepro_conf.sh /tmp/debian-repo key-id
+ ../ceph-build/push_to_deb_repo.sh /tmp/release /tmp/debian-repo 0.xx main
+
9. Push repos to ceph.org
==========================
For a development release::
- rcp ceph-0.xx.tar.bz2 ceph-0.xx.tar.gz \
- ceph_site@ceph.com:ceph.com/downloads/.
- rsync -av /tmp/rpm-repo/0.xx/ ceph_site@ceph.com:ceph.com/rpm-testing
- rsync -av /tmp/debian-repo/ ceph_site@ceph.com:ceph.com/debian-testing
+ rcp ceph-0.xx.tar.bz2 ceph-0.xx.tar.gz \
+ ceph_site@ceph.com:ceph.com/downloads/.
+ rsync -av /tmp/rpm-repo/0.xx/ ceph_site@ceph.com:ceph.com/rpm-testing
+ rsync -av /tmp/debian-repo/ ceph_site@ceph.com:ceph.com/debian-testing
For a stable release, replace {CODENAME} with the release codename (e.g., ``argonaut`` or ``bobtail``)::
- rcp ceph-0.xx.tar.bz2 \
- ceph_site@ceph.com:ceph.com/downloads/ceph-0.xx{CODENAME}.tar.bz2
- rcp ceph-0.xx.tar.gz \
- ceph_site@ceph.com:ceph.com/downloads/ceph-0.xx{CODENAME}.tar.gz
- rsync -av /tmp/rpm-repo/0.xx/ ceph_site@ceph.com:ceph.com/rpm-{CODENAME}
- rsync -auv /tmp/debian-repo/ ceph_site@ceph.com:ceph.com/debian-{CODENAME}
+ rcp ceph-0.xx.tar.bz2 \
+ ceph_site@ceph.com:ceph.com/downloads/ceph-0.xx{CODENAME}.tar.bz2
+ rcp ceph-0.xx.tar.gz \
+ ceph_site@ceph.com:ceph.com/downloads/ceph-0.xx{CODENAME}.tar.gz
+ rsync -av /tmp/rpm-repo/0.xx/ ceph_site@ceph.com:ceph.com/rpm-{CODENAME}
+ rsync -auv /tmp/debian-repo/ ceph_site@ceph.com:ceph.com/debian-{CODENAME}
+
10. Update Git
==============
@@ -148,15 +153,16 @@ Similarly, for a development release, for both ``teuthology.git`` and ``ceph-qa-
Stable release
--------------
-For ``ceph.git``:
+For ``ceph.git``::
+
+ git push origin stable
- git push origin stable
Point release
-------------
-Just push the new tag:
+Just push the new tag::
- git push origin v0.xx
+ git push origin v0.xx
diff --git a/doc/dev/repo-lab-access.rst b/doc/dev/repo-lab-access.rst
index 706f02e395c..2d1b328325a 100644
--- a/doc/dev/repo-lab-access.rst
+++ b/doc/dev/repo-lab-access.rst
@@ -4,11 +4,11 @@ Notes on Ceph repositories and test lab
Special branches
----------------
-* ``master'': current tip (integration branch)
-* ``next'': pending release (feature frozen, bugfixes only)
-* ``last'': last/previous release
-* ``dumpling'', ``cuttlefish'', ``bobtail'', ``argonaut'', etc.: stable release branches
-* ``dumpling-next'': backports for stable release, pending testing
+* ``master``: current tip (integration branch)
+* ``next``: pending release (feature frozen, bugfixes only)
+* ``last``: last/previous release
+* ``dumpling``, ``cuttlefish``, ``bobtail``, ``argonaut``, etc.: stable release branches
+* ``dumpling-next``: backports for stable release, pending testing
Rules
-----
@@ -18,7 +18,7 @@ The source repos are all on github.
* Any branch pushed to ceph.git will kick off builds that will either
run unit tests or generate packages for gitbuilder.ceph.com. Try
not to generate unnecessary load. For private, unreviewed work,
- only push to branches named ``wip-*''. This avoids colliding with
+ only push to branches named ``wip-*``. This avoids colliding with
any special branches.
* Nothing should every reach a special branch unless it has been
@@ -34,7 +34,7 @@ The source repos are all on github.
Reviewed-by: directly to the commit so that it is also visible when
the patch is cherry-picked for backports.
-* All backports should use ``git cherry-pick -x'' to capture which
+* All backports should use ``git cherry-pick -x`` to capture which
commit they are cherry-picking from.
@@ -63,21 +63,21 @@ Locking machines
* All tests pull their builds from gitbuilder.ceph.com.
* Anybody can lock machines with ``teuthology-lock --lock-many NUM
- --machine-type TYPE''.
+ --machine-type TYPE``.
-* Machines are locked as ``whoami''@``hostname -s''. --owner to
+* Machines are locked as ``whoami''@``hostname -s``. --owner to
choose otherwise.
-* Automated tests current run on the ``plana''; please avoid locking
+* Automated tests current run on the ``plana``; please avoid locking
these for personal use.
-* To unlock, please use ``teuthology-nuke -t list.yaml -r -u'', which
+* To unlock, please use ``teuthology-nuke -t list.yaml -r -u``, which
will reboot and clean up any leftover test state before unlocking
- (or fail to unlock). It looks for a ``targets::'' section in the
+ (or fail to unlock). It looks for a ``targets::`` section in the
yaml, so the regular job yaml will work. You can get a list of all
- locked machines with ``teuthology-lock --list-targets''.
+ locked machines with ``teuthology-lock --list-targets``.
-* ``teuthology-lock -a --brief'' or ``teuthology-lock --summary'' to
+* ``teuthology-lock -a --brief`` or ``teuthology-lock --summary`` to
see what is locked and by whom.
* Be conscientious about scheduling entire qa runs. Coordinate
@@ -85,4 +85,4 @@ Locking machines
ceph-qa-suite.git and teuthology.git.
* Results for scheduled runs appear in /a/$jobname on the teuthology
- machine. ``ls -alt | head'' to find them.
+ machine. ``ls -alt | head`` to find them.
diff --git a/doc/dev/versions.rst b/doc/dev/versions.rst
index f7da768f119..bf5ee252cd5 100644
--- a/doc/dev/versions.rst
+++ b/doc/dev/versions.rst
@@ -1,6 +1,7 @@
-==============
+==================
Public OSD Version
-==============
+==================
+
We maintain two versions on disk: an eversion_t pg_log.head and a
version_t info.user_version. Each object is tagged with both the pg
version and user_version it was last modified with. The PG version is
diff --git a/doc/man/8/ceph-conf.rst b/doc/man/8/ceph-conf.rst
index 7b4f83a9282..48d63d8fb07 100644
--- a/doc/man/8/ceph-conf.rst
+++ b/doc/man/8/ceph-conf.rst
@@ -84,4 +84,3 @@ See also
========
:doc:`ceph <ceph>`\(8),
-:doc:`mkcephfs <mkcephfs>`\(8)
diff --git a/doc/man/8/ceph-osd.rst b/doc/man/8/ceph-osd.rst
index 451ca6d956b..9a08bef7e04 100644
--- a/doc/man/8/ceph-osd.rst
+++ b/doc/man/8/ceph-osd.rst
@@ -46,8 +46,7 @@ Options
.. option:: --mkfs
- Create an empty object repository. Normally invoked by
- :doc:`mkcephfs <mkcephfs>`\(8). This also initializes the journal
+ Create an empty object repository. This also initializes the journal
(if one is defined).
.. option:: --mkkey
diff --git a/doc/man/8/ceph-post-file.rst b/doc/man/8/ceph-post-file.rst
index 5625843eaa6..f16fbd8a63c 100644
--- a/doc/man/8/ceph-post-file.rst
+++ b/doc/man/8/ceph-post-file.rst
@@ -1,6 +1,6 @@
-========================================
+==================================================
ceph-post-file -- post files for ceph developers
-========================================
+==================================================
.. program:: ceph-post-file
diff --git a/doc/man/8/ceph.rst b/doc/man/8/ceph.rst
index 634c82c433e..661d93ad5b7 100644
--- a/doc/man/8/ceph.rst
+++ b/doc/man/8/ceph.rst
@@ -95,4 +95,3 @@ See also
========
:doc:`ceph <ceph>`\(8),
-:doc:`mkcephfs <mkcephfs>`\(8)
diff --git a/doc/man/8/crushtool.rst b/doc/man/8/crushtool.rst
index 187352a5c04..5a3fc09adc0 100644
--- a/doc/man/8/crushtool.rst
+++ b/doc/man/8/crushtool.rst
@@ -114,4 +114,3 @@ See also
:doc:`ceph <ceph>`\(8),
:doc:`osdmaptool <osdmaptool>`\(8),
-:doc:`mkcephfs <mkcephfs>`\(8)
diff --git a/doc/man/8/mkcephfs.rst b/doc/man/8/mkcephfs.rst
deleted file mode 100644
index 054a8deae1d..00000000000
--- a/doc/man/8/mkcephfs.rst
+++ /dev/null
@@ -1,123 +0,0 @@
-=======================================
- mkcephfs -- create a ceph file system
-=======================================
-
-.. program:: mkcephfs
-
-Synopsis
-========
-
-| **mkcephfs** -c *ceph.conf* [ --mkfs ] [ -a, --all-hosts [ -k
- */path/to/admin.keyring* ] ]
-
-
-Description
-===========
-
-**mkcephfs** is used to create an empty Ceph file system, possibly
-spanning multiple hosts. The ceph.conf file describes the composition
-of the entire Ceph cluster, including which hosts are participating,
-which daemons run where, and which paths are used to store file system
-data or metadata.
-
-The mkcephfs tool can be used in two ways. If -a is used, it will use
-ssh and scp to connect to remote hosts on your behalf and do the setup
-of the entire cluster. This is the easiest solution, but can also be
-inconvenient (if you don't have ssh to connect without prompting for
-passwords) or slow (if you have a large cluster).
-
-Alternatively, you can run each setup phase manually. First, you need
-to prepare a monmap that will be shared by each node::
-
- # prepare
- master# mkdir /tmp/foo
- master# mkcephfs -c /etc/ceph/ceph.conf \
- --prepare-monmap -d /tmp/foo
-
-Share the ``/tmp/foo`` directory with other nodes in whatever way is
-convenient for you. On each OSD and MDS node::
-
- osdnode# mkcephfs --init-local-daemons osd -d /tmp/foo
- mdsnode# mkcephfs --init-local-daemons mds -d /tmp/foo
-
-Collect the contents of the /tmp/foo directories back onto a single
-node, and then::
-
- master# mkcephfs --prepare-mon -d /tmp/foo
-
-Finally, distribute ``/tmp/foo`` to all monitor nodes and, on each of
-those nodes::
-
- monnode# mkcephfs --init-local-daemons mon -d /tmp/foo
-
-
-Options
-=======
-
-.. option:: -a, --allhosts
-
- Performs the necessary initialization steps on all hosts in the
- cluster, executing commands via SSH.
-
-.. option:: -c ceph.conf, --conf=ceph.conf
-
- Use the given conf file instead of the default ``/etc/ceph/ceph.conf``.
-
-.. option:: -k /path/to/keyring
-
- When ``-a`` is used, we can specify a location to copy the
- client.admin keyring, which is used to administer the cluster. The
- default is ``/etc/ceph/keyring`` (or whatever is specified in the
- config file).
-
-.. option:: --mkfs
-
- Create and mount the file systems specified in the ceph.conf for
- OSD data storage using mkfs.$type. The ``devs`` option in ceph.conf
- must specify the device(s) and the ``osd mkfs type`` option must
- specify the file system type (normally one of btrfs, xfs, or ext4).
-
-.. option:: --no-copy-conf
-
- By default, mkcephfs with -a will copy the new configuration to
- /etc/ceph/ceph.conf on each node in the cluster. This option
- disables that behavior.
-
-Subcommands
-===========
-
-The sub-commands performed during cluster setup can be run individually with
-
-.. option:: --prepare-monmap -d dir -c ceph.conf
-
- Create an initial monmap with a random fsid/uuid and store it and
- the ceph.conf in dir.
-
-.. option:: --init-local-daemons type -d dir
-
- Initialize any daemons of type type on the local host using the
- monmap in dir. For types osd and mds, the resulting authentication
- keys will be placed in dir. For type mon, the initial data files
- generated by --prepare-mon (below) are expected in dir.
-
-.. option:: --prepare-mon -d dir
-
- Prepare the initial monitor data based on the monmap, OSD, and MDS
- authentication keys collected in dir, and put the result in dir.
-
-
-Availability
-============
-
-**mkcephfs** is part of the Ceph distributed file system. Please refer
-to the Ceph documentation at http://ceph.com/docs for more
-information.
-
-
-See also
-========
-
-:doc:`ceph <ceph>`\(8),
-:doc:`monmaptool <monmaptool>`\(8),
-:doc:`osdmaptool <osdmaptool>`\(8),
-:doc:`crushtool <crushtool>`\(8)
diff --git a/doc/man/8/monmaptool.rst b/doc/man/8/monmaptool.rst
index 8415ba4136a..42af2faea8b 100644
--- a/doc/man/8/monmaptool.rst
+++ b/doc/man/8/monmaptool.rst
@@ -103,4 +103,3 @@ See also
:doc:`ceph <ceph>`\(8),
:doc:`crushtool <crushtool>`\(8),
-:doc:`mkcephfs <mkcephfs>`\(8)
diff --git a/doc/man/8/osdmaptool.rst b/doc/man/8/osdmaptool.rst
index 27ffb6eba72..c815e485685 100644
--- a/doc/man/8/osdmaptool.rst
+++ b/doc/man/8/osdmaptool.rst
@@ -73,4 +73,3 @@ See also
:doc:`ceph <ceph>`\(8),
:doc:`crushtool <crushtool>`\(8),
-:doc:`mkcephfs <mkcephfs>`\(8)
diff --git a/doc/rados/man/index.rst b/doc/rados/man/index.rst
index d7bbe9d3acb..e4f0f23bfa2 100644
--- a/doc/rados/man/index.rst
+++ b/doc/rados/man/index.rst
@@ -21,3 +21,9 @@
../../man/8/monmaptool.rst
../../man/8/osdmaptool.rst
../../man/8/rados.rst
+
+
+.. toctree::
+ :hidden:
+
+ ../../man/8/ceph-post-file.rst \ No newline at end of file
diff --git a/doc/rados/operations/add-or-rm-mons.rst b/doc/rados/operations/add-or-rm-mons.rst
index 0a15781c6ea..17ae9d86b85 100644
--- a/doc/rados/operations/add-or-rm-mons.rst
+++ b/doc/rados/operations/add-or-rm-mons.rst
@@ -164,7 +164,7 @@ a cluster that has placement groups that are persistently not ``active + clean``
ceph mon dump
ssh {mon-host}
-#. Stop the ``ceph-mon'' daemon and extract a copy of the monap file. ::
+#. Stop the ``ceph-mon`` daemon and extract a copy of the monap file. ::
service ceph stop mon || stop ceph-mon-all
ceph-mon -i {mon-id} --extract-monmap {map-path}
diff --git a/doc/release-notes.rst b/doc/release-notes.rst
index 3efa7fd3c61..7fa36dead96 100644
--- a/doc/release-notes.rst
+++ b/doc/release-notes.rst
@@ -3,10 +3,10 @@
===============
v0.68
-----
+-----
Upgrading
-~~~~
+~~~~~~~~~
* 'ceph osd crush set <id> <weight> <loc..>' no longer adds the osd to the
specified location, as that's a job for 'ceph osd crush add'. It will
@@ -37,7 +37,7 @@ Upgrading
Notable Changes
-~~~~
+~~~~~~~~~~~~~~~
* ceph-fuse: fix problem with readahead vs truncate race (Yan, Zheng)
* ceph-post-file: new command to easily share logs or other files with ceph devs
@@ -232,11 +232,11 @@ In addition to the above notes about upgrading from v0.66:
* The 'ceph osd tell ...' and 'ceph mon tell ...' commands are no
longer supported. Any callers should use::
- ceph tell osd.<id or *> ...
- ceph tell mon.<id or name or *> ...
+ ceph tell osd.<id or *> ...
+ ceph tell mon.<id or name or *> ...
The 'ceph mds tell ...' command is still there, but will soon also
- transition to 'ceph tell mds.<id or name or *> ...'
+ transition to 'ceph tell mds.<id or name or \*> ...'
* The 'ceph osd crush add ...' command used to take one of two forms::
@@ -261,7 +261,7 @@ In addition to the above notes about upgrading from v0.66:
renamed to 'mon osd min down {reporters|reports}', and the
documentation has been updated to reflect that these options apply
to the monitors (who process failure reports) and not OSDs. If you
- have adjusted these settings, please update your ``ceph.conf''
+ have adjusted these settings, please update your ``ceph.conf``
accordingly.
@@ -465,11 +465,11 @@ Upgrading
* The 'ceph osd tell ...' and 'ceph mon tell ...' commands are no
longer supported. Any callers should use::
- ceph tell osd.<id or *> ...
- ceph tell mon.<id or name or *> ...
+ ceph tell osd.<id or *> ...
+ ceph tell mon.<id or name or *> ...
The 'ceph mds tell ...' command is still there, but will soon also
- transition to 'ceph tell mds.<id or name or *> ...'
+ transition to 'ceph tell mds.<id or name or \*> ...'
* The 'ceph osd crush add ...' command used to take one of two forms::
@@ -563,7 +563,7 @@ Upgrading
renamed to 'mon osd min down {reporters|reports}', and the
documentation has been updated to reflect that these options apply
to the monitors (who process failure reports) and not OSDs. If you
- have adjusted these settings, please update your ``ceph.conf''
+ have adjusted these settings, please update your ``ceph.conf``
accordingly.
Notable Changes
diff --git a/m4/ax_check_compile_flag.m4 b/m4/ax_check_compile_flag.m4
new file mode 100644
index 00000000000..c3a8d695a1b
--- /dev/null
+++ b/m4/ax_check_compile_flag.m4
@@ -0,0 +1,72 @@
+# ===========================================================================
+# http://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+# AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS])
+#
+# DESCRIPTION
+#
+# Check whether the given FLAG works with the current language's compiler
+# or gives an error. (Warnings, however, are ignored)
+#
+# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
+# success/failure.
+#
+# If EXTRA-FLAGS is defined, it is added to the current language's default
+# flags (e.g. CFLAGS) when the check is done. The check is thus made with
+# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to
+# force the compiler to issue an error when a bad flag is given.
+#
+# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this
+# macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG.
+#
+# LICENSE
+#
+# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
+# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
+#
+# This program is free software: you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation, either version 3 of the License, or (at your
+# option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+# Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+# As a special exception, the respective Autoconf Macro's copyright owner
+# gives unlimited permission to copy, distribute and modify the configure
+# scripts that are the output of Autoconf when processing the Macro. You
+# need not follow the terms of the GNU General Public License when using
+# or distributing such scripts, even though portions of the text of the
+# Macro appear in them. The GNU General Public License (GPL) does govern
+# all other use of the material that constitutes the Autoconf Macro.
+#
+# This special exception to the GPL applies to versions of the Autoconf
+# Macro released by the Autoconf Archive. When you make and distribute a
+# modified version of the Autoconf Macro, you may extend this special
+# exception to the GPL to apply to your modified version as well.
+
+#serial 2
+
+AC_DEFUN([AX_CHECK_COMPILE_FLAG],
+[AC_PREREQ(2.59)dnl for _AC_LANG_PREFIX
+AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl
+AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [
+ ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS
+ _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
+ [AS_VAR_SET(CACHEVAR,[yes])],
+ [AS_VAR_SET(CACHEVAR,[no])])
+ _AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags])
+AS_IF([test x"AS_VAR_GET(CACHEVAR)" = xyes],
+ [m4_default([$2], :)],
+ [m4_default([$3], :)])
+AS_VAR_POPDEF([CACHEVAR])dnl
+])dnl AX_CHECK_COMPILE_FLAGS
diff --git a/src/Makefile-env.am b/src/Makefile-env.am
new file mode 100644
index 00000000000..cc9ffc62f12
--- /dev/null
+++ b/src/Makefile-env.am
@@ -0,0 +1,172 @@
+AUTOMAKE_OPTIONS = gnu subdir-objects
+
+SUBDIRS =
+DIST_SUBDIRS =
+BUILT_SOURCES =
+EXTRA_DIST =
+CLEANFILES =
+
+noinst_HEADERS =
+bin_PROGRAMS =
+bin_SCRIPTS =
+sbin_PROGRAMS =
+sbin_SCRIPTS =
+dist_bin_SCRIPTS =
+lib_LTLIBRARIES =
+noinst_LTLIBRARIES =
+noinst_LIBRARIES =
+radoslib_LTLIBRARIES =
+
+# like bin_PROGRAMS, but these targets are only built for debug builds
+bin_DEBUGPROGRAMS =
+
+# like sbin_SCRIPTS but can be used to install to e.g. /usr/sbin
+ceph_sbindir = $(exec_prefix)$(sbindir)
+
+# C/C++ tests to build will be appended to this
+check_PROGRAMS =
+
+# when doing a debug build, make sure to make the targets
+if WITH_DEBUG
+bin_PROGRAMS += $(bin_DEBUGPROGRAMS)
+endif
+
+
+##################################
+## automake environment
+
+AM_COMMON_FLAGS = \
+ -D__CEPH__ \
+ -D_FILE_OFFSET_BITS=64 \
+ -D_REENTRANT \
+ -D_THREAD_SAFE \
+ -D__STDC_FORMAT_MACROS \
+ -D_GNU_SOURCE \
+ -rdynamic \
+ -Wall \
+ ${WARN_TYPE_LIMITS} \
+ ${WARN_IGNORED_QUALIFIERS} \
+ -Winit-self \
+ -Wpointer-arith \
+ -Werror=format-security \
+ -fno-strict-aliasing \
+ -fsigned-char
+
+AM_CFLAGS = $(AM_COMMON_FLAGS)
+AM_CPPFLAGS = \
+ $(AM_COMMON_FLAGS) \
+ -DCEPH_LIBDIR=\"${libdir}\"
+AM_CXXFLAGS = \
+ @AM_CXXFLAGS@ \
+ $(AM_COMMON_FLAGS) \
+ -DCEPH_LIBDIR=\"${libdir}\" \
+ -Wnon-virtual-dtor \
+ -Wno-invalid-offsetof \
+ -Wstrict-null-sentinel
+
+# note: this is position dependant, it affects the -l options that
+# come after it on the command line. when you use ${AM_LDFLAGS} in
+# later rules, take care where you place it. for more information, see
+# http://blog.flameeyes.eu/2008/11/19/relationship-between-as-needed-and-no-undefined-part-1-what-do-they-do
+# http://blog.flameeyes.eu/2008/11/20/misguided-link-and-as-needed
+# http://www.gentoo.org/proj/en/qa/asneeded.xml
+# http://gcc.gnu.org/ml/gcc-help/2010-12/msg00338.html
+# http://sigquit.wordpress.com/2011/02/16/why-asneeded-doesnt-work-as-expected-for-your-libraries-on-your-autotools-project/
+AM_LDFLAGS = -Wl,--as-needed
+
+if USE_BOOST_SPIRIT_OLD_HDR
+AM_CXXFLAGS += -DUSE_BOOST_SPIRIT_OLD_HDR
+endif
+
+if WITH_LIBATOMIC
+AM_LDFLAGS += -latomic_ops
+endif
+
+if ENABLE_COVERAGE
+AM_CFLAGS += -fprofile-arcs -ftest-coverage
+AM_CXXFLAGS += -fprofile-arcs -ftest-coverage -O0
+endif
+
+CCAS = ${srcdir}/yasm-wrapper
+AM_CCASFLAGS = -f elf64
+
+
+#####################
+## library definitions and dependencies
+
+EXTRALIBS = -luuid -lm -lkeyutils
+if FREEBSD
+EXTRALIBS += -lexecinfo
+endif # FREEBSD
+
+if LINUX
+EXTRALIBS += -lrt
+endif # LINUX
+
+if WITH_PROFILER
+EXTRALIBS += -lprofiler
+endif # PROFILER
+
+LIBGLOBAL = libglobal.la
+LIBCOMMON = libcommon.la
+LIBARCH = libarch.la
+LIBPERFGLUE = libperfglue.la
+LIBAUTH = libauth.la
+LIBMSG = libmsg.la
+LIBCRUSH = libcrush.la
+LIBJSON_SPIRIT = libjson_spirit.la
+LIBLOG = liblog.la
+LIBOS = libos.la
+LIBOSD = libosd.la
+LIBOSDC = libosdc.la
+LIBMON = libmon.la
+LIBMDS = libmds.la
+LIBCLIENT = libclient.la
+LIBCLIENT_FUSE = libclient_fuse.la
+LIBRADOS = librados.la
+LIBRGW = librgw.la
+LIBRBD = librbd.la
+LIBCEPHFS = libcephfs.la
+
+if WITH_LIBAIO
+LIBOS += -laio
+endif # WITH_LIBAIO
+
+if WITH_LIBZFS
+LIBOS += libos_zfs.a -lzfs
+endif # WITH_LIBZFS
+
+if WITH_TCMALLOC
+LIBPERFGLUE += -ltcmalloc
+endif # WITH_TCMALLOC
+
+if ENABLE_COVERAGE
+EXTRALIBS += -lgcov
+endif # ENABLE_COVERAGE
+
+# Libosd always needs osdc and os
+LIBOSD += $(LIBOSDC) $(LIBOS)
+
+# These have references to syms like ceph_using_tcmalloc(), glue libperfglue to them
+LIBMON += $(LIBPERFGLUE)
+LIBOSD += $(LIBPERFGLUE)
+LIBMDS += $(LIBPERFGLUE)
+
+# Always use system leveldb
+LIBOS += -lleveldb -lsnappy
+
+# Use this for binaries requiring libglobal
+CEPH_GLOBAL = $(LIBGLOBAL) $(PTHREAD_LIBS) -lm $(CRYPTO_LIBS) $(EXTRALIBS)
+
+# This is set by [lib]/Makefile.am and used for build tests
+LIBCOMMON_DEPS =
+LIBRADOS_DEPS =
+LIBRGW_DEPS =
+
+# This is used by the dencoder test
+DENCODER_SOURCES =
+DENCODER_DEPS =
+
+
+radoslibdir = $(libdir)/rados-classes
+
diff --git a/src/Makefile.am b/src/Makefile.am
index d93e63c4c4e..3520ca8d8f9 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,1296 +1,137 @@
-AUTOMAKE_OPTIONS = gnu
-SUBDIRS = ocf java
-DIST_SUBDIRS = gtest ocf libs3 java
-
-EXTRA_DIST = \
- libs3/COPYING \
- libs3/ChangeLog \
- libs3/GNUmakefile \
- libs3/GNUmakefile.mingw \
- libs3/GNUmakefile.osx \
- libs3/INSTALL \
- libs3/LICENSE \
- libs3/README \
- libs3/TODO \
- libs3/archlinux \
- libs3/debian \
- libs3/doxyfile \
- libs3/inc \
- libs3/libs3.spec \
- libs3/mswin \
- libs3/src \
- libs3/test \
- unittest_bufferlist.sh \
- yasm-wrapper
-
-CLEANFILES =
-bin_PROGRAMS =
-# like bin_PROGRAMS, but these targets are only built for debug builds
-bin_DEBUGPROGRAMS =
-sbin_PROGRAMS =
-# like sbin_SCRIPTS but can be used to install to e.g. /usr/sbin
-ceph_sbindir = $(exec_prefix)$(sbindir)
-ceph_sbin_SCRIPTS = \
- ceph-disk \
- ceph-disk-prepare \
- ceph-disk-activate \
- ceph-disk-udev \
- ceph-create-keys
-
-sbin_SCRIPTS = \
- mount.fuse.ceph
-
-bin_SCRIPTS = ceph ceph-run ceph-rest-api ceph-clsinfo ceph-debugpack ceph-rbdnamer ceph-post-file
-dist_bin_SCRIPTS =
-# C/C++ tests to build will be appended to this
-check_PROGRAMS =
-# tests to actually run on "make check"; if you need extra, non-test,
-# executables built, you need to replace this with manual assignments
-# target by target
-TESTS = $(check_PROGRAMS) unittest_bufferlist.sh
-
-check-local:
- $(srcdir)/test/encoding/check-generated.sh
- $(srcdir)/test/encoding/readable.sh ../ceph-object-corpus
-
-EXTRALIBS = -luuid
-if FREEBSD
-EXTRALIBS += -lexecinfo
-endif
-if LINUX
-EXTRALIBS += -lrt
-endif
-if WITH_PROFILER
-EXTRALIBS += -lprofiler
-endif
-
-LIBGLOBAL_LDA = libglobal.la $(PTHREAD_LIBS) -lm $(CRYPTO_LIBS) $(EXTRALIBS)
-
-LIBOS_LDA = libos.a
-
-if WITH_LIBAIO
-LIBOS_LDA += -laio
-endif
-
-if WITH_LIBZFS
-LIBOS_LDA += libos_zfs.a -lzfs
-endif
-
-# use system leveldb
-LIBOS_LDA += -lleveldb -lsnappy
-
-# monitor
-ceph_mon_SOURCES = ceph_mon.cc common/TextTable.cc
-ceph_mon_LDFLAGS = $(AM_LDFLAGS)
-ceph_mon_LDADD = libmon.a $(LIBOS_LDA) $(LIBGLOBAL_LDA)
-ceph_mon_CXXFLAGS = ${CRYPTO_CXXFLAGS} ${AM_CXXFLAGS}
+include Makefile-env.am
+
+SUBDIRS += ocf java
+DIST_SUBDIRS += gtest ocf libs3 java
+
+
+# subdirs
+
+include arch/Makefile.am
+include auth/Makefile.am
+include crush/Makefile.am
+include mon/Makefile.am
+include mds/Makefile.am
+include os/Makefile.am
+include osd/Makefile.am
+include osdc/Makefile.am
+include client/Makefile.am
+include global/Makefile.am
+include json_spirit/Makefile.am
+include log/Makefile.am
+include perfglue/Makefile.am
+include common/Makefile.am
+include msg/Makefile.am
+include messages/Makefile.am
+include include/Makefile.am
+include librados/Makefile.am
+include librbd/Makefile.am
+include rgw/Makefile.am
+include cls/Makefile.am
+include key_value_store/Makefile.am
+include test/Makefile.am
+include tools/Makefile.am
+
+
+# core daemons
+
+ceph_mon_SOURCES = ceph_mon.cc
+ceph_mon_LDADD = $(LIBMON) $(LIBOS) $(CEPH_GLOBAL)
bin_PROGRAMS += ceph-mon
-ceph_mon_store_converter_SOURCES = mon_store_converter.cc \
- mon/MonitorStore.cc
-ceph_mon_store_converter_LDFLAGS = ${AM_LDFLAGS}
-ceph_mon_store_converter_LDADD = $(LIBOS_LDA) $(LIBGLOBAL_LDA)
-ceph_mon_store_converter_CXXFLAGS = ${AM_CXXFLAGS}
-bin_PROGRAMS += ceph_mon_store_converter
-
-
-# osd
ceph_osd_SOURCES = ceph_osd.cc
-ceph_osd_LDADD = libosd.a libosdc.la $(LIBOS_LDA) $(LIBGLOBAL_LDA)
-ceph_osd_CXXFLAGS = ${AM_CXXFLAGS}
-bin_PROGRAMS += ceph-osd
-
+ceph_osd_LDADD = $(LIBOSD) $(CEPH_GLOBAL)
if LINUX
ceph_osd_LDADD += -ldl
-endif
+endif # LINUX
+bin_PROGRAMS += ceph-osd
-# mds
ceph_mds_SOURCES = ceph_mds.cc
-ceph_mds_LDADD = libmds.a libosdc.la $(LIBGLOBAL_LDA)
+ceph_mds_LDADD = $(LIBMDS) $(LIBOSDC) $(CEPH_GLOBAL)
bin_PROGRAMS += ceph-mds
-ceph_mds_CXXFLAGS = ${AM_CXXFLAGS}
+
# admin tools
-ceph_conf_SOURCES = ceph_conf.cc
-ceph_conf_LDADD = $(LIBGLOBAL_LDA)
-ceph_conf_CXXFLAGS = ${AM_CXXFLAGS}
-ceph_authtool_SOURCES = ceph_authtool.cc
-ceph_authtool_LDADD = $(LIBGLOBAL_LDA)
-ceph_filestore_dump_SOURCES = tools/ceph-filestore-dump.cc
-ceph_filestore_dump_SOURCES += perfglue/disabled_heap_profiler.cc
-ceph_filestore_dump_LDADD = libosd.a libosdc.la $(LIBOS_LDA) $(LIBGLOBAL_LDA) -lboost_program_options
-if LINUX
-ceph_filestore_dump_LDADD += -ldl
-endif
-bin_PROGRAMS += ceph-conf ceph-authtool ceph_filestore_dump
-
-ceph_osdomap_tool_SOURCES = tools/ceph-osdomap-tool.cc \
- os/LevelDBStore.cc
-ceph_osdomap_tool_LDFLAGS = ${AM_LDFLAGS}
-ceph_osdomap_tool_LDADD = $(LIBOS_LDA) $(LIBGLOBAL_LDA) -lboost_program_options
-ceph_osdomap_tool_CXXFLAGS = ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS}
-bin_DEBUGPROGRAMS += ceph-osdomap-tool
-
-ceph_monstore_tool_SOURCES = tools/ceph-monstore-tool.cc \
- os/LevelDBStore.cc
-ceph_monstore_tool_LDFLAGS = ${AM_LDFLAGS}
-ceph_monstore_tool_LDADD = $(LIBOS_LDA) $(LIBGLOBAL_LDA) -lboost_program_options
-ceph_monstore_tool_CXXFLAGS = ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS}
-bin_DEBUGPROGRAMS += ceph-monstore-tool
-
-monmaptool_SOURCES = monmaptool.cc
-monmaptool_LDADD = $(LIBGLOBAL_LDA)
-crushtool_SOURCES = crushtool.cc
-crushtool_LDADD = $(LIBGLOBAL_LDA)
-osdmaptool_SOURCES = osdmaptool.cc
-osdmaptool_LDADD = $(LIBGLOBAL_LDA)
-bin_PROGRAMS += monmaptool crushtool osdmaptool
-
-rgw_dencoder_src = rgw/rgw_dencoder.cc \
- rgw/rgw_acl.cc \
- rgw/rgw_common.cc \
- rgw/rgw_env.cc \
- rgw/rgw_json_enc.cc
-
-ceph_dencoder_SOURCES = test/encoding/ceph_dencoder.cc ${rgw_dencoder_src} perfglue/disabled_heap_profiler.cc
-ceph_dencoder_CXXFLAGS = ${AM_CXXFLAGS}
-ceph_dencoder_LDADD = $(LIBGLOBAL_LDA) libcls_lock_client.a \
- libcls_rgw_client.a \
- libcls_replica_log_client.a \
- libcls_refcount_client.a \
- libosd.a libmds.a libosdc.la $(LIBOS_LDA) libmon.a
-bin_PROGRAMS += ceph-dencoder
-
-mount_ceph_SOURCES = mount/mount.ceph.c common/armor.c common/safe_io.c common/secret.c include/addr_parsing.c
-mount_ceph_LDADD = -lkeyutils
+
+# user tools
+
+mount_ceph_SOURCES = mount/mount.ceph.c
+mount_ceph_LDADD = $(LIBCOMMON)
if LINUX
sbin_PROGRAMS += mount.ceph
-endif
+endif # LINUX
+sbin_SCRIPTS += mount.fuse.ceph
-# user tools
cephfs_SOURCES = cephfs.cc
-cephfs_LDADD = libcommon.la
+cephfs_LDADD = $(LIBCOMMON)
bin_PROGRAMS += cephfs
librados_config_SOURCES = librados-config.cc
-librados_config_LDADD = librados.la $(LIBGLOBAL_LDA)
+librados_config_LDADD = $(LIBRADOS) $(CEPH_GLOBAL)
bin_PROGRAMS += librados-config
-# synthetic client
-ceph_syn_SOURCES = ceph_syn.cc client/SyntheticClient.cc
-ceph_syn_LDADD = libclient.la $(LIBGLOBAL_LDA)
+ceph_syn_SOURCES = ceph_syn.cc
+ceph_syn_SOURCES += client/SyntheticClient.cc # uses g_conf.. needs cleanup
+ceph_syn_LDADD = $(LIBCLIENT) $(CEPH_GLOBAL)
bin_PROGRAMS += ceph-syn
-base: ceph-mon ceph-osd ceph-mds \
- cephfs \
- ceph-syn \
- rados radosgw librados-config \
- ceph-conf monmaptool osdmaptool crushtool ceph-authtool \
- init-ceph mkcephfs mon_store_converter ceph-post-file
+rbd_SOURCES = rbd.cc
+rbd_LDADD = $(LIBRBD) $(LIBRADOS) $(CEPH_GLOBAL)
+if LINUX
+bin_PROGRAMS += rbd
+endif #LINUX
+
+
+# Fuse targets
-# fuse targets?
if WITH_FUSE
-ceph_fuse_SOURCES = ceph_fuse.cc client/fuse_ll.cc
-ceph_fuse_LDADD = -lfuse libclient.la $(LIBGLOBAL_LDA)
-ceph_fuse_CXXFLAGS = ${AM_CXXFLAGS}
+ceph_fuse_SOURCES = ceph_fuse.cc
+ceph_fuse_LDADD = $(LIBCLIENT_FUSE) $(CEPH_GLOBAL)
bin_PROGRAMS += ceph-fuse
rbd_fuse_SOURCES = rbd_fuse/rbd-fuse.c
-rbd_fuse_LDADD = -lfuse librados.la librbd.la $(LIBGLOBAL_LDA)
-rbd_fuse_CXXFLAGS = ${AM_CXXFLAGS}
+rbd_fuse_LDADD = -lfuse $(LIBRBD) $(LIBRADOS) $(CEPH_GLOBAL)
bin_PROGRAMS += rbd-fuse
+endif # WITH_FUSE
-endif
-# tcmalloc?
-if WITH_TCMALLOC
-tcmalloc_safety_flags = -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free
-ceph_osd_LDADD += -ltcmalloc
-ceph_osd_CXXFLAGS += ${tcmalloc_safety_flags}
-ceph_osd_SOURCES += perfglue/heap_profiler.cc
-ceph_mds_LDADD += -ltcmalloc
-ceph_mds_CXXFLAGS += ${tcmalloc_safety_flags}
-ceph_mds_SOURCES += perfglue/heap_profiler.cc
-ceph_mon_LDADD += -ltcmalloc
-ceph_mon_CXXFLAGS += ${tcmalloc_safety_flags}
-ceph_mon_SOURCES += perfglue/heap_profiler.cc
-if WITH_FUSE
-ceph_fuse_LDADD += -ltcmalloc
-ceph_fuse_CXXFLAGS += ${tcmalloc_safety_flags}
-endif #WITH_FUSE
-else
-ceph_osd_SOURCES += perfglue/disabled_heap_profiler.cc
-ceph_mds_SOURCES += perfglue/disabled_heap_profiler.cc
-ceph_mon_SOURCES += perfglue/disabled_heap_profiler.cc
-endif # WITH_TCMALLOC
-
-# debug targets
-ceph_psim_SOURCES = psim.cc
-ceph_psim_LDADD = $(LIBGLOBAL_LDA)
-bin_DEBUGPROGRAMS += ceph_psim
-
-ceph_test_mutate_SOURCES = test/test_mutate.cc
-ceph_test_mutate_LDADD = librados.la $(LIBGLOBAL_LDA)
-bin_DEBUGPROGRAMS += ceph_test_mutate
-
-ceph_test_rewrite_latency_SOURCES = test/test_rewrite_latency.cc
-ceph_test_rewrite_latency_LDADD = libcommon.la $(PTHREAD_LIBS) -lm $(CRYPTO_LIBS) $(EXTRALIBS)
-bin_DEBUGPROGRAMS += ceph_test_rewrite_latency
-
-ceph_test_msgr_SOURCES = testmsgr.cc
-ceph_test_msgr_LDADD = $(LIBGLOBAL_LDA)
-bin_DEBUGPROGRAMS += ceph_test_msgr
-
-ceph_test_ioctls_SOURCES = client/test_ioctls.c
-bin_DEBUGPROGRAMS += ceph_test_ioctls
-
-ceph_dupstore_SOURCES = dupstore.cc
-ceph_dupstore_CXXFLAGS= ${CRYPTO_CXXFLAGS} ${AM_CXXFLAGS}
-ceph_dupstore_LDADD = $(LIBOS_LDA) $(LIBGLOBAL_LDA)
-ceph_streamtest_SOURCES = streamtest.cc
-ceph_streamtest_CXXFLAGS= ${CRYPTO_CXXFLAGS} ${AM_CXXFLAGS}
-ceph_streamtest_LDADD = $(LIBOS_LDA) $(LIBGLOBAL_LDA)
-bin_DEBUGPROGRAMS += ceph_dupstore ceph_streamtest
-
-ceph_test_trans_SOURCES = test_trans.cc
-ceph_test_trans_CXXFLAGS= ${CRYPTO_CXXFLAGS} ${AM_CXXFLAGS}
-ceph_test_trans_LDADD = $(LIBOS_LDA) $(LIBGLOBAL_LDA)
-bin_DEBUGPROGRAMS += ceph_test_trans
-
-ceph_test_rados_SOURCES = test/osd/TestRados.cc test/osd/TestOpStat.cc test/osd/Object.cc test/osd/RadosModel.cc
-ceph_test_rados_LDADD = librados.la $(LIBGLOBAL_LDA)
-bin_DEBUGPROGRAMS += ceph_test_rados
-
-ceph_smalliobench_SOURCES = test/bench/small_io_bench.cc test/bench/rados_backend.cc test/bench/detailed_stat_collector.cc test/bench/bencher.cc
-ceph_smalliobench_LDADD = librados.la -lboost_program_options $(LIBGLOBAL_LDA)
-bin_DEBUGPROGRAMS += ceph_smalliobench
-
-ceph_smalliobenchfs_SOURCES = test/bench/small_io_bench_fs.cc test/bench/testfilestore_backend.cc test/bench/detailed_stat_collector.cc test/bench/bencher.cc
-ceph_smalliobenchfs_LDADD = librados.la -lboost_program_options $(LIBOS_LDA) $(LIBGLOBAL_LDA)
-ceph_smalliobenchfs_CXXFLAGS = ${CRYPTO_CXXFLAGS} ${AM_CXXFLAGS}
-bin_DEBUGPROGRAMS += ceph_smalliobenchfs
-
-ceph_smalliobenchdumb_SOURCES = test/bench/small_io_bench_dumb.cc test/bench/dumb_backend.cc test/bench/detailed_stat_collector.cc test/bench/bencher.cc
-ceph_smalliobenchdumb_LDADD = librados.la -lboost_program_options $(LIBOS_LDA) $(LIBGLOBAL_LDA)
-ceph_smalliobenchdumb_CXXFLAGS = ${CRYPTO_CXXFLAGS} ${AM_CXXFLAGS}
-bin_DEBUGPROGRAMS += ceph_smalliobenchdumb
-
-ceph_smalliobenchrbd_SOURCES = test/bench/small_io_bench_rbd.cc test/bench/rbd_backend.cc test/bench/detailed_stat_collector.cc test/bench/bencher.cc
-ceph_smalliobenchrbd_LDADD = librados.la librbd.la -lboost_program_options $(LIBGLOBAL_LDA)
-bin_DEBUGPROGRAMS += ceph_smalliobenchrbd
-
-ceph_tpbench_SOURCES = test/bench/tp_bench.cc test/bench/detailed_stat_collector.cc
-ceph_tpbench_LDADD = librados.la -lboost_program_options $(LIBOS_LDA) $(LIBGLOBAL_LDA)
-bin_DEBUGPROGRAMS += ceph_tpbench
-
-ceph_omapbench_SOURCES = test/omap_bench.cc
-ceph_omapbench_LDADD = librados.la $(LIBGLOBAL_LDA)
-bin_DEBUGPROGRAMS += ceph_omapbench
-
-ceph_kvstorebench_SOURCES = test/kv_store_bench.cc key_value_store/kv_flat_btree_async.cc
-ceph_kvstorebench_LDADD = librados.la $(LIBGLOBAL_LDA)
-bin_DEBUGPROGRAMS += ceph_kvstorebench
-
-ceph_multi_stress_watch_SOURCES = test/multi_stress_watch.cc test/librados/test.cc
-ceph_multi_stress_watch_LDADD = librados.la $(LIBGLOBAL_LDA)
-bin_DEBUGPROGRAMS += ceph_multi_stress_watch
-
-if WITH_BUILD_TESTS
-ceph_test_libcommon_build_SOURCES = test/test_libcommon_build.cc $(libcommon_files)
-ceph_test_libcommon_build_LDADD = $(PTHREAD_LIBS) -lm $(CRYPTO_LIBS) $(EXTRALIBS)
-bin_DEBUGPROGRAMS += ceph_test_libcommon_build
-
-ceph_test_librados_build_SOURCES = test/test_libcommon_build.cc $(libcommon_files) $(librados_SOURCES)
-ceph_test_librados_build_LDADD = $(PTHREAD_LIBS) -lm $(CRYPTO_LIBS) $(EXTRALIBS)
-ceph_test_librados_build_CXXFLAGS = $(AM_CXXFLAGS)
-bin_DEBUGPROGRAMS += ceph_test_librados_build
-
-ceph_test_librgw_build_SOURCES = test/test_libcommon_build.cc $(libcommon_files) \
- $(librados_SOURCES) $(librgw_la_SOURCES)
-ceph_test_librgw_build_LDADD = -lexpat $(PTHREAD_LIBS) -lm $(CRYPTO_LIBS) $(EXTRALIBS)
-ceph_test_librgw_build_CXXFLAGS = $(AM_CXXFLAGS)
-bin_DEBUGPROGRAMS += ceph_test_librgw_build
-
-ceph_test_libcephfs_build_SOURCES = test/test_libcommon_build.cc $(libcommon_files) \
- $(libosdc_la_SOURCES)
-ceph_test_libcephfs_build_LDADD = libcephfs.la -lexpat $(PTHREAD_LIBS) -lm $(CRYPTO_LIBS) $(EXTRALIBS)
-ceph_test_libcephfs_build_CXXFLAGS = $(AM_CXXFLAGS)
-bin_DEBUGPROGRAMS += ceph_test_libcephfs_build
-endif
+# libcephfs (this and libhadoopcephfs should go somewhere else in the future)
-if WITH_HADOOPCLIENT
-ceph_test_libhadoopcephfs_build_SOURCES = test/test_libcommon_build.cc \
- $(libhadoopcephfs_la_SOURCES) \
- $(libosdc_la_SOURCES) $(libcommon_files)
-ceph_test_libhadoopcephfs_build_LDADD = libcephfs.la -lexpat $(PTHREAD_LIBS) -lm $(CRYPTO_LIBS) $(EXTRALIBS)
-ceph_test_libhadoopcephfs_build_CXXFLAGS = $(AM_CXXFLAGS)
-bin_DEBUGPROGRAMS += ceph_test_libhadoopcephfs_build
-endif
-
-##########
-BUILT_SOURCES =
-lib_LTLIBRARIES =
-noinst_LTLIBRARIES =
-noinst_LIBRARIES =
-
-# libcephfs
-libcephfs_la_SOURCES = \
- libcephfs.cc
-libcephfs_la_CFLAGS= ${CRYPTO_CFLAGS} ${AM_CFLAGS}
-libcephfs_la_CXXFLAGS= ${AM_CXXFLAGS}
-libcephfs_la_LIBADD = libclient.la
-libcephfs_la_LDFLAGS = $(PTHREAD_LIBS) $(CRYPTO_LIBS) $(EXTRALIBS) \
- ${AM_LDFLAGS} -version-info 1:0:0 -export-symbols-regex '^ceph_.*'
+libcephfs_la_SOURCES = libcephfs.cc
+libcephfs_la_LIBADD = $(LIBCLIENT) $(LIBCOMMON) $(PTHREAD_LIBS) $(CRYPTO_LIBS) $(EXTRALIBS)
+libcephfs_la_LDFLAGS = ${AM_LDFLAGS} -version-info 1:0:0 -export-symbols-regex '^ceph_.*'
lib_LTLIBRARIES += libcephfs.la
-ceph_test_timers_SOURCES = test/TestTimers.cc
-ceph_test_timers_LDADD = $(LIBGLOBAL_LDA)
-bin_DEBUGPROGRAMS += ceph_test_timers
-
-ceph_test_signal_handlers_SOURCES = test/TestSignalHandlers.cc
-ceph_test_signal_handlers_LDADD = $(LIBGLOBAL_LDA)
-bin_DEBUGPROGRAMS += ceph_test_signal_handlers
-
-# librados
-librados_SOURCES = \
- librados/librados.cc \
- librados/RadosClient.cc \
- librados/IoCtxImpl.cc \
- osdc/Objecter.cc \
- osdc/Striper.cc \
- cls/lock/cls_lock_client.cc \
- cls/lock/cls_lock_types.cc \
- cls/lock/cls_lock_ops.cc
-librados_la_SOURCES = ${librados_SOURCES}
-librados_la_CFLAGS = ${CRYPTO_CFLAGS} ${AM_CFLAGS}
-librados_la_CXXFLAGS = ${AM_CXXFLAGS}
-librados_la_LIBADD = libcommon.la $(PTHREAD_LIBS) $(CRYPTO_LIBS) $(EXTRALIBS)
-librados_la_LDFLAGS = ${AM_LDFLAGS} -version-info 2:0:0 -export-symbols-regex '^rados_.*'
-lib_LTLIBRARIES += librados.la
-
-if WITH_RADOSGW
-
-# rgw
-librgw_a_SOURCES = \
- rgw/librgw.cc \
- rgw/rgw_acl.cc \
- rgw/rgw_acl_s3.cc \
- rgw/rgw_acl_swift.cc \
- rgw/rgw_client_io.cc \
- rgw/rgw_fcgi.cc \
- rgw/rgw_xml.cc \
- rgw/rgw_usage.cc \
- rgw/rgw_json_enc.cc \
- rgw/rgw_user.cc \
- rgw/rgw_bucket.cc\
- rgw/rgw_tools.cc \
- rgw/rgw_rados.cc \
- rgw/rgw_http_client.cc \
- rgw/rgw_rest_client.cc \
- rgw/rgw_rest_conn.cc \
- rgw/rgw_op.cc \
- rgw/rgw_common.cc \
- rgw/rgw_cache.cc \
- rgw/rgw_formats.cc \
- rgw/rgw_log.cc \
- rgw/rgw_multi.cc \
- rgw/rgw_policy_s3.cc \
- rgw/rgw_gc.cc \
- rgw/rgw_multi_del.cc \
- rgw/rgw_env.cc \
- rgw/rgw_cors.cc \
- rgw/rgw_cors_s3.cc \
- rgw/rgw_auth_s3.cc \
- rgw/rgw_metadata.cc \
- rgw/rgw_replica_log.cc \
- rgw/rgw_keystone.cc
-librgw_a_CFLAGS = ${CRYPTO_CFLAGS} ${AM_CFLAGS}
-librgw_a_CXXFLAGS = -Woverloaded-virtual ${AM_CXXFLAGS}
-noinst_LIBRARIES += librgw.a
-
-my_radosgw_ldadd = \
- librgw.a librados.la libcls_rgw_client.a libcls_log_client.a \
- libcls_statelog_client.a libcls_replica_log_client.a libcls_lock_client.a \
- libcls_refcount_client.a libcls_version_client.a -lcurl -lexpat \
- $(PTHREAD_LIBS) -lm $(CRYPTO_LIBS) $(EXTRALIBS) $(LIBGLOBAL_LDA)
-
-radosgw_SOURCES = \
- rgw/rgw_resolve.cc \
- rgw/rgw_rest.cc \
- rgw/rgw_rest_swift.cc \
- rgw/rgw_rest_s3.cc \
- rgw/rgw_rest_usage.cc \
- rgw/rgw_rest_user.cc \
- rgw/rgw_rest_bucket.cc \
- rgw/rgw_rest_metadata.cc \
- rgw/rgw_replica_log.cc \
- rgw/rgw_rest_log.cc \
- rgw/rgw_rest_opstate.cc \
- rgw/rgw_rest_replica_log.cc \
- rgw/rgw_rest_config.cc \
- rgw/rgw_http_client.cc \
- rgw/rgw_swift.cc \
- rgw/rgw_swift_auth.cc \
- rgw/rgw_main.cc
-radosgw_LDADD = $(my_radosgw_ldadd) -lfcgi -lresolv
-radosgw_CXXFLAGS = ${AM_CXXFLAGS}
-bin_PROGRAMS += radosgw
-
-radosgw_admin_SOURCES = rgw/rgw_admin.cc
-radosgw_admin_CXXFLAGS = ${AM_CXXFLAGS}
-radosgw_admin_LDADD = $(my_radosgw_ldadd)
-bin_PROGRAMS += radosgw-admin
-
-ceph_rgw_multiparser_SOURCES = rgw/rgw_multiparser.cc
-ceph_rgw_multiparser_CXXFLAGS = ${AM_CXXFLAGS}
-ceph_rgw_multiparser_LDADD = $(my_radosgw_ldadd)
-bin_DEBUGPROGRAMS += ceph_rgw_multiparser
-
-ceph_rgw_jsonparser_SOURCES = rgw/rgw_jsonparser.cc rgw/rgw_common.cc rgw/rgw_env.cc rgw/rgw_json_enc.cc
-ceph_rgw_jsonparser_CXXFLAGS = ${CRYPTO_CXXFLAGS} ${AM_CXXFLAGS}
-ceph_rgw_jsonparser_LDADD = $(my_radosgw_ldadd)
-bin_DEBUGPROGRAMS += ceph_rgw_jsonparser
-
-endif
-
-# librbd
-librbd_la_SOURCES = \
- librbd/librbd.cc \
- librbd/AioCompletion.cc \
- librbd/AioRequest.cc \
- cls/rbd/cls_rbd_client.cc \
- librbd/ImageCtx.cc \
- librbd/internal.cc \
- librbd/LibrbdWriteback.cc \
- librbd/WatchCtx.cc \
- osdc/ObjectCacher.cc \
- osdc/Striper.cc \
- librados/snap_set_diff.cc \
- cls/lock/cls_lock_client.cc \
- cls/lock/cls_lock_types.cc \
- cls/lock/cls_lock_ops.cc \
- common/util.cc
-librbd_la_CFLAGS = ${AM_CFLAGS} ${CRYPTO_CFLAGS}
-librbd_la_CXXFLAGS = ${AM_CXXFLAGS}
-librbd_la_LIBADD = librados.la
-librbd_la_LDFLAGS = ${AM_LDFLAGS} -version-info 1:0:0 \
- -export-symbols-regex '^rbd_.*' $(PTHREAD_LIBS) $(EXTRALIBS)
-lib_LTLIBRARIES += librbd.la
-
-rados_SOURCES = rados.cc rados_import.cc rados_export.cc rados_sync.cc common/obj_bencher.cc
-rados_LDADD = libcls_lock_client.a librados.la $(LIBGLOBAL_LDA)
-bin_PROGRAMS += rados
-
-if WITH_REST_BENCH
-
-rest_bench_SOURCES = tools/rest_bench.cc common/obj_bencher.cc
-rest_bench_LDADD = $(LIBGLOBAL_LDA)
-rest_bench_CXXFLAGS = ${AM_CXXFLAGS}
-bin_PROGRAMS += rest-bench
-
-if WITH_SYSTEM_LIBS3
-rest_bench_LDADD += -ls3
-else
-rest_bench_LDADD += libs3/build/lib/libs3.a -lcurl -lxml2
-rest_bench_CXXFLAGS += -I$(top_srcdir)/src/libs3/inc
-SUBDIRS += libs3
-endif
-
-endif
-
-ceph_scratchtool_SOURCES = scratchtool.c
-ceph_scratchtool_LDADD = librados.la $(PTHREAD_LIBS) -lm $(CRYPTO_LIBS) $(EXTRALIBS)
-ceph_scratchtoolpp_SOURCES = scratchtoolpp.cc
-ceph_scratchtoolpp_LDADD = librados.la $(PTHREAD_LIBS) -lm
-ceph_radosacl_SOURCES = radosacl.cc
-ceph_radosacl_LDADD = librados.la $(PTHREAD_LIBS) -lm $(CRYPTO_LIBS) $(EXTRALIBS)
-bin_DEBUGPROGRAMS += ceph_scratchtool ceph_scratchtoolpp ceph_radosacl
-
-rbd_SOURCES = rbd.cc common/secret.c common/TextTable.cc common/util.cc
-rbd_CXXFLAGS = ${AM_CXXFLAGS}
-rbd_LDADD = librbd.la librados.la $(LIBGLOBAL_LDA) -lkeyutils
-if LINUX
-bin_PROGRAMS += rbd
-endif
-
-
-ceph_test_crypto_SOURCES = testcrypto.cc
-ceph_test_crypto_LDADD = $(LIBGLOBAL_LDA)
-ceph_test_crypto_CXXFLAGS = ${AM_CXXFLAGS}
-bin_DEBUGPROGRAMS += ceph_test_crypto
-
-ceph_test_keys_SOURCES = testkeys.cc
-ceph_test_keys_LDADD = libmon.a $(LIBGLOBAL_LDA)
-ceph_test_keys_CXXFLAGS = ${AM_CXXFLAGS}
-bin_DEBUGPROGRAMS += ceph_test_keys
-
-if WITH_TCMALLOC
-ceph_test_keys_LDADD += -ltcmalloc
-ceph_test_keys_CXXFLAGS += ${tcmalloc_safety_flags}
-ceph_test_keys_SOURCES += perfglue/heap_profiler.cc
-endif
-
-
-## rados object classes
-
-radoslibdir = $(libdir)/rados-classes
-radoslib_LTLIBRARIES =
-
-# hello world class
-libcls_hello_la_SOURCES = cls/hello/cls_hello.cc
-libcls_hello_la_CFLAGS = ${AM_CFLAGS}
-libcls_hello_la_CXXFLAGS= ${AM_CXXFLAGS}
-libcls_hello_la_LIBADD = $(PTHREAD_LIBS) $(EXTRALIBS)
-libcls_hello_la_LDFLAGS = ${AM_LDFLAGS} -version-info 1:0:0 -export-symbols-regex '.*__cls_.*'
-
-radoslib_LTLIBRARIES += libcls_hello.la
-
-# rbd: rados block device class
-libcls_rbd_la_SOURCES = cls/rbd/cls_rbd.cc
-libcls_rbd_la_CFLAGS = ${AM_CFLAGS}
-libcls_rbd_la_CXXFLAGS= ${AM_CXXFLAGS}
-libcls_rbd_la_LIBADD = $(PTHREAD_LIBS) $(EXTRALIBS)
-libcls_rbd_la_LDFLAGS = ${AM_LDFLAGS} -version-info 1:0:0 -export-symbols-regex '.*__cls_.*'
-
-radoslib_LTLIBRARIES += libcls_rbd.la
-
-# lock class
-libcls_lock_la_SOURCES = cls/lock/cls_lock.cc
-libcls_lock_la_CFLAGS = ${AM_CFLAGS}
-libcls_lock_la_CXXFLAGS= ${AM_CXXFLAGS}
-libcls_lock_la_LIBADD = $(PTHREAD_LIBS) $(EXTRALIBS)
-libcls_lock_la_LDFLAGS = ${AM_LDFLAGS} -version-info 1:0:0 -export-symbols-regex '.*__cls_.*'
-radoslib_LTLIBRARIES += libcls_lock.la
-
-# refcount class
-libcls_refcount_la_SOURCES = \
- cls/refcount/cls_refcount.cc \
- cls/refcount/cls_refcount_ops.cc \
- common/ceph_json.cc \
- json_spirit/json_spirit_reader.cpp \
- json_spirit/json_spirit_writer.cpp \
- json_spirit/json_spirit_value.cpp
-libcls_refcount_la_CFLAGS = ${AM_CFLAGS}
-libcls_refcount_la_CXXFLAGS= ${AM_CXXFLAGS}
-libcls_refcount_la_LIBADD = $(PTHREAD_LIBS) $(EXTRALIBS)
-libcls_refcount_la_LDFLAGS = ${AM_LDFLAGS} -version-info 1:0:0 -export-symbols-regex '.*__cls_.*'
-
-radoslib_LTLIBRARIES += libcls_refcount.la
-
-# version class
-libcls_version_la_SOURCES = cls/version/cls_version.cc
-libcls_version_la_CFLAGS = ${AM_CFLAGS}
-libcls_version_la_CXXFLAGS= ${AM_CXXFLAGS}
-libcls_version_la_LIBADD = $(PTHREAD_LIBS) $(EXTRALIBS)
-libcls_version_la_LDFLAGS = ${AM_LDFLAGS} -version-info 1:0:0 -export-symbols-regex '.*__cls_.*'
-
-radoslib_LTLIBRARIES += libcls_version.la
-
-# log class
-libcls_log_la_SOURCES = cls/log/cls_log.cc
-libcls_log_la_CFLAGS = ${AM_CFLAGS}
-libcls_log_la_CXXFLAGS= ${AM_CXXFLAGS}
-libcls_log_la_LIBADD = $(PTHREAD_LIBS) $(EXTRALIBS)
-libcls_log_la_LDFLAGS = ${AM_LDFLAGS} -version-info 1:0:0 -export-symbols-regex '.*__cls_.*'
-
-radoslib_LTLIBRARIES += libcls_log.la
-
-libcls_statelog_la_SOURCES = cls/statelog/cls_statelog.cc
-libcls_statelog_la_CFLAGS = ${AM_CFLAGS}
-libcls_statelog_la_CXXFLAGS= ${AM_CXXFLAGS}
-libcls_statelog_la_LIBADD = $(PTHREAD_LIBS) $(EXTRALIBS)
-libcls_statelog_la_LDFLAGS = ${AM_LDFLAGS} -version-info 1:0:0 -export-symbols-regex '.*__cls_.*'
-
-radoslib_LTLIBRARIES += libcls_statelog.la
-
-# replica log class
-libcls_replica_log_la_SOURCES = cls/replica_log/cls_replica_log.cc
-libcls_replica_log_la_CFLAGS = ${AM_CFLAGS}
-libcls_replica_log_la_CXXFLAGS= ${AM_CXXFLAGS}
-libcls_replica_log_la_LIBADD = $(PTHREAD_LIBS) $(EXTRALIBS)
-libcls_replica_log_la_LDFLAGS = ${AM_LDFLAGS} -version-info 1:0:0 -export-symbols-regex '.*__cls_.*'
-
-radoslib_LTLIBRARIES += libcls_replica_log.la
-
-# rgw: rados gateway
-libcls_rgw_la_SOURCES = \
- cls/rgw/cls_rgw.cc \
- cls/rgw/cls_rgw_ops.cc \
- cls/rgw/cls_rgw_types.cc \
- common/ceph_json.cc \
- json_spirit/json_spirit_reader.cpp \
- json_spirit/json_spirit_writer.cpp \
- json_spirit/json_spirit_value.cpp
-libcls_rgw_la_CFLAGS = ${AM_CFLAGS}
-libcls_rgw_la_CXXFLAGS= ${AM_CXXFLAGS}
-libcls_rgw_la_LIBADD = $(PTHREAD_LIBS) $(EXTRALIBS)
-libcls_rgw_la_LDFLAGS = ${AM_LDFLAGS} -version-info 1:0:0 -export-symbols-regex '.*__cls_.*'
-
-radoslib_LTLIBRARIES += libcls_rgw.la
-
-libcls_lock_client_a_SOURCES = \
- cls/lock/cls_lock_client.cc \
- cls/lock/cls_lock_types.cc \
- cls/lock/cls_lock_ops.cc
-noinst_LIBRARIES += libcls_lock_client.a
-
-libcls_refcount_client_a_SOURCES = \
- cls/refcount/cls_refcount_client.cc \
- cls/refcount/cls_refcount_ops.cc
-noinst_LIBRARIES += libcls_refcount_client.a
-
-libcls_version_client_a_SOURCES = \
- cls/version/cls_version_client.cc \
- cls/version/cls_version_types.cc
-noinst_LIBRARIES += libcls_version_client.a
-
-libcls_log_client_a_SOURCES = \
- cls/log/cls_log_client.cc
-noinst_LIBRARIES += libcls_log_client.a
-
-libcls_statelog_client_a_SOURCES = \
- cls/statelog/cls_statelog_client.cc
-noinst_LIBRARIES += libcls_statelog_client.a
-
-libcls_replica_log_client_a_SOURCES = \
- cls/replica_log/cls_replica_log_types.cc \
- cls/replica_log/cls_replica_log_ops.cc \
- cls/replica_log/cls_replica_log_client.cc
-noinst_LIBRARIES += libcls_replica_log_client.a
-
-libcls_rgw_client_a_SOURCES = \
- cls/rgw/cls_rgw_client.cc \
- cls/rgw/cls_rgw_types.cc \
- cls/rgw/cls_rgw_ops.cc
-noinst_LIBRARIES += libcls_rgw_client.a
-
-## hadoop client
+# order matters! this *must* come after libcephfs, or else you'll encounter something
+# like "error: relink libhadoopcephfs.la with the above command before installing it"
if WITH_HADOOPCLIENT
JAVA_BASE = /usr/lib/jvm/java-6-sun
libhadoopcephfs_la_SOURCES = client/hadoop/CephFSInterface.cc
-libhadoopcephfs_la_LIBADD = libcephfs.la
-libhadoopcephfs_la_CFLAGS = ${AM_CFLAGS}
-libhadoopcephfs_la_CXXFLAGS = ${AM_CXXFLAGS}
+libhadoopcephfs_la_LIBADD = $(LIBCEPHFS)
libhadoopcephfs_la_LDFLAGS = ${AM_LDFLAGS} -version-info 1:0:0 -export-symbols-regex 'hadoopcephfs_.*'
lib_LTLIBRARIES += libhadoopcephfs.la
+noinst_HEADERS += client/hadoop/CephFSInterface.h
+endif # WITH_HADOOPCLIENT
-endif
-## CephFS Java Wrappers
-## - The JNI library is here
-## - The Java source Makefile.am is in src/java
+# jni library (java source is in src/java)
+
if ENABLE_CEPHFS_JAVA
libcephfs_jni_la_SOURCES = \
java/native/libcephfs_jni.cc \
java/native/ScopedLocalRef.h \
java/native/JniConstants.cpp \
java/native/JniConstants.h
-libcephfs_jni_la_LIBADD = libcephfs.la $(EXTRALIBS)
+libcephfs_jni_la_LIBADD = $(LIBCEPHFS) $(EXTRALIBS)
libcephfs_jni_la_CPPFLAGS = $(JDK_CPPFLAGS)
-libcephfs_jni_la_CXXFLAGS = ${AM_CXXFLAGS}
libcephfs_jni_la_LDFLAGS = ${AM_LDFLAGS} -version-info 1:0:0
lib_LTLIBRARIES += libcephfs_jni.la
endif
-## key_value_store classes
-
-# key_value_store: key value store class
-libcls_kvs_la_SOURCES = key_value_store/cls_kvs.cc
-libcls_kvs_la_CFLAGS = ${AM_CFLAGS}
-libcls_kvs_la_CXXFLAGS= ${AM_CXXFLAGS}
-libcls_kvs_la_LIBADD = $(PTHREAD_LIBS) $(EXTRALIBS)
-libcls_kvs_la_LDFLAGS = ${AM_LDFLAGS} -version-info 1:0:0 -export-symbols-regex '.*__cls_.*'
-
-radoslib_LTLIBRARIES += libcls_kvs.la
-
-## System tests
-libsystest_la_SOURCES = \
- test/system/cross_process_sem.cc \
- test/system/systest_runnable.cc \
- test/system/systest_settings.cc
-libsystest_la_LIBADD = $(LIBGLOBAL_LDA)
-noinst_LTLIBRARIES += libsystest.la
-
-ceph_test_rados_list_parallel_SOURCES = \
- test/system/rados_list_parallel.cc \
- test/system/st_rados_create_pool.cc \
- test/system/st_rados_list_objects.cc
-ceph_test_rados_list_parallel_LDADD = libsystest.la librados.la $(PTHREAD_LIBS)
-bin_DEBUGPROGRAMS += ceph_test_rados_list_parallel
-
-ceph_test_rados_open_pools_parallel_SOURCES = \
- test/system/rados_open_pools_parallel.cc \
- test/system/st_rados_create_pool.cc
-ceph_test_rados_open_pools_parallel_LDADD = libsystest.la librados.la $(PTHREAD_LIBS)
-bin_DEBUGPROGRAMS += ceph_test_rados_open_pools_parallel
-
-ceph_test_rados_delete_pools_parallel_SOURCES = \
- test/system/rados_delete_pools_parallel.cc \
- test/system/st_rados_create_pool.cc \
- test/system/st_rados_delete_pool.cc \
- test/system/st_rados_list_objects.cc
-ceph_test_rados_delete_pools_parallel_LDADD = libsystest.la librados.la $(PTHREAD_LIBS)
-bin_DEBUGPROGRAMS += ceph_test_rados_delete_pools_parallel
-
-ceph_test_rados_watch_notify_SOURCES = \
- test/system/rados_watch_notify.cc \
- test/system/st_rados_create_pool.cc \
- test/system/st_rados_delete_pool.cc \
- test/system/st_rados_delete_objs.cc \
- test/system/st_rados_watch.cc \
- test/system/st_rados_notify.cc
-ceph_test_rados_watch_notify_LDADD = libsystest.la librados.la $(PTHREAD_LIBS)
-bin_DEBUGPROGRAMS += ceph_test_rados_watch_notify
-
-ceph_bench_log_SOURCES = \
- test/bench_log.cc
-ceph_bench_log_LDADD = libcommon.la $(LIBGLOBAL_LDA)
-bin_DEBUGPROGRAMS += ceph_bench_log
-
-## unit tests
-
-# target to build but not run the unit tests
-unittests:: $(check_PROGRAMS)
-
-UNITTEST_CXXFLAGS = \
- -I$(top_srcdir)/src/gtest/include \
- -I$(top_builddir)/src/gtest/include
-UNITTEST_STATIC_LDADD = \
- $(top_builddir)/src/gtest/lib/libgtest.a \
- $(top_builddir)/src/gtest/lib/libgtest_main.a \
- $(PTHREAD_LIBS)
-UNITTEST_LDADD = ${UNITTEST_STATIC_LDADD}
-
-unittest_encoding_SOURCES = test/encoding.cc
-unittest_encoding_LDADD = libcephfs.la librados.la $(PTHREAD_LIBS) -lm \
- ${UNITTEST_LDADD}
-unittest_encoding_CXXFLAGS = ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS} \
- -fno-strict-aliasing
-check_PROGRAMS += unittest_encoding
-
-unittest_addrs_SOURCES = test/test_addrs.cc
-unittest_addrs_CXXFLAGS = ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS}
-unittest_addrs_LDADD = $(LIBGLOBAL_LDA) ${UNITTEST_LDADD}
-check_PROGRAMS += unittest_addrs
-
-unittest_arch_SOURCES = test/test_arch.c arch/intel.c arch/neon.c arch/probe.cc
-unittest_arch_CXXFLAGS = ${AM_CFLAGS}
-check_PROGRAMS += unittest_arch
-
-unittest_crc32c_SOURCES = test/common/test_crc32c.cc arch/intel.c arch/neon.c arch/probe.cc
-unittest_crc32c_CXXFLAGS = ${AM_CFLAGS} ${UNITTEST_CXXFLAGS}
-unittest_crc32c_LDADD = libcrc.la ${UNITTEST_LDADD} ${LIBGLOBAL_LDA}
-check_PROGRAMS += unittest_crc32c
-
-unittest_sharedptr_registry_SOURCES = test/common/test_sharedptr_registry.cc
-unittest_sharedptr_registry_CXXFLAGS = ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS}
-unittest_sharedptr_registry_LDADD = libcommon.la ${LIBGLOBAL_LDA} ${UNITTEST_LDADD}
-check_PROGRAMS += unittest_sharedptr_registry
-
-unittest_util_SOURCES = test/common/test_util.cc common/util.cc
-unittest_util_CXXFLAGS = ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS}
-unittest_util_LDADD = libcommon.la $(PTHREAD_LIBS) -lm ${UNITTEST_LDADD} $(CRYPTO_LIBS) $(EXTRALIBS)
-check_PROGRAMS += unittest_util
-
-unittest_workqueue_SOURCES = test/test_workqueue.cc
-unittest_workqueue_CXXFLAGS = ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS}
-unittest_workqueue_LDADD = $(LIBGLOBAL_LDA) ${UNITTEST_LDADD}
-check_PROGRAMS += unittest_workqueue
-
-unittest_striper_SOURCES = test/test_striper.cc
-unittest_striper_CXXFLAGS = ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS}
-unittest_striper_LDADD = libosdc.la $(LIBGLOBAL_LDA) ${UNITTEST_LDADD}
-check_PROGRAMS += unittest_striper
-
-unittest_prebufferedstreambuf_SOURCES = test/test_prebufferedstreambuf.cc common/PrebufferedStreambuf.cc
-unittest_prebufferedstreambuf_CXXFLAGS = ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS}
-unittest_prebufferedstreambuf_LDADD = ${UNITTEST_LDADD} $(EXTRALIBS)
-check_PROGRAMS += unittest_prebufferedstreambuf
-
-unittest_str_list_SOURCES = test/test_str_list.cc
-unittest_str_list_CXXFLAGS = ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS}
-unittest_str_list_LDADD = $(LIBGLOBAL_LDA) ${UNITTEST_LDADD}
-check_PROGRAMS += unittest_str_list
-
-unittest_log_SOURCES = log/test.cc common/PrebufferedStreambuf.cc
-unittest_log_LDFLAGS = $(PTHREAD_CFLAGS) ${AM_LDFLAGS}
-unittest_log_LDADD = libcommon.la ${UNITTEST_LDADD}
-unittest_log_CXXFLAGS = ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS} -O2
-check_PROGRAMS += unittest_log
-
-unittest_throttle_SOURCES = test/common/Throttle.cc
-unittest_throttle_LDFLAGS = $(PTHREAD_CFLAGS) ${AM_LDFLAGS}
-unittest_throttle_LDADD = libcommon.la ${LIBGLOBAL_LDA} ${UNITTEST_LDADD}
-unittest_throttle_CXXFLAGS = ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS} -O2
-check_PROGRAMS += unittest_throttle
-
-unittest_base64_SOURCES = test/base64.cc
-unittest_base64_LDFLAGS = $(PTHREAD_CFLAGS) ${AM_LDFLAGS}
-unittest_base64_LDADD = libcephfs.la -lm ${UNITTEST_LDADD}
-unittest_base64_CXXFLAGS = ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS}
-check_PROGRAMS += unittest_base64
-
-unittest_ceph_argparse_SOURCES = test/ceph_argparse.cc
-unittest_ceph_argparse_LDFLAGS = $(PTHREAD_CFLAGS) ${AM_LDFLAGS}
-unittest_ceph_argparse_LDADD = $(LIBGLOBAL_LDA) ${UNITTEST_LDADD}
-unittest_ceph_argparse_CXXFLAGS = ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS}
-check_PROGRAMS += unittest_ceph_argparse
-
-unittest_osd_types_SOURCES = test/test_osd_types.cc
-unittest_osd_types_CXXFLAGS = ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS}
-unittest_osd_types_LDADD = $(LIBGLOBAL_LDA) libcommon.la ${UNITTEST_LDADD}
-check_PROGRAMS += unittest_osd_types
-
-unittest_pglog_SOURCES = test/osd/TestPGLog.cc perfglue/disabled_heap_profiler.cc
-unittest_pglog_CXXFLAGS = ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS}
-unittest_pglog_LDADD = libosd.a libosdc.la $(LIBOS_LDA) $(LIBGLOBAL_LDA) ${UNITTEST_LDADD}
-check_PROGRAMS += unittest_pglog
-
-if LINUX
-unittest_pglog_LDADD += -ldl
-endif
-
-unittest_gather_SOURCES = test/gather.cc
-unittest_gather_LDADD = ${LIBGLOBAL_LDA} ${UNITTEST_LDADD}
-unittest_gather_CXXFLAGS = ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS}
-check_PROGRAMS += unittest_gather
-
-unittest_run_cmd_SOURCES = test/run_cmd.cc
-unittest_run_cmd_LDADD = libcephfs.la ${UNITTEST_LDADD}
-unittest_run_cmd_CXXFLAGS = ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS}
-check_PROGRAMS += unittest_run_cmd
-
-unittest_signals_SOURCES = test/signals.cc
-unittest_signals_LDADD = ${LIBGLOBAL_LDA} ${UNITTEST_LDADD}
-unittest_signals_CXXFLAGS = ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS}
-check_PROGRAMS += unittest_signals
-
-unittest_simple_spin_SOURCES = test/simple_spin.cc
-unittest_simple_spin_LDADD = libcephfs.la ${UNITTEST_LDADD}
-unittest_simple_spin_CXXFLAGS = ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS}
-check_PROGRAMS += unittest_simple_spin
-
-unittest_librados_SOURCES = test/librados/librados.cc
-unittest_librados_LDFLAGS = $(PTHREAD_CFLAGS) ${AM_LDFLAGS}
-unittest_librados_LDADD = librados.la ${UNITTEST_LDADD}
-unittest_librados_CXXFLAGS = ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS}
-check_PROGRAMS += unittest_librados
-
-unittest_bufferlist_SOURCES = test/bufferlist.cc
-unittest_bufferlist_LDADD = ${UNITTEST_LDADD} $(LIBGLOBAL_LDA)
-unittest_bufferlist_CXXFLAGS = ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS}
-check_PROGRAMS += unittest_bufferlist
-
-unittest_crypto_SOURCES = test/crypto.cc
-unittest_crypto_LDFLAGS = ${CRYPTO_LDFLAGS} ${AM_LDFLAGS}
-unittest_crypto_LDADD = ${LIBGLOBAL_LDA} ${UNITTEST_LDADD}
-unittest_crypto_CXXFLAGS = ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS}
-check_PROGRAMS += unittest_crypto
-
-unittest_perf_counters_SOURCES = test/perf_counters.cc
-unittest_perf_counters_LDFLAGS = ${AM_LDFLAGS}
-unittest_perf_counters_LDADD = ${LIBGLOBAL_LDA} ${UNITTEST_LDADD}
-unittest_perf_counters_CXXFLAGS = ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS}
-check_PROGRAMS += unittest_perf_counters
-
-unittest_admin_socket_SOURCES = test/admin_socket.cc
-unittest_admin_socket_LDFLAGS = ${AM_LDFLAGS}
-unittest_admin_socket_LDADD = ${LIBGLOBAL_LDA} ${UNITTEST_LDADD} libcommon.la
-unittest_admin_socket_CXXFLAGS = ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS}
-check_PROGRAMS += unittest_admin_socket
-
-unittest_ceph_crypto_SOURCES = test/ceph_crypto.cc
-unittest_ceph_crypto_LDFLAGS = ${CRYPTO_LDFLAGS} ${AM_LDFLAGS}
-unittest_ceph_crypto_LDADD = ${UNITTEST_LDADD} $(LIBGLOBAL_LDA)
-unittest_ceph_crypto_CXXFLAGS = ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS}
-check_PROGRAMS += unittest_ceph_crypto
-
-unittest_utf8_SOURCES = test/utf8.cc
-unittest_utf8_LDFLAGS = $(PTHREAD_CFLAGS) ${AM_LDFLAGS}
-unittest_utf8_LDADD = ${UNITTEST_LDADD} $(LIBGLOBAL_LDA)
-unittest_utf8_CXXFLAGS = ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS}
-check_PROGRAMS += unittest_utf8
-
-unittest_mime_SOURCES = test/mime.cc
-unittest_mime_LDFLAGS = $(PTHREAD_CFLAGS) ${AM_LDFLAGS}
-unittest_mime_LDADD = ${UNITTEST_LDADD} $(LIBGLOBAL_LDA)
-unittest_mime_CXXFLAGS = ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS}
-check_PROGRAMS += unittest_mime
-
-unittest_escape_SOURCES = test/escape.cc
-unittest_escape_LDFLAGS = $(PTHREAD_CFLAGS) ${AM_LDFLAGS}
-unittest_escape_LDADD = ${UNITTEST_LDADD} $(LIBGLOBAL_LDA)
-unittest_escape_CXXFLAGS = ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS}
-check_PROGRAMS += unittest_escape
-
-unittest_chain_xattr_SOURCES = test/filestore/chain_xattr.cc
-unittest_chain_xattr_LDFLAGS = ${AM_LDFLAGS}
-unittest_chain_xattr_LDADD = ${UNITTEST_STATIC_LDADD} $(LIBOS_LDA) $(LIBGLOBAL_LDA)
-unittest_chain_xattr_CXXFLAGS = ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS} ${CRYPTO_CXXFLAGS}
-check_PROGRAMS += unittest_chain_xattr
-
-unittest_flatindex_SOURCES = test/os/TestFlatIndex.cc
-unittest_flatindex_LDFLAGS = ${AM_LDFLAGS}
-unittest_flatindex_LDADD = ${UNITTEST_STATIC_LDADD} $(LIBOS_LDA) $(LIBGLOBAL_LDA)
-unittest_flatindex_CXXFLAGS = ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS} ${CRYPTO_CXXFLAGS}
-check_PROGRAMS += unittest_flatindex
-
-unittest_strtol_SOURCES = test/strtol.cc
-unittest_strtol_LDFLAGS = $(PTHREAD_CFLAGS) ${AM_LDFLAGS}
-unittest_strtol_LDADD = ${UNITTEST_LDADD} $(LIBGLOBAL_LDA)
-unittest_strtol_CXXFLAGS = ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS}
-check_PROGRAMS += unittest_strtol
-
-unittest_confutils_SOURCES = test/confutils.cc
-unittest_confutils_LDFLAGS = $(PTHREAD_CFLAGS) ${AM_LDFLAGS}
-unittest_confutils_LDADD = ${UNITTEST_LDADD} $(LIBGLOBAL_LDA)
-unittest_confutils_CXXFLAGS = ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS}
-check_PROGRAMS += unittest_confutils
-
-unittest_heartbeatmap_SOURCES = test/heartbeat_map.cc common/HeartbeatMap.cc
-unittest_heartbeatmap_LDFLAGS = $(PTHREAD_CFLAGS) ${AM_LDFLAGS}
-unittest_heartbeatmap_LDADD = ${UNITTEST_LDADD} $(LIBGLOBAL_LDA)
-unittest_heartbeatmap_CXXFLAGS = ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS}
-check_PROGRAMS += unittest_heartbeatmap
-
-unittest_formatter_SOURCES = test/formatter.cc rgw/rgw_formats.cc
-unittest_formatter_LDFLAGS = $(PTHREAD_CFLAGS) ${AM_LDFLAGS}
-unittest_formatter_LDADD = ${UNITTEST_LDADD} $(LIBGLOBAL_LDA)
-unittest_formatter_CXXFLAGS = ${CRYPTO_CXXFLAGS} ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS}
-check_PROGRAMS += unittest_formatter
-
-unittest_libcephfs_config_SOURCES = test/libcephfs_config.cc
-unittest_libcephfs_config_LDFLAGS = $(PTHREAD_CFLAGS) ${AM_LDFLAGS}
-unittest_libcephfs_config_LDADD = libcephfs.la ${UNITTEST_LDADD}
-unittest_libcephfs_config_CXXFLAGS = ${CRYPTO_CFLAGS} ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS}
-check_PROGRAMS += unittest_libcephfs_config
-
-unittest_lfnindex_SOURCES = test/os/TestLFNIndex.cc
-unittest_lfnindex_LDFLAGS = ${AM_LDFLAGS}
-unittest_lfnindex_LDADD = ${UNITTEST_STATIC_LDADD} $(LIBOS_LDA) $(LIBGLOBAL_LDA)
-unittest_lfnindex_CXXFLAGS = ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS} ${CRYPTO_CXXFLAGS}
-check_PROGRAMS += unittest_lfnindex
-
-unittest_librados_config_SOURCES = test/librados/librados_config.cc
-unittest_librados_config_LDFLAGS = $(PTHREAD_CFLAGS) ${AM_LDFLAGS}
-unittest_librados_config_LDADD = librados.la ${UNITTEST_LDADD}
-unittest_librados_config_CXXFLAGS = ${CRYPTO_CFLAGS} ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS}
-check_PROGRAMS += unittest_librados_config
-
-#unittest_librgw_link_SOURCES = test/librgw_link.cc
-#unittest_librgw_link_LDFLAGS = $(PTHREAD_CFLAGS) ${AM_LDFLAGS}
-#unittest_librgw_link_LDADD = librgw.la ${UNITTEST_LDADD}
-#unittest_librgw_link_CXXFLAGS = ${CRYPTO_CFLAGS} ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS}
-#check_PROGRAMS += unittest_librgw_link
-
-unittest_daemon_config_SOURCES = test/daemon_config.cc
-unittest_daemon_config_LDFLAGS = $(PTHREAD_CFLAGS) ${AM_LDFLAGS}
-unittest_daemon_config_LDADD = ${UNITTEST_LDADD} ${LIBGLOBAL_LDA}
-unittest_daemon_config_CXXFLAGS = ${CRYPTO_CFLAGS} ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS}
-check_PROGRAMS += unittest_daemon_config
-
-unittest_osd_osdcap_SOURCES = test/osd/osdcap.cc osd/OSDCap.cc
-unittest_osd_osdcap_LDFLAGS = $(PTHREAD_CFLAGS) ${AM_LDFLAGS}
-unittest_osd_osdcap_LDADD = ${UNITTEST_LDADD} ${LIBGLOBAL_LDA}
-unittest_osd_osdcap_CXXFLAGS = ${CRYPTO_CFLAGS} ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS}
-check_PROGRAMS += unittest_osd_osdcap
-
-unittest_mon_moncap_SOURCES = test/mon/moncap.cc mon/MonCap.cc
-unittest_mon_moncap_LDFLAGS = $(PTHREAD_CFLAGS) ${AM_LDFLAGS}
-unittest_mon_moncap_LDADD = ${UNITTEST_LDADD} ${LIBGLOBAL_LDA}
-unittest_mon_moncap_CXXFLAGS = ${CRYPTO_CFLAGS} ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS}
-check_PROGRAMS += unittest_mon_moncap
-
-#if WITH_RADOSGW
-#unittest_librgw_SOURCES = test/librgw.cc
-#unittest_librgw_LDFLAGS = -lrt $(PTHREAD_CFLAGS) -lcurl ${AM_LDFLAGS}
-#unittest_librgw_LDADD = librgw.la librados.la ${UNITTEST_LDADD} -lexpat $(LIBGLOBAL_LDA)
-#unittest_librgw_CXXFLAGS = ${CRYPTO_CFLAGS} ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS}
-#check_PROGRAMS += unittest_librgw
-#endif
-
-unittest_ipaddr_SOURCES = test/test_ipaddr.cc
-unittest_ipaddr_LDADD = ${UNITTEST_LDADD} $(LIBGLOBAL_LDA)
-unittest_ipaddr_CXXFLAGS = ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS}
-check_PROGRAMS += unittest_ipaddr
-
-unittest_texttable_SOURCES = test/test_texttable.cc common/TextTable.cc
-unittest_texttable_LDFLAGS = $(PTHREAD_CFLAGS) ${AM_LDFLAGS}
-unittest_texttable_LDADD = librados.la ${UNITTEST_LDADD}
-unittest_texttable_CXXFLAGS = ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS}
-check_PROGRAMS += unittest_texttable
-
-if WITH_RADOSGW
-ceph_test_cors_SOURCES = test/test_cors.cc
-ceph_test_cors_LDADD = librados.la librgw.a $(LIBGLOBAL_LDA) ${UNITTEST_LDADD} ${UNITTEST_STATIC_LDADD} -lcurl -luuid -lexpat
-ceph_test_cors_CXXFLAGS = ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS}
-bin_DEBUGPROGRAMS += ceph_test_cors
-
-ceph_test_cls_rgw_meta_SOURCES = test/test_rgw_admin_meta.cc
-ceph_test_cls_rgw_meta_LDADD = librgw.a ${UNITTEST_LDADD} ${UNITTEST_STATIC_LDADD} $(LIBGLOBAL_LDA) $(CRYPTO_LIBS) -lcurl -luuid -lexpat librados.la libcls_version_client.a \
- libcls_log_client.a libcls_statelog_client.a libcls_refcount_client.a libcls_rgw_client.a libcls_lock_client.a
-ceph_test_cls_rgw_meta_CXXFLAGS = ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS}
-bin_DEBUGPROGRAMS += ceph_test_cls_rgw_meta
-
-ceph_test_cls_rgw_log_SOURCES = test/test_rgw_admin_log.cc
-ceph_test_cls_rgw_log_LDADD = librgw.a ${UNITTEST_LDADD} ${UNITTEST_STATIC_LDADD} ${LIBGLOBAL_LDA} $(CRYPTO_LIBS) -lcurl -luuid -lexpat librados.la libcls_version_client.a \
- libcls_log_client.a libcls_statelog_client.a libcls_refcount_client.a libcls_rgw_client.a libcls_lock_client.a
-ceph_test_cls_rgw_log_CXXFLAGS = ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS}
-bin_DEBUGPROGRAMS += ceph_test_cls_rgw_log
-
-ceph_test_cls_rgw_opstate_SOURCES = test/test_rgw_admin_opstate.cc
-ceph_test_cls_rgw_opstate_LDADD = librgw.a ${UNITTEST_LDADD} ${UNITTEST_STATIC_LDADD} ${LIBGLOBAL_LDA} $(CRYPTO_LIBS) -lcurl -luuid -lexpat librados.la libcls_version_client.a \
- libcls_log_client.a libcls_statelog_client.a libcls_refcount_client.a libcls_rgw_client.a libcls_lock_client.a
-ceph_test_cls_rgw_opstate_CXXFLAGS = ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS}
-bin_DEBUGPROGRAMS += ceph_test_cls_rgw_opstate
-endif
-
-ceph_test_librbd_SOURCES = test/librbd/test_librbd.cc test/librados/test.cc
-ceph_test_librbd_LDADD = librbd.la librados.la ${UNITTEST_STATIC_LDADD}
-ceph_test_librbd_CXXFLAGS = ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS}
-bin_DEBUGPROGRAMS += ceph_test_librbd
-
-ceph_test_librbd_fsx_SOURCES = test/librbd/fsx.c
-ceph_test_librbd_fsx_LDADD = librbd.la librados.la -lm
-ceph_test_librbd_fsx_CFLAGS = ${AM_CFLAGS} -Wno-format
-bin_DEBUGPROGRAMS += ceph_test_librbd_fsx
-
-ceph_test_cls_rbd_SOURCES = test/cls_rbd/test_cls_rbd.cc \
- test/librados/test.cc \
- cls/rbd/cls_rbd_client.cc \
- cls/lock/cls_lock_client.cc \
- cls/lock/cls_lock_types.cc \
- cls/lock/cls_lock_ops.cc
-ceph_test_cls_rbd_LDADD = librados.la ${UNITTEST_STATIC_LDADD}
-ceph_test_cls_rbd_CXXFLAGS = ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS}
-bin_DEBUGPROGRAMS += ceph_test_cls_rbd
-
-ceph_test_cls_refcount_SOURCES = test/cls_refcount/test_cls_refcount.cc \
- test/librados/test.cc
-ceph_test_cls_refcount_LDADD = librados.la libcls_refcount_client.a ${UNITTEST_STATIC_LDADD}
-ceph_test_cls_refcount_CXXFLAGS = ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS}
-bin_DEBUGPROGRAMS += ceph_test_cls_refcount
-
-ceph_test_cls_version_SOURCES = test/cls_version/test_cls_version.cc \
- test/librados/test.cc
-ceph_test_cls_version_LDADD = librados.la libcls_version_client.a ${UNITTEST_STATIC_LDADD}
-ceph_test_cls_version_CXXFLAGS = ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS}
-bin_DEBUGPROGRAMS += ceph_test_cls_version
-
-ceph_test_cls_log_SOURCES = test/cls_log/test_cls_log.cc \
- test/librados/test.cc
-ceph_test_cls_log_LDADD = librados.la libcls_log_client.a ${UNITTEST_STATIC_LDADD} ${LIBGLOBAL_LDA}
-ceph_test_cls_log_CXXFLAGS = ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS}
-bin_DEBUGPROGRAMS += ceph_test_cls_log
-
-ceph_test_cls_statelog_SOURCES = test/cls_statelog/test_cls_statelog.cc \
- test/librados/test.cc
-ceph_test_cls_statelog_LDADD = librados.la libcls_statelog_client.a ${UNITTEST_STATIC_LDADD} ${LIBGLOBAL_LDA}
-ceph_test_cls_statelog_CXXFLAGS = ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS}
-bin_DEBUGPROGRAMS += ceph_test_cls_statelog
-ceph_test_cls_replica_log_SOURCES = \
- test/cls_replica_log/test_cls_replica_log.cc \
- test/librados/test.cc
-ceph_test_cls_replica_log_LDADD = librados.la \
- libcls_replica_log_client.a ${UNITTEST_STATIC_LDADD} ${LIBGLOBAL_LDA}
-ceph_test_cls_replica_log_CXXFLAGS = ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS}
-bin_DEBUGPROGRAMS += ceph_test_cls_replica_log
-
-ceph_test_cls_lock_SOURCES = test/cls_lock/test_cls_lock.cc test/librados/test.cc
-ceph_test_cls_lock_LDFLAGS = ${AM_LDFLAGS}
-ceph_test_cls_lock_LDADD = libcls_lock_client.a librados.la ${UNITTEST_STATIC_LDADD}
-ceph_test_cls_lock_CXXFLAGS = ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS}
-bin_DEBUGPROGRAMS += ceph_test_cls_lock
-
-ceph_test_cls_hello_SOURCES = test/cls_hello/test_cls_hello.cc test/librados/test.cc
-ceph_test_cls_hello_LDADD = ${UNITTEST_LDADD} ${UNITTEST_STATIC_LDADD} $(LIBGLOBAL_LDA) $(CRYPTO_LIBS) librados.la
-ceph_test_cls_hello_CXXFLAGS = ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS}
-bin_DEBUGPROGRAMS += ceph_test_cls_hello
-
-if WITH_RADOSGW
-
-ceph_test_cls_rgw_SOURCES = test/cls_rgw/test_cls_rgw.cc \
- test/librados/test.cc
-ceph_test_cls_rgw_LDADD = librados.la libcls_rgw_client.a ${UNITTEST_STATIC_LDADD}
-ceph_test_cls_rgw_CXXFLAGS = ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS}
-bin_DEBUGPROGRAMS += ceph_test_cls_rgw
-
-endif
-
-ceph_test_mon_workloadgen_SOURCES = \
- test/mon/test_mon_workloadgen.cc \
- osdc/Objecter.cc \
- osdc/Striper.cc
-ceph_test_mon_workloadgen_LDADD = $(LIBOS_LDA) $(LIBGLOBAL_LDA)
-ceph_test_mon_workloadgen_CXXFLAGS = ${CRYPTO_CXXFLAGS} ${AM_CXXFLAGS}
-bin_DEBUGPROGRAMS += ceph_test_mon_workloadgen
-
-ceph_test_rados_api_cmd_SOURCES = test/librados/cmd.cc test/librados/test.cc
-ceph_test_rados_api_cmd_LDFLAGS = ${AM_LDFLAGS}
-ceph_test_rados_api_cmd_LDADD = librados.la ${UNITTEST_STATIC_LDADD}
-ceph_test_rados_api_cmd_CXXFLAGS = ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS}
-bin_DEBUGPROGRAMS += ceph_test_rados_api_cmd
-
-ceph_test_rados_api_io_SOURCES = test/librados/io.cc test/librados/test.cc
-ceph_test_rados_api_io_LDFLAGS = ${AM_LDFLAGS}
-ceph_test_rados_api_io_LDADD = librados.la ${UNITTEST_STATIC_LDADD}
-ceph_test_rados_api_io_CXXFLAGS = ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS}
-bin_DEBUGPROGRAMS += ceph_test_rados_api_io
-
-ceph_test_rados_api_aio_SOURCES = test/librados/aio.cc test/librados/test.cc
-ceph_test_rados_api_aio_LDFLAGS = ${AM_LDFLAGS}
-ceph_test_rados_api_aio_LDADD = librados.la ${UNITTEST_STATIC_LDADD}
-ceph_test_rados_api_aio_CXXFLAGS = ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS}
-bin_DEBUGPROGRAMS += ceph_test_rados_api_aio
-
-ceph_test_rados_api_list_SOURCES = test/librados/list.cc test/librados/test.cc
-ceph_test_rados_api_list_LDFLAGS = ${AM_LDFLAGS}
-ceph_test_rados_api_list_LDADD = librados.la ${UNITTEST_STATIC_LDADD}
-ceph_test_rados_api_list_CXXFLAGS = ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS}
-bin_DEBUGPROGRAMS += ceph_test_rados_api_list
-
-ceph_test_rados_api_pool_SOURCES = test/librados/pool.cc test/librados/test.cc
-ceph_test_rados_api_pool_LDFLAGS = ${AM_LDFLAGS}
-ceph_test_rados_api_pool_LDADD = librados.la ${UNITTEST_STATIC_LDADD}
-ceph_test_rados_api_pool_CXXFLAGS = ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS}
-bin_DEBUGPROGRAMS += ceph_test_rados_api_pool
-
-ceph_test_rados_api_stat_SOURCES = test/librados/stat.cc test/librados/test.cc
-ceph_test_rados_api_stat_LDFLAGS = ${AM_LDFLAGS}
-ceph_test_rados_api_stat_LDADD = librados.la ${UNITTEST_STATIC_LDADD}
-ceph_test_rados_api_stat_CXXFLAGS = ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS}
-bin_DEBUGPROGRAMS += ceph_test_rados_api_stat
-
-ceph_test_rados_api_watch_notify_SOURCES = test/librados/watch_notify.cc test/librados/test.cc
-ceph_test_rados_api_watch_notify_LDFLAGS = ${AM_LDFLAGS}
-ceph_test_rados_api_watch_notify_LDADD = librados.la ${UNITTEST_STATIC_LDADD}
-ceph_test_rados_api_watch_notify_CXXFLAGS = ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS}
-bin_DEBUGPROGRAMS += ceph_test_rados_api_watch_notify
-
-ceph_test_rados_api_snapshots_SOURCES = test/librados/snapshots.cc test/librados/test.cc
-ceph_test_rados_api_snapshots_LDFLAGS = ${AM_LDFLAGS}
-ceph_test_rados_api_snapshots_LDADD = librados.la ${UNITTEST_STATIC_LDADD}
-ceph_test_rados_api_snapshots_CXXFLAGS = ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS}
-bin_DEBUGPROGRAMS += ceph_test_rados_api_snapshots
-
-ceph_test_rados_api_cls_SOURCES = test/librados/cls.cc test/librados/test.cc
-ceph_test_rados_api_cls_LDFLAGS = ${AM_LDFLAGS}
-ceph_test_rados_api_cls_LDADD = librados.la ${UNITTEST_STATIC_LDADD}
-ceph_test_rados_api_cls_CXXFLAGS = ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS}
-bin_DEBUGPROGRAMS += ceph_test_rados_api_cls
-
-ceph_test_rados_api_misc_SOURCES = test/librados/misc.cc test/librados/test.cc
-ceph_test_rados_api_misc_LDFLAGS = ${AM_LDFLAGS}
-ceph_test_rados_api_misc_LDADD = librados.la $(LIBGLOBAL_LDA) ${UNITTEST_STATIC_LDADD}
-ceph_test_rados_api_misc_CXXFLAGS = ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS}
-bin_DEBUGPROGRAMS += ceph_test_rados_api_misc
-
-ceph_test_rados_api_lock_SOURCES = test/librados/lock.cc test/librados/test.cc
-ceph_test_rados_api_lock_LDFLAGS = ${AM_LDFLAGS}
-ceph_test_rados_api_lock_LDADD = librados.la ${UNITTEST_STATIC_LDADD}
-ceph_test_rados_api_lock_CXXFLAGS = ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS}
-bin_DEBUGPROGRAMS += ceph_test_rados_api_lock
-
-ceph_test_libcephfs_SOURCES = test/libcephfs/test.cc test/libcephfs/readdir_r_cb.cc test/libcephfs/caps.cc test/libcephfs/multiclient.cc
-ceph_test_libcephfs_LDFLAGS = $(PTHREAD_CFLAGS) ${AM_LDFLAGS}
-ceph_test_libcephfs_LDADD = ${UNITTEST_STATIC_LDADD} libcephfs.la
-ceph_test_libcephfs_CXXFLAGS = $(AM_CXXFLAGS) ${UNITTEST_CXXFLAGS}
-bin_DEBUGPROGRAMS += ceph_test_libcephfs
-
-ceph_test_filestore_SOURCES = test/filestore/store_test.cc
-ceph_test_filestore_LDFLAGS = ${AM_LDFLAGS}
-ceph_test_filestore_LDADD = ${UNITTEST_STATIC_LDADD} $(LIBOS_LDA) $(LIBGLOBAL_LDA)
-ceph_test_filestore_CXXFLAGS = ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS} ${CRYPTO_CXXFLAGS}
-bin_DEBUGPROGRAMS += ceph_test_filestore
-
-ceph_test_filestore_workloadgen_SOURCES = \
- test/filestore/workload_generator.cc \
- test/filestore/TestFileStoreState.cc
-ceph_test_filestore_workloadgen_LDFLAGS = ${AM_LDFLAGS}
-ceph_test_filestore_workloadgen_LDADD = $(LIBOS_LDA) $(LIBGLOBAL_LDA)
-ceph_test_filestore_workloadgen_CXXFLAGS = ${CRYPTO_CXXFLAGS} ${AM_CXXFLAGS}
-bin_DEBUGPROGRAMS += ceph_test_filestore_workloadgen
-
-ceph_test_filestore_idempotent_SOURCES = test/filestore/test_idempotent.cc test/filestore/FileStoreTracker.cc test/common/ObjectContents.cc
-ceph_test_filestore_idempotent_LDADD = $(LIBOS_LDA) $(LIBGLOBAL_LDA)
-ceph_test_filestore_idempotent_CXXFLAGS = $(AM_CXXFLAGS)
-bin_DEBUGPROGRAMS += ceph_test_filestore_idempotent
-
-ceph_test_filestore_idempotent_sequence_SOURCES = \
- test/filestore/test_idempotent_sequence.cc \
- test/filestore/DeterministicOpSequence.cc \
- test/filestore/TestFileStoreState.cc \
- test/filestore/FileStoreDiff.cc
-ceph_test_filestore_idempotent_sequence_CXXFLAGS = ${CRYPTO_CXXFLAGS} ${AM_CXXFLAGS}
-ceph_test_filestore_idempotent_sequence_LDADD = $(LIBOS_LDA) $(LIBGLOBAL_LDA)
-bin_DEBUGPROGRAMS += ceph_test_filestore_idempotent_sequence
-
-ceph_xattr_bench_SOURCES = test/xattr_bench.cc
-ceph_xattr_bench_LDFLAGS = ${AM_LDFLAGS}
-ceph_xattr_bench_LDADD = ${UNITTEST_STATIC_LDADD} $(LIBOS_LDA) $(LIBGLOBAL_LDA)
-ceph_xattr_bench_CXXFLAGS = ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS} ${CRYPTO_CXXFLAGS}
-bin_DEBUGPROGRAMS += ceph_xattr_bench
-
-ceph_test_filejournal_SOURCES = test/test_filejournal.cc
-ceph_test_filejournal_LDFLAGS = ${AM_LDFLAGS}
-ceph_test_filejournal_LDADD = ${UNITTEST_STATIC_LDADD} $(LIBOS_LDA) $(LIBGLOBAL_LDA)
-ceph_test_filejournal_CXXFLAGS = ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS}
-bin_DEBUGPROGRAMS += ceph_test_filejournal
-
-ceph_test_stress_watch_SOURCES = test/test_stress_watch.cc test/librados/test.cc
-ceph_test_stress_watch_LDFLAGS = ${AM_LDFLAGS}
-ceph_test_stress_watch_LDADD = librados.la ${UNITTEST_STATIC_LDADD}
-ceph_test_stress_watch_CXXFLAGS = ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS}
-bin_DEBUGPROGRAMS += ceph_test_stress_watch
-
-ceph_test_objectcacher_stress_SOURCES = test/osdc/object_cacher_stress.cc test/osdc/FakeWriteback.cc osdc/ObjectCacher.cc
-ceph_test_objectcacher_stress_LDFLAGS = ${AM_LDFLAGS}
-ceph_test_objectcacher_stress_LDADD = $(LIBGLOBAL_LDA)
-ceph_test_objectcacher_stress_CXXFLAGS = ${AM_CXXFLAGS}
-bin_DEBUGPROGRAMS += ceph_test_objectcacher_stress
-
-ceph_test_snap_mapper_SOURCES = test/test_snap_mapper.cc osd/SnapMapper.cc
-ceph_test_snap_mapper_LDFLAGS = ${AM_LDFLAGS}
-ceph_test_snap_mapper_LDADD = ${UNITTEST_STATIC_LDADD} $(LIBOS_LDA) $(LIBGLOBAL_LDA)
-ceph_test_snap_mapper_CXXFLAGS = ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS} $(LEVELDB_INCLUDE) ${CRYPTO_CXXFLAGS}
-bin_DEBUGPROGRAMS += ceph_test_snap_mapper
-
-ceph_test_object_map_SOURCES = test/ObjectMap/test_object_map.cc test/ObjectMap/KeyValueDBMemory.cc os/DBObjectMap.cc os/LevelDBStore.cc
-ceph_test_object_map_LDFLAGS = ${AM_LDFLAGS}
-ceph_test_object_map_LDADD = ${UNITTEST_STATIC_LDADD} $(LIBOS_LDA) $(LIBGLOBAL_LDA)
-ceph_test_object_map_CXXFLAGS = ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS} ${CRYPTO_CXXFLAGS}
-bin_DEBUGPROGRAMS += ceph_test_object_map
-
-ceph_test_keyvaluedb_atomicity_SOURCES = test/ObjectMap/test_keyvaluedb_atomicity.cc os/LevelDBStore.cc
-ceph_test_keyvaluedb_atomicity_LDFLAGS = ${AM_LDFLAGS}
-ceph_test_keyvaluedb_atomicity_LDADD = ${UNITTEST_STATIC_LDADD} $(LIBOS_LDA) $(LIBGLOBAL_LDA)
-ceph_test_keyvaluedb_atomicity_CXXFLAGS = ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS} ${CRYPTO_CXXFLAGS}
-bin_DEBUGPROGRAMS += ceph_test_keyvaluedb_atomicity
-
-ceph_test_keyvaluedb_iterators_SOURCES = test/ObjectMap/test_keyvaluedb_iterators.cc \
- test/ObjectMap/KeyValueDBMemory.cc \
- os/LevelDBStore.cc
-ceph_test_keyvaluedb_iterators_LDFLAGS = ${AM_LDFLAGS}
-ceph_test_keyvaluedb_iterators_LDADD = ${UNITTEST_STATIC_LDADD} $(LIBOS_LDA) $(LIBGLOBAL_LDA)
-ceph_test_keyvaluedb_iterators_CXXFLAGS = ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS} ${CRYPTO_CXXFLAGS}
-bin_DEBUGPROGRAMS += ceph_test_keyvaluedb_iterators
-
-ceph_test_store_tool_SOURCES = test/ObjectMap/test_store_tool/test_store_tool.cc \
- os/LevelDBStore.cc
-ceph_test_store_tool_LDFLAGS = ${AM_LDFLAGS}
-ceph_test_store_tool_LDADD = $(LIBOS_LDA) $(LIBGLOBAL_LDA)
-ceph_test_store_tool_CXXFLAGS = ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS}
-bin_DEBUGPROGRAMS += ceph_test_store_tool
-
-ceph_test_cfuse_cache_invalidate_SOURCES = test/test_cfuse_cache_invalidate.cc
-ceph_test_cfuse_cache_invalidate_LDFLAGS = ${AM_LDFLAGS}
-ceph_test_cfuse_cache_invalidate_LDADD =
-ceph_test_cfuse_cache_invalidate_CXXFLAGS = ${AM_CXXFLAGS}
-bin_DEBUGPROGRAMS += ceph_test_cfuse_cache_invalidate
# shell scripts
+
editpaths = sed \
-e 's|@bindir[@]|$(bindir)|g' \
-e 's|@sbindir[@]|$(sbindir)|g' \
@@ -1299,11 +140,8 @@ editpaths = sed \
-e 's|@datadir[@]|$(pkgdatadir)|g' \
-e 's|@prefix[@]|$(prefix)|g' \
-e 's|@@GCOV_PREFIX_STRIP[@][@]|$(GCOV_PREFIX_STRIP)|g'
-
-shell_scripts = init-ceph mkcephfs ceph-debugpack ceph-coverage ceph-post-file
-
+shell_scripts = ceph-debugpack ceph-post-file
$(shell_scripts): Makefile
-
$(shell_scripts): %: %.in
rm -f $@ $@.tmp
$(editpaths) '$(srcdir)/$@.in' >$@.tmp
@@ -1311,87 +149,26 @@ $(shell_scripts): %: %.in
chmod a-w $@.tmp
mv $@.tmp $@
-BUILT_SOURCES += init-ceph
-sbin_SCRIPTS += mkcephfs
-
-bin_SCRIPTS += ceph-coverage
-
+EXTRA_DIST += $(srcdir)/$(shell_scripts:%=%.in)
CLEANFILES += $(shell_scripts)
-CLEANFILES += ceph_ver.h sample.fetch_config
-
-##
-
-AM_COMMON_FLAGS = \
- -D__CEPH__ \
- -D_FILE_OFFSET_BITS=64 \
- -D_REENTRANT \
- -D_THREAD_SAFE \
- -D__STDC_FORMAT_MACROS \
- -D_GNU_SOURCE \
- -Wall \
- ${WARN_TYPE_LIMITS} \
- ${WARN_IGNORED_QUALIFIERS} \
- -Winit-self \
- -Wpointer-arith \
- -Werror=format-security \
- -fno-strict-aliasing \
- -fsigned-char
-if !CLANG
- AM_COMMON_FLAGS += -rdynamic
-endif
-
-AM_CFLAGS = $(AM_COMMON_FLAGS)
-AM_CXXFLAGS = \
- @AM_CXXFLAGS@ \
- $(AM_COMMON_FLAGS) \
- -DCEPH_LIBDIR=\"${libdir}\" \
- -Wnon-virtual-dtor \
- -Wno-invalid-offsetof
-
-if ENABLE_FPU_NEON
-AM_CFLAGS += -mfpu=neon
-AM_CXXFLAGS += -mfpu=neon
-endif
-
-if !CLANG
- AM_CXXFLAGS += -Wstrict-null-sentinel
-endif
-# note: this is position dependant, it affects the -l options that
-# come after it on the command line. when you use ${AM_LDFLAGS} in
-# later rules, take care where you place it. for more information, see
-# http://blog.flameeyes.eu/2008/11/19/relationship-between-as-needed-and-no-undefined-part-1-what-do-they-do
-# http://blog.flameeyes.eu/2008/11/20/misguided-link-and-as-needed
-# http://www.gentoo.org/proj/en/qa/asneeded.xml
-# http://gcc.gnu.org/ml/gcc-help/2010-12/msg00338.html
-# http://sigquit.wordpress.com/2011/02/16/why-asneeded-doesnt-work-as-expected-for-your-libraries-on-your-autotools-project/
-AM_LDFLAGS = -Wl,--as-needed
-
-if USE_BOOST_SPIRIT_OLD_HDR
-AM_CXXFLAGS += -DUSE_BOOST_SPIRIT_OLD_HDR
-endif
-
-if WITH_LIBATOMIC
-AM_LDFLAGS += -latomic_ops
-endif
-
-if ENABLE_COVERAGE
-AM_CFLAGS += -fprofile-arcs -ftest-coverage
-AM_CXXFLAGS += -fprofile-arcs -ftest-coverage -O0
-EXTRALIBS += -lgcov
-endif
# extra bits
+
EXTRA_DIST += \
- $(srcdir)/verify-mds-journal.sh $(srcdir)/vstart.sh $(srcdir)/stop.sh \
- ceph-run $(srcdir)/ceph_common.sh \
+ $(srcdir)/verify-mds-journal.sh \
+ $(srcdir)/vstart.sh \
+ $(srcdir)/stop.sh \
+ ceph-run \
+ $(srcdir)/ceph_common.sh \
$(srcdir)/init-radosgw \
$(srcdir)/init-radosgw.sysv \
$(srcdir)/init-rbdmap \
- $(srcdir)/ceph-clsinfo $(srcdir)/make_version $(srcdir)/check_version \
+ $(srcdir)/ceph-clsinfo \
+ $(srcdir)/make_version \
+ $(srcdir)/check_version \
$(srcdir)/.git_version \
$(srcdir)/ceph-rbdnamer \
- $(ceph_tool_gui_DATA) \
$(srcdir)/test/encoding/readable.sh \
$(srcdir)/test/encoding/check-generated.sh \
$(srcdir)/upstart/ceph-all.conf \
@@ -1414,21 +191,39 @@ EXTRA_DIST += \
ceph-disk-activate \
ceph-disk-udev \
ceph-create-keys \
- mount.fuse.ceph \
ceph-rest-api \
mount.fuse.ceph \
- rbdmap
+ rbdmap \
+ unittest_bufferlist.sh \
+ yasm-wrapper
-EXTRA_DIST += $(srcdir)/$(shell_scripts:%=%.in)
+EXTRA_DIST += \
+ libs3/COPYING \
+ libs3/ChangeLog \
+ libs3/GNUmakefile \
+ libs3/GNUmakefile.mingw \
+ libs3/GNUmakefile.osx \
+ libs3/INSTALL \
+ libs3/LICENSE \
+ libs3/README \
+ libs3/TODO \
+ libs3/archlinux \
+ libs3/debian \
+ libs3/doxyfile \
+ libs3/inc \
+ libs3/libs3.spec \
+ libs3/mswin \
+ libs3/src \
+ libs3/test \
+ unittest_bufferlist.sh
# work around old versions of automake that don't define $docdir
# NOTE: this won't work on suse, where docdir is /usr/share/doc/packages/$package.
docdir ?= ${datadir}/doc/ceph
-
doc_DATA = $(srcdir)/sample.ceph.conf sample.fetch_config
-sample.fetch_config: fetch_config
- cp -f $(srcdir)/fetch_config ./sample.fetch_config
+
+# various scripts
shell_commondir = $(libdir)/ceph
shell_common_SCRIPTS = ceph_common.sh
@@ -1439,31 +234,53 @@ bash_completion_DATA = $(srcdir)/bash_completion/ceph \
$(srcdir)/bash_completion/rbd \
$(srcdir)/bash_completion/radosgw-admin
-libcephfs_includedir = $(includedir)/cephfs
-libcephfs_include_DATA = $(srcdir)/include/cephfs/libcephfs.h
-
-librbd_includedir = $(includedir)/rbd
-librbd_include_DATA = \
- $(srcdir)/include/rbd/features.h \
- $(srcdir)/include/rbd/librbd.h \
- $(srcdir)/include/rbd/librbd.hpp
-
-rados_includedir = $(includedir)/rados
-rados_include_DATA = \
- $(srcdir)/include/rados/librados.h \
- $(srcdir)/include/rados/rados_types.h \
- $(srcdir)/include/rados/rados_types.hpp \
- $(srcdir)/include/rados/librados.hpp \
- $(srcdir)/include/buffer.h \
- $(srcdir)/include/page.h \
- $(srcdir)/include/crc32c.h
-
-#crush_includedir = $(includedir)/crush
-#crush_include_DATA = \
-# $(srcdir)/crush/hash.h \
-# $(srcdir)/crush/crush.h \
-# $(srcdir)/crush/mapper.h \
-# $(srcdir)/crush/types.h
+ceph_sbin_SCRIPTS = \
+ ceph-disk \
+ ceph-disk-prepare \
+ ceph-disk-activate \
+ ceph-disk-udev \
+ ceph-create-keys
+
+bin_SCRIPTS += \
+ ceph \
+ ceph-run \
+ ceph-rest-api \
+ ceph-clsinfo \
+ ceph-debugpack \
+ ceph-rbdnamer \
+ ceph-post-file
+
+BUILT_SOURCES += init-ceph
+sbin_SCRIPTS += mkcephfs
+
+shell_scripts += init-ceph mkcephfs
+
+
+
+
+
+# tests to actually run on "make check"; if you need extra, non-test,
+# executables built, you need to replace this with manual assignments
+# target by target
+
+TESTS = $(check_PROGRAMS) unittest_bufferlist.sh
+
+check-local:
+ $(srcdir)/test/encoding/check-generated.sh
+ $(srcdir)/test/encoding/readable.sh ../ceph-object-corpus
+
+
+# base targets
+
+core-daemons: ceph-mon ceph-osd ceph-mds radosgw
+admin-tools: monmaptool osdmaptool crushtool ceph-authtool
+base: core-daemons admin-tools \
+ cephfs ceph-syn ceph-conf \
+ rados librados-config \
+ init-ceph mkcephfs ceph_mon_store_converter ceph-post-file
+
+
+# version stuff
FORCE:
.git_version: FORCE
@@ -1475,6 +292,15 @@ ceph_ver.c: ./ceph_ver.h
common/version.cc: ./ceph_ver.h
test/encoding/ceph_dencoder.cc: ./ceph_ver.h
+sample.fetch_config: fetch_config
+ cp -f $(srcdir)/fetch_config ./sample.fetch_config
+
+dist-hook:
+ $(srcdir)/check_version $(srcdir)/.git_version
+
+CLEANFILES += ceph_ver.h sample.fetch_config
+
+
# assemble Python script with global version variables
# NB: depends on format of ceph_ver.h
@@ -1491,289 +317,12 @@ ceph: ceph.in ./ceph_ver.h Makefile
mv $@.tmp $@
# cleaning
+
clean-local:
-rm *.so *.gcno *.gcda
-# libs
-
-CCAS = ${srcdir}/yasm-wrapper
-AM_CCASFLAGS = -f elf64
-
-# crc
-libcrc_la_SOURCES = \
- common/sctp_crc32.c \
- common/crc32c.cc \
- common/crc32c_intel_baseline.c \
- common/crc32c_intel_fast.c
-
-if WITH_GOOD_YASM_ELF64
-libcrc_la_SOURCES += common/crc32c_intel_fast_asm.S
-libcrc_la_LIBTOOLFLAGS = --tag=CC
-endif
-
-noinst_LTLIBRARIES += libcrc.la
-
-# common
-libcommon_la_SOURCES = $(libcommon_files)
-libcommon_la_CFLAGS= ${CRYPTO_CFLAGS} ${AM_CFLAGS}
-libcommon_la_CXXFLAGS= ${AM_CXXFLAGS}
-libcommon_la_LDFLAGS = -lrt
-libcommon_la_LIBADD = libcrc.la
-noinst_LTLIBRARIES += libcommon.la
-
-crush_files = \
- crush/builder.c \
- crush/mapper.c \
- crush/crush.c \
- crush/hash.c \
- crush/CrushWrapper.cc \
- crush/CrushCompiler.cc \
- crush/CrushTester.cc
-
-# this list ommits the ceph_ver.c file
-libcommon_files = \
- ./ceph_ver.c \
- arch/probe.cc \
- arch/intel.c \
- arch/neon.c \
- auth/AuthAuthorizeHandler.cc \
- auth/AuthClientHandler.cc \
- auth/AuthSessionHandler.cc \
- auth/AuthMethodList.cc \
- auth/cephx/CephxAuthorizeHandler.cc \
- auth/cephx/CephxClientHandler.cc \
- auth/cephx/CephxProtocol.cc \
- auth/cephx/CephxSessionHandler.cc \
- auth/none/AuthNoneAuthorizeHandler.cc \
- auth/unknown/AuthUnknownAuthorizeHandler.cc \
- auth/Crypto.cc \
- auth/KeyRing.cc \
- auth/RotatingKeyRing.cc \
- common/DecayCounter.cc \
- common/LogClient.cc \
- common/LogEntry.cc \
- common/PrebufferedStreambuf.cc \
- common/BackTrace.cc \
- common/perf_counters.cc \
- common/Mutex.cc \
- common/OutputDataSocket.cc \
- common/admin_socket.cc \
- common/admin_socket_client.cc \
- common/cmdparse.cc \
- common/escape.c \
- common/Clock.cc \
- common/Throttle.cc \
- common/Timer.cc \
- common/Finisher.cc \
- common/environment.cc\
- common/assert.cc \
- common/run_cmd.cc \
- common/WorkQueue.cc \
- common/ConfUtils.cc \
- common/MemoryModel.cc \
- common/armor.c \
- common/fd.cc \
- common/xattr.c \
- common/safe_io.c \
- common/snap_types.cc \
- common/str_list.cc \
- common/errno.cc \
- json_spirit/json_spirit_reader.cpp \
- json_spirit/json_spirit_writer.cpp \
- json_spirit/json_spirit_value.cpp \
- log/Log.cc \
- log/SubsystemMap.cc \
- mon/MonCap.cc \
- mon/MonClient.cc \
- mon/MonMap.cc \
- msg/Accepter.cc \
- msg/DispatchQueue.cc \
- msg/Message.cc \
- common/RefCountedObj.cc \
- msg/Messenger.cc \
- msg/Pipe.cc \
- msg/SimpleMessenger.cc \
- msg/msg_types.cc \
- os/hobject.cc \
- osd/OSDMap.cc \
- osd/osd_types.cc \
- mds/MDSMap.cc \
- mds/inode_backtrace.cc \
- mds/mdstypes.cc \
- common/blkdev.cc \
- common/common_init.cc \
- common/pipe.c \
- common/ceph_argparse.cc \
- common/ceph_context.cc \
- common/buffer.cc \
- common/code_environment.cc \
- common/dout.cc \
- common/signal.cc \
- common/simple_spin.cc \
- common/Thread.cc \
- common/Formatter.cc \
- common/HeartbeatMap.cc \
- include/ceph_fs.cc \
- include/ceph_hash.cc \
- include/ceph_strings.cc \
- include/ceph_frag.cc \
- common/config.cc \
- common/utf8.c \
- common/mime.c \
- common/strtol.cc \
- common/page.cc \
- common/lockdep.cc \
- common/version.cc \
- common/hex.cc \
- common/entity_name.cc \
- common/ceph_crypto.cc \
- common/ceph_crypto_cms.cc \
- common/ceph_json.cc \
- common/ipaddr.cc \
- common/pick_address.cc \
- include/addr_parsing.c \
- $(crush_files)
-
-if WITH_PROFILER
-libcommon_files += perfglue/cpu_profiler.cc
-else
-libcommon_files += perfglue/disabled_stubs.cc
-endif
-
-# global
-libglobal_la_SOURCES = \
- global/global_context.cc \
- global/global_init.cc \
- global/pidfile.cc \
- global/signal_handler.cc
-libglobal_la_CFLAGS= ${CRYPTO_CFLAGS} ${AM_CFLAGS}
-libglobal_la_CXXFLAGS= ${AM_CXXFLAGS}
-libglobal_la_LIBADD= libcommon.la
-noinst_LTLIBRARIES += libglobal.la
-
-
-libmon_a_SOURCES = \
- auth/cephx/CephxKeyServer.cc \
- auth/cephx/CephxServiceHandler.cc \
- auth/cephx/CephxSessionHandler.cc \
- auth/AuthServiceHandler.cc \
- auth/AuthSessionHandler.cc \
- mon/Monitor.cc \
- mon/Paxos.cc \
- mon/PaxosService.cc \
- mon/OSDMonitor.cc \
- mon/MDSMonitor.cc \
- mon/MonmapMonitor.cc \
- mon/PGMonitor.cc \
- mon/PGMap.cc \
- mon/LogMonitor.cc \
- mon/AuthMonitor.cc \
- mon/Elector.cc \
- mon/MonitorStore.cc \
- os/LevelDBStore.cc \
- mon/HealthMonitor.cc \
- mon/DataHealthService.cc \
- mon/ConfigKeyService.cc \
- common/util.cc \
- common/TextTable.cc
-libmon_a_CXXFLAGS= ${AM_CXXFLAGS}
-noinst_LIBRARIES += libmon.a
-
-libmds_a_SOURCES = \
- mds/Anchor.cc \
- mds/Capability.cc \
- mds/Dumper.cc \
- mds/Resetter.cc \
- mds/MDS.cc \
- mds/flock.cc \
- mds/locks.c \
- mds/journal.cc \
- mds/Server.cc \
- mds/Mutation.cc \
- mds/MDCache.cc \
- mds/Locker.cc \
- mds/Migrator.cc \
- mds/MDBalancer.cc \
- mds/CDentry.cc \
- mds/CDir.cc \
- mds/CInode.cc \
- mds/LogEvent.cc \
- mds/MDSTable.cc \
- mds/InoTable.cc \
- mds/MDSTableClient.cc \
- mds/MDSTableServer.cc \
- mds/AnchorServer.cc \
- mds/AnchorClient.cc \
- mds/SnapRealm.cc \
- mds/SnapServer.cc \
- mds/snap.cc \
- mds/SessionMap.cc \
- mds/MDLog.cc \
- osdc/Journaler.cc
-noinst_LIBRARIES += libmds.a
-
-libos_a_SOURCES = \
- os/FileJournal.cc \
- os/FileStore.cc \
- os/chain_xattr.cc \
- os/ObjectStore.cc \
- os/JournalingObjectStore.cc \
- os/LFNIndex.cc \
- os/HashIndex.cc \
- os/IndexManager.cc \
- os/FlatIndex.cc \
- os/DBObjectMap.cc \
- os/LevelDBStore.cc \
- os/WBThrottle.cc \
- os/BtrfsFileStoreBackend.cc \
- os/GenericFileStoreBackend.cc \
- os/ZFSFileStoreBackend.cc
-libos_a_CXXFLAGS= ${AM_CXXFLAGS}
-noinst_LIBRARIES += libos.a
-
-if WITH_LIBZFS
-libos_zfs_a_SOURCES = os/ZFS.cc
-libos_zfs_a_CXXFLAGS= ${AM_CXXFLAGS} ${LIBZFS_CFLAGS}
-noinst_LIBRARIES += libos_zfs.a
-endif
-
-libosd_a_SOURCES = \
- osd/PG.cc \
- osd/PGLog.cc \
- osd/ReplicatedPG.cc \
- osd/Ager.cc \
- osd/OSD.cc \
- osd/OSDCap.cc \
- osd/Watch.cc \
- osd/ClassHandler.cc \
- osd/OpRequest.cc \
- osd/SnapMapper.cc \
- objclass/class_api.cc
-libosd_a_CXXFLAGS = ${AM_CXXFLAGS}
-noinst_LIBRARIES += libosd.a
-
-libosdc_la_SOURCES = \
- osdc/Objecter.cc \
- osdc/ObjectCacher.cc \
- osdc/Filer.cc \
- osdc/Striper.cc
-libosdc_la_CXXFLAGS= ${AM_CXXFLAGS}
-libosdc_la_LIBADD = libcommon.la
-noinst_LTLIBRARIES += libosdc.la
-
-libclient_la_SOURCES = \
- client/Client.cc \
- client/Inode.cc \
- client/Dentry.cc \
- client/MetaRequest.cc \
- client/ClientSnapRealm.cc \
- client/MetaSession.cc \
- client/Trace.cc
-libclient_la_LIBADD = libosdc.la $(LIBEDIT_LIBS)
-noinst_LTLIBRARIES += libclient.la
-dist-hook:
- $(srcdir)/check_version $(srcdir)/.git_version
+# pybind
python_PYTHON = pybind/rados.py \
pybind/rbd.py \
@@ -1781,598 +330,29 @@ python_PYTHON = pybind/rados.py \
pybind/ceph_argparse.py \
pybind/ceph_rest_api.py
-# headers... and everything else we want to include in a 'make dist'
-# that autotools doesn't magically identify.
-noinst_HEADERS = \
- rados_sync.h \
- arch/probe.h \
- arch/intel.h \
- arch/neon.h \
- auth/cephx/CephxAuthorizeHandler.h\
- auth/cephx/CephxKeyServer.h\
- auth/cephx/CephxProtocol.h\
- auth/cephx/CephxClientHandler.h\
- auth/cephx/CephxServiceHandler.h\
- auth/cephx/CephxSessionHandler.h\
- auth/none/AuthNoneAuthorizeHandler.h\
- auth/none/AuthNoneClientHandler.h\
- auth/none/AuthNoneServiceHandler.h\
- auth/none/AuthNoneSessionHandler.h\
- auth/none/AuthNoneProtocol.h\
- auth/unknown/AuthUnknownAuthorizeHandler.h\
- auth/unknown/AuthUnknownClientHandler.h\
- auth/unknown/AuthUnknownServiceHandler.h\
- auth/unknown/AuthUnknownSessionHandler.h\
- auth/unknown/AuthUnknownProtocol.h\
- auth/Auth.h\
- auth/AuthMethodList.h\
- auth/AuthClientHandler.h\
- auth/AuthServiceHandler.h\
- auth/AuthSessionHandler.h\
- auth/AuthAuthorizeHandler.h\
- auth/KeyRing.h\
- auth/RotatingKeyRing.h\
- auth/Crypto.h\
- bash_completion/ceph\
- bash_completion/rados\
- bash_completion/rbd\
- bash_completion/radosgw-admin\
- client/Client.h\
- client/Dentry.h\
- client/Dir.h\
- client/Fh.h\
- client/Inode.h\
- client/MetaRequest.h\
- client/MetaSession.h\
- client/ClientSnapRealm.h\
- client/SyntheticClient.h\
- client/Trace.h\
- client/fuse_ll.h\
- client/ioctl.h\
- client/hadoop/CephFSInterface.h\
- client/ObjecterWriteback.h\
+
+# everything else we want to include in a 'make dist'
+
+noinst_HEADERS += \
cls_acl.cc\
cls_crypto.cc\
- cls/lock/cls_lock_types.h\
- cls/lock/cls_lock_ops.h\
- cls/lock/cls_lock_client.h\
- cls/rbd/cls_rbd.h\
- cls/rbd/cls_rbd_client.h\
- cls/refcount/cls_refcount_ops.h\
- cls/refcount/cls_refcount_client.h\
- cls/version/cls_version_types.h\
- cls/version/cls_version_ops.h\
- cls/version/cls_version_client.h\
- cls/log/cls_log_types.h\
- cls/log/cls_log_ops.h\
- cls/log/cls_log_client.h\
- cls/statelog/cls_statelog_types.h\
- cls/statelog/cls_statelog_ops.h\
- cls/statelog/cls_statelog_client.h\
- cls/replica_log/cls_replica_log_types.h\
- cls/replica_log/cls_replica_log_ops.h\
- cls/replica_log/cls_replica_log_client.h\
- cls/rgw/cls_rgw_client.h\
- cls/rgw/cls_rgw_ops.h\
- cls/rgw/cls_rgw_types.h\
- common/BackTrace.h\
- common/RefCountedObj.h\
- common/HeartbeatMap.h\
- common/LogClient.h\
- common/LogEntry.h\
- common/Preforker.h\
- common/WorkQueue.h\
- common/PrioritizedQueue.h\
- common/ceph_argparse.h\
- common/ceph_context.h\
- common/xattr.h\
- common/blkdev.h\
- common/compiler_extensions.h\
- common/debug.h\
- common/dout.h\
- common/escape.h\
- common/fd.h\
- common/version.h\
- common/hex.h\
- common/entity_name.h\
- common/errno.h\
- common/environment.h\
- common/likely.h\
- common/lockdep.h\
- common/obj_bencher.h\
- common/snap_types.h\
- common/Clock.h\
- common/Cond.h\
- common/ConfUtils.h\
- common/DecayCounter.h\
- common/Finisher.h\
- common/Formatter.h\
- common/perf_counters.h\
- common/OutputDataSocket.h \
- common/admin_socket.h \
- common/admin_socket_client.h \
- common/shared_cache.hpp \
- common/tracked_int_ptr.hpp \
- common/simple_cache.hpp \
- common/sharedptr_registry.hpp \
- common/map_cacher.hpp \
- common/MemoryModel.h\
- common/Mutex.h\
- common/PrebufferedStreambuf.h\
- common/RWLock.h\
- common/Semaphore.h\
- common/SimpleRNG.h\
- common/TextTable.h\
- common/Thread.h\
- common/Throttle.h\
- common/Timer.h\
- common/TrackedOp.h\
- common/arch.h\
- common/armor.h\
- global/global_init.h \
- global/global_context.h \
- common/common_init.h\
- common/pipe.h\
- common/code_environment.h \
- common/signal.h\
- global/signal_handler.h\
- common/simple_spin.h\
- common/run_cmd.h\
- common/safe_io.h\
- common/config.h\
- common/config_obs.h\
- common/config_opts.h\
- common/ceph_crypto.h\
- common/ceph_crypto_cms.h\
- common/ceph_json.h\
- common/crc32c_intel_baseline.h\
- common/crc32c_intel_fast.h\
- common/lru_map.h\
- common/utf8.h\
- common/mime.h\
- common/pick_address.h\
- common/sctp_crc32.h\
- common/secret.h\
- common/strtol.h\
- common/static_assert.h\
- common/AsyncReserver.h\
- crush/CrushCompiler.h\
- crush/CrushTester.h\
- crush/CrushWrapper.h\
- crush/CrushWrapper.i\
- crush/builder.h\
- crush/crush.h\
- crush/grammar.h\
- crush/hash.h\
- crush/mapper.h\
- crush/sample.txt\
- crush/types.h\
fetch_config\
- include/bloom_filter.hpp\
- include/Context.h\
- include/CompatSet.h\
- include/Distribution.h\
- include/addr_parsing.h\
- include/assert.h\
- include/atomic.h\
- include/bitmapper.h\
- include/blobhash.h\
- include/buffer.h\
- include/byteorder.h\
- include/cephfs/libcephfs.h\
- include/ceph_features.h\
- include/ceph_frag.h\
- include/ceph_fs.h\
- include/ceph_hash.h\
- include/cmp.h\
- include/color.h\
- include/compat.h\
- include/crc32c.h\
- include/encoding.h\
- include/err.h\
- include/error.h\
- include/filepath.h\
- include/frag.h\
- include/hash.h\
- include/intarith.h\
- include/interval_set.h\
- include/inttypes.h\
- include/ipaddr.h\
- include/linux_fiemap.h\
- include/lru.h\
- include/msgr.h\
- include/object.h\
- include/page.h\
- include/rangeset.h\
- include/rados.h\
- include/rbd_types.h\
- include/statlite.h\
- include/str_list.h\
- include/stringify.h\
- include/triple.h\
- include/types.h\
- include/utime.h\
- include/dlist.h\
- include/elist.h\
- include/uuid.h\
- include/xlist.h\
- include/rados/librados.h\
- include/rados/rados_types.h\
- include/rados/rados_types.hpp\
- include/rados/librados.hpp\
- include/rados/librgw.h\
- include/rados/page.h\
- include/rados/crc32c.h\
- include/rados/buffer.h\
- include/rbd/features.h\
- include/rbd/librbd.h\
- include/rbd/librbd.hpp\
- include/util.h\
- librados/snap_set_diff.h\
- librados/AioCompletionImpl.h\
- librados/IoCtxImpl.h\
- librados/PoolAsyncCompletionImpl.h\
- librados/RadosClient.h\
- librbd/AioCompletion.h\
- librbd/AioRequest.h\
- librbd/ImageCtx.h\
- librbd/internal.h\
- librbd/LibrbdWriteback.h\
- librbd/parent_types.h\
- librbd/SnapInfo.h\
- librbd/WatchCtx.h\
logrotate.conf\
- json_spirit/json_spirit.h\
- json_spirit/json_spirit_error_position.h\
- json_spirit/json_spirit_reader.h\
- json_spirit/json_spirit_reader_template.h\
- json_spirit/json_spirit_stream_reader.h\
- json_spirit/json_spirit_utils.h\
- json_spirit/json_spirit_value.h\
- json_spirit/json_spirit_writer.h\
- json_spirit/json_spirit_writer_options.h\
- json_spirit/json_spirit_writer_template.h\
- key_value_store/key_value_structure.h\
- key_value_store/kv_flat_btree_async.h\
- key_value_store/kvs_arg_types.h\
- log/Entry.h\
- log/EntryQueue.h\
- log/Log.h\
- log/SubsystemMap.h\
- mds/inode_backtrace.h\
- mds/flock.h\
- mds/locks.c\
- mds/locks.h\
- mds/Anchor.h\
- mds/AnchorClient.h\
- mds/AnchorServer.h\
- mds/CDentry.h\
- mds/CDir.h\
- mds/CInode.h\
- mds/Capability.h\
- mds/Dumper.h\
- mds/InoTable.h\
- mds/LocalLock.h\
- mds/Locker.h\
- mds/LogEvent.h\
- mds/LogSegment.h\
- mds/MDBalancer.h\
- mds/MDCache.h\
- mds/MDLog.h\
- mds/MDS.h\
- mds/MDSMap.h\
- mds/MDSTable.h\
- mds/MDSTableServer.h\
- mds/MDSTableClient.h\
- mds/Mutation.h\
- mds/Migrator.h\
- mds/Resetter.h\
- mds/ScatterLock.h\
- mds/Server.h\
- mds/SessionMap.h\
- mds/SimpleLock.h\
- mds/SnapClient.h\
- mds/SnapRealm.h\
- mds/SnapServer.h\
- mds/events/ECommitted.h\
- mds/events/EExport.h\
- mds/events/EFragment.h\
- mds/events/EImportFinish.h\
- mds/events/EImportStart.h\
- mds/events/EMetaBlob.h\
- mds/events/EOpen.h\
- mds/events/EResetJournal.h\
- mds/events/ESession.h\
- mds/events/ESessions.h\
- mds/events/ESlaveUpdate.h\
- mds/events/ESubtreeMap.h\
- mds/events/ETableClient.h\
- mds/events/ETableServer.h\
- mds/events/EUpdate.h\
- mds/mds_table_types.h\
- mds/mdstypes.h\
- mds/snap.h\
- messages/MAuth.h\
- messages/MAuthReply.h\
- messages/MCacheExpire.h\
- messages/MClientCaps.h\
- messages/MClientCapRelease.h\
- messages/MClientLease.h\
- messages/MClientReconnect.h\
- messages/MClientReply.h\
- messages/MClientRequest.h\
- messages/MClientRequestForward.h\
- messages/MClientSession.h\
- messages/MClientSnap.h\
- messages/MCommand.h\
- messages/MCommandReply.h\
- messages/MDentryLink.h\
- messages/MDentryUnlink.h\
- messages/MDirUpdate.h\
- messages/MDiscover.h\
- messages/MDiscoverReply.h\
- messages/MExportCaps.h\
- messages/MExportCapsAck.h\
- messages/MExportDir.h\
- messages/MExportDirAck.h\
- messages/MExportDirCancel.h\
- messages/MExportDirDiscover.h\
- messages/MExportDirDiscoverAck.h\
- messages/MExportDirFinish.h\
- messages/MExportDirNotify.h\
- messages/MExportDirNotifyAck.h\
- messages/MExportDirPrep.h\
- messages/MExportDirPrepAck.h\
- messages/MGenericMessage.h\
- messages/MGetPoolStats.h\
- messages/MGetPoolStatsReply.h\
- messages/MHeartbeat.h\
- messages/MInodeFileCaps.h\
- messages/MLock.h\
- messages/MLog.h\
- messages/MLogAck.h\
- messages/MMDSBeacon.h\
- messages/MMDSCacheRejoin.h\
- messages/MMDSLoadTargets.h\
- messages/MMDSFindIno.h\
- messages/MMDSFindInoReply.h\
- messages/MMDSFragmentNotify.h\
- messages/MMDSMap.h\
- messages/MMDSOpenIno.h \
- messages/MMDSOpenInoReply.h \
- messages/MMDSResolve.h\
- messages/MMDSResolveAck.h\
- messages/MMDSSlaveRequest.h\
- messages/MMDSTableRequest.h\
- messages/MMonCommand.h\
- messages/MMonCommandAck.h\
- messages/MMonElection.h\
- messages/MMonGetMap.h\
- messages/MMonGetVersion.h\
- messages/MMonGetVersionReply.h\
- messages/MMonGlobalID.h\
- messages/MMonHealth.h\
- messages/MMonJoin.h\
- messages/MMonMap.h\
- messages/MMonPaxos.h\
- messages/MMonProbe.h\
- messages/MMonScrub.h \
- messages/MMonSubscribe.h\
- messages/MMonSubscribeAck.h\
- messages/MMonSync.h \
- messages/MOSDAlive.h\
- messages/MOSDBoot.h\
- messages/MOSDFailure.h\
- messages/MOSDMarkMeDown.h\
- messages/MOSDMap.h\
- messages/MOSDOp.h\
- messages/MOSDOpReply.h\
- messages/MOSDPGBackfill.h\
- messages/MOSDPGCreate.h\
- messages/MOSDPGPush.h\
- messages/MOSDPGPull.h\
- messages/MOSDPGPushReply.h\
- messages/MOSDPGInfo.h\
- messages/MOSDPGLog.h\
- messages/MOSDPGMissing.h\
- messages/MOSDPGNotify.h\
- messages/MOSDPGQuery.h\
- messages/MOSDPGRemove.h\
- messages/MOSDPGScan.h\
- messages/MBackfillReserve.h\
- messages/MRecoveryReserve.h\
- messages/MMonQuorumService.h\
- messages/MOSDPGTemp.h\
- messages/MOSDPGTrim.h\
- messages/MOSDPing.h\
- messages/MOSDRepScrub.h\
- messages/MOSDScrub.h\
- messages/MOSDSubOp.h\
- messages/MOSDSubOpReply.h\
- messages/MPGStats.h\
- messages/MPGStatsAck.h\
- messages/MPing.h\
- messages/MPoolOp.h\
- messages/MPoolOpReply.h\
- messages/MRemoveSnaps.h\
- messages/MRoute.h\
- messages/MForward.h\
- messages/MStatfs.h\
- messages/MStatfsReply.h\
- messages/MTimeCheck.h\
- messages/MWatchNotify.h\
- messages/PaxosServiceMessage.h\
- mon/AuthMonitor.h\
- mon/DataHealthService.h\
- mon/Elector.h\
- mon/LogMonitor.h\
- mon/ConfigKeyService.h\
- mon/HealthMonitor.h\
- mon/HealthService.h\
- mon/MDSMonitor.h\
- mon/MonmapMonitor.h\
- mon/MonCap.h\
- mon/MonClient.h\
- mon/MonCommands.h\
- mon/MonMap.h\
- mon/Monitor.h\
- mon/MonitorStore.h\
- mon/MonitorDBStore.h\
- mon/OSDMonitor.h\
- mon/PGMap.h\
- mon/PGMonitor.h\
- mon/Paxos.h\
- mon/PaxosService.h\
- mon/QuorumService.h\
- mon/Session.h\
- mon/mon_types.h\
- mount/canonicalize.c\
- mount/mtab.c\
- msg/Accepter.h\
- msg/DispatchQueue.h\
- msg/Dispatcher.h\
- msg/Message.h\
- msg/Messenger.h\
- msg/Pipe.h\
- msg/SimpleMessenger.h\
- msg/msg_types.h\
- objclass/objclass.h\
- os/btrfs_ioctl.h\
- os/ZFS.h\
- os/chain_xattr.h\
- os/hobject.h \
- os/CollectionIndex.h\
- os/FileJournal.h\
- os/FileStore.h\
- os/BtrfsFileStoreBackend.h\
- os/GenericFileStoreBackend.h\
- os/ZFSFileStoreBackend.h\
- os/FlatIndex.h\
- os/HashIndex.h\
- os/FDCache.h\
- os/WBThrottle.h\
- os/IndexManager.h\
- os/Journal.h\
- os/JournalingObjectStore.h\
- os/LFNIndex.h\
- os/ObjectStore.h\
- os/SequencerPosition.h\
- osd/Ager.h\
- osd/ClassHandler.h\
- osd/OSD.h\
- osd/OSDCap.h\
- osd/OSDMap.h\
- osd/ObjectVersioner.h\
- osd/OpRequest.h\
- osd/SnapMapper.h\
- osd/PG.h\
- osd/PGLog.h\
- osd/ReplicatedPG.h\
- osd/Watch.h\
- osd/osd_types.h\
- osdc/Blinker.h\
- osdc/Filer.h\
- osdc/Journaler.h\
- osdc/ObjectCacher.h\
- osdc/Objecter.h\
- osdc/Striper.h\
- osdc/WritebackHandler.h\
- perfglue/cpu_profiler.h\
- perfglue/heap_profiler.h\
- rgw/logrotate.conf\
- rgw/rgw_acl.h\
- rgw/rgw_acl_s3.h\
- rgw/rgw_acl_swift.h\
- rgw/rgw_client_io.h\
- rgw/rgw_fcgi.h\
- rgw/rgw_xml.h\
- rgw/rgw_cache.h\
- rgw/rgw_common.h\
- rgw/rgw_cors.h\
- rgw/rgw_cors_s3.h\
- rgw/rgw_cors_swift.h\
- rgw/rgw_string.h\
- rgw/rgw_formats.h\
- rgw/rgw_http_errors.h\
- rgw/rgw_log.h\
- rgw/rgw_multi.h\
- rgw/rgw_policy_s3.h\
- rgw/rgw_gc.h\
- rgw/rgw_metadata.h\
- rgw/rgw_multi_del.h\
- rgw/rgw_op.h\
- rgw/rgw_http_client.h\
- rgw/rgw_swift.h\
- rgw/rgw_swift_auth.h\
- rgw/rgw_rados.h\
- rgw/rgw_replica_log.h \
- rgw/rgw_resolve.h\
- rgw/rgw_rest.h\
- rgw/rgw_rest_swift.h\
- rgw/rgw_rest_s3.h\
- rgw/rgw_auth_s3.h\
- rgw/rgw_rest_admin.h\
- rgw/rgw_rest_usage.h\
- rgw/rgw_rest_user.h\
- rgw/rgw_rest_bucket.h\
- rgw/rgw_rest_client.h\
- rgw/rgw_rest_conn.h\
- rgw/rgw_tools.h\
- rgw/rgw_rest_metadata.h\
- rgw/rgw_rest_log.h\
- rgw/rgw_rest_opstate.h\
- rgw/rgw_rest_replica_log.h\
- rgw/rgw_rest_config.h\
- rgw/rgw_usage.h\
- rgw/rgw_user.h\
- rgw/rgw_bucket.h\
- rgw/rgw_keystone.h\
- sample.ceph.conf\
- tools/common.h\
- test/osd/RadosModel.h\
- test/osd/Object.h\
- test/osd/TestOpStat.h\
- global/pidfile.h\
- common/sync_filesystem.h \
- test/bench/distribution.h \
- test/bench/rados_backend.h \
- test/bench/rbd_backend.h \
- test/bench/bencher.h \
- test/bench/backend.h \
- test/bench/dumb_backend.h \
- test/bench/stat_collector.h \
- test/bench/detailed_stat_collector.h \
- test/bench/testfilestore_backend.h \
- test/common/ObjectContents.h \
- test/encoding/types.h \
- test/filestore/DeterministicOpSequence.h \
- test/filestore/FileStoreTracker.h \
- test/filestore/FileStoreDiff.h \
- test/filestore/TestFileStoreState.h \
- test/filestore/workload_generator.h \
- test/kv_store_bench.h \
- test/librados/test.h \
- test/ObjectMap/KeyValueDBMemory.h \
- test/omap_bench.h \
- test/osd/Object.h \
- test/osd/RadosModel.h \
- test/osd/TestOpStat.h \
- test/osdc/FakeWriteback.h \
- test/system/cross_process_sem.h \
- test/system/st_rados_create_pool.h \
- test/system/st_rados_list_objects.h \
- test/system/st_rados_delete_objs.h \
- test/system/st_rados_delete_pool.h \
- test/system/st_rados_notify.h \
- test/system/st_rados_watch.h \
- test/system/systest_runnable.h \
- test/system/systest_settings.h \
- test/unit.h \
- os/ObjectMap.h \
- os/DBObjectMap.h \
- os/KeyValueDB.h \
- os/LevelDBStore.h \
- common/cmdparse.h
+ sample.ceph.conf\
+ bash_completion/ceph \
+ bash_completion/rados \
+ bash_completion/rbd \
+ bash_completion/radosgw-admin \
+ mount/canonicalize.c \
+ mount/mtab.c \
+ objclass/objclass.h
+
+
+# coverage
+
+shell_scripts += ceph-coverage
+bin_SCRIPTS += ceph-coverage
+
if ENABLE_COVERAGE
COV_DIR = $(DESTDIR)$(libdir)/ceph/coverage
@@ -2410,13 +390,6 @@ uninstall-local: uninstall-coverage
-rmdir -p $(DESTDIR)$(localstatedir)/log/ceph
-rmdir -p $(DESTDIR)$(localstatedir)/lib/ceph/tmp
-# if we are doing a debug build, tell make to actually build the debug
-# targets
-if WITH_DEBUG
-bin_PROGRAMS += $(bin_DEBUGPROGRAMS)
-endif
-
-
#
# coverity rules expect:
# - cov-build to be in the path
diff --git a/src/arch/Makefile.am b/src/arch/Makefile.am
new file mode 100644
index 00000000000..27342078150
--- /dev/null
+++ b/src/arch/Makefile.am
@@ -0,0 +1,11 @@
+libarch_la_SOURCES = \
+ arch/intel.c \
+ arch/neon.c \
+ arch/probe.cc
+
+noinst_LTLIBRARIES += libarch.la
+
+noinst_HEADERS += \
+ arch/intel.h \
+ arch/neon.h \
+ arch/probe.h
diff --git a/src/auth/AuthMethodList.h b/src/auth/AuthMethodList.h
index 7b21b325aeb..b5aae0bba49 100644
--- a/src/auth/AuthMethodList.h
+++ b/src/auth/AuthMethodList.h
@@ -15,7 +15,8 @@
#ifndef CEPH_AUTHMETHODLIST_H
#define CEPH_AUTHMETHODLIST_H
-#include "include/inttypes.h"
+#include "include/int_types.h"
+
#include <list>
#include <set>
#include <string>
diff --git a/src/auth/Makefile.am b/src/auth/Makefile.am
new file mode 100644
index 00000000000..f7f3b386df5
--- /dev/null
+++ b/src/auth/Makefile.am
@@ -0,0 +1,46 @@
+libauth_la_SOURCES = \
+ auth/AuthAuthorizeHandler.cc \
+ auth/AuthClientHandler.cc \
+ auth/AuthSessionHandler.cc \
+ auth/AuthServiceHandler.cc \
+ auth/AuthMethodList.cc \
+ auth/cephx/CephxAuthorizeHandler.cc \
+ auth/cephx/CephxClientHandler.cc \
+ auth/cephx/CephxProtocol.cc \
+ auth/cephx/CephxServiceHandler.cc \
+ auth/cephx/CephxSessionHandler.cc \
+ auth/cephx/CephxKeyServer.cc \
+ auth/none/AuthNoneAuthorizeHandler.cc \
+ auth/unknown/AuthUnknownAuthorizeHandler.cc \
+ auth/Crypto.cc \
+ auth/KeyRing.cc \
+ auth/RotatingKeyRing.cc
+noinst_LTLIBRARIES += libauth.la
+
+noinst_HEADERS += \
+ auth/cephx/CephxAuthorizeHandler.h \
+ auth/cephx/CephxKeyServer.h \
+ auth/cephx/CephxProtocol.h \
+ auth/cephx/CephxClientHandler.h \
+ auth/cephx/CephxServiceHandler.h \
+ auth/cephx/CephxSessionHandler.h \
+ auth/none/AuthNoneAuthorizeHandler.h \
+ auth/none/AuthNoneClientHandler.h \
+ auth/none/AuthNoneServiceHandler.h \
+ auth/none/AuthNoneSessionHandler.h \
+ auth/none/AuthNoneProtocol.h \
+ auth/unknown/AuthUnknownAuthorizeHandler.h \
+ auth/unknown/AuthUnknownClientHandler.h \
+ auth/unknown/AuthUnknownServiceHandler.h \
+ auth/unknown/AuthUnknownSessionHandler.h \
+ auth/unknown/AuthUnknownProtocol.h \
+ auth/Auth.h \
+ auth/AuthMethodList.h \
+ auth/AuthClientHandler.h \
+ auth/AuthServiceHandler.h \
+ auth/AuthSessionHandler.h \
+ auth/AuthAuthorizeHandler.h \
+ auth/KeyRing.h \
+ auth/RotatingKeyRing.h \
+ auth/Crypto.h
+
diff --git a/src/client/Makefile.am b/src/client/Makefile.am
new file mode 100644
index 00000000000..53107eba517
--- /dev/null
+++ b/src/client/Makefile.am
@@ -0,0 +1,35 @@
+libclient_la_SOURCES = \
+ client/Client.cc \
+ client/Inode.cc \
+ client/Dentry.cc \
+ client/MetaRequest.cc \
+ client/ClientSnapRealm.cc \
+ client/MetaSession.cc \
+ client/Trace.cc
+libclient_la_LIBADD = $(LIBOSDC) $(LIBEDIT_LIBS)
+noinst_LTLIBRARIES += libclient.la
+
+noinst_HEADERS += \
+ client/Client.h \
+ client/Dentry.h \
+ client/Dir.h \
+ client/Fh.h \
+ client/Inode.h \
+ client/MetaRequest.h \
+ client/MetaSession.h \
+ client/ClientSnapRealm.h \
+ client/SyntheticClient.h \
+ client/Trace.h \
+ client/ioctl.h \
+ client/ObjecterWriteback.h
+
+if WITH_FUSE
+libclient_fuse_la_SOURCES = client/fuse_ll.cc
+libclient_fuse_la_LIBADD = libclient.la -lfuse
+noinst_LTLIBRARIES += libclient_fuse.la
+noinst_HEADERS += client/fuse_ll.h
+endif
+
+ceph_test_ioctls_SOURCES = client/test_ioctls.c
+bin_DEBUGPROGRAMS += ceph_test_ioctls
+
diff --git a/src/client/ioctl.h b/src/client/ioctl.h
index c15d3340a76..35b4ce4ac0f 100644
--- a/src/client/ioctl.h
+++ b/src/client/ioctl.h
@@ -1,13 +1,14 @@
#ifndef FS_CEPH_IOCTL_H
#define FS_CEPH_IOCTL_H
+#include "include/int_types.h"
+
#if defined(__linux__)
#include <linux/ioctl.h>
#include <linux/types.h>
#elif defined(__FreeBSD__)
#include <sys/ioctl.h>
#include <sys/types.h>
-#include "include/inttypes.h"
#endif
#define CEPH_IOCTL_MAGIC 0x97
diff --git a/src/cls/Makefile.am b/src/cls/Makefile.am
new file mode 100644
index 00000000000..0c04c64faa7
--- /dev/null
+++ b/src/cls/Makefile.am
@@ -0,0 +1,118 @@
+## Rados object classes
+
+libcls_hello_la_SOURCES = cls/hello/cls_hello.cc
+libcls_hello_la_LIBADD = $(PTHREAD_LIBS) $(EXTRALIBS)
+libcls_hello_la_LDFLAGS = ${AM_LDFLAGS} -version-info 1:0:0 -export-symbols-regex '.*__cls_.*'
+radoslib_LTLIBRARIES += libcls_hello.la
+
+libcls_rbd_la_SOURCES = cls/rbd/cls_rbd.cc
+libcls_rbd_la_LIBADD = $(PTHREAD_LIBS) $(EXTRALIBS)
+libcls_rbd_la_LDFLAGS = ${AM_LDFLAGS} -version-info 1:0:0 -export-symbols-regex '.*__cls_.*'
+radoslib_LTLIBRARIES += libcls_rbd.la
+
+libcls_lock_la_SOURCES = cls/lock/cls_lock.cc
+libcls_lock_la_LIBADD = $(PTHREAD_LIBS) $(EXTRALIBS)
+libcls_lock_la_LDFLAGS = ${AM_LDFLAGS} -version-info 1:0:0 -export-symbols-regex '.*__cls_.*'
+radoslib_LTLIBRARIES += libcls_lock.la
+
+libcls_refcount_la_SOURCES = \
+ cls/refcount/cls_refcount.cc \
+ cls/refcount/cls_refcount_ops.cc \
+ common/ceph_json.cc
+libcls_refcount_la_LIBADD = libjson_spirit.la $(PTHREAD_LIBS) $(EXTRALIBS)
+libcls_refcount_la_LDFLAGS = ${AM_LDFLAGS} -version-info 1:0:0 -export-symbols-regex '.*__cls_.*'
+radoslib_LTLIBRARIES += libcls_refcount.la
+
+libcls_version_la_SOURCES = cls/version/cls_version.cc
+libcls_version_la_LIBADD = $(PTHREAD_LIBS) $(EXTRALIBS)
+libcls_version_la_LDFLAGS = ${AM_LDFLAGS} -version-info 1:0:0 -export-symbols-regex '.*__cls_.*'
+radoslib_LTLIBRARIES += libcls_version.la
+
+libcls_log_la_SOURCES = cls/log/cls_log.cc
+libcls_log_la_LIBADD = $(PTHREAD_LIBS) $(EXTRALIBS)
+libcls_log_la_LDFLAGS = ${AM_LDFLAGS} -version-info 1:0:0 -export-symbols-regex '.*__cls_.*'
+radoslib_LTLIBRARIES += libcls_log.la
+
+libcls_statelog_la_SOURCES = cls/statelog/cls_statelog.cc
+libcls_statelog_la_LIBADD = $(PTHREAD_LIBS) $(EXTRALIBS)
+libcls_statelog_la_LDFLAGS = ${AM_LDFLAGS} -version-info 1:0:0 -export-symbols-regex '.*__cls_.*'
+radoslib_LTLIBRARIES += libcls_statelog.la
+
+libcls_replica_log_la_SOURCES = cls/replica_log/cls_replica_log.cc
+libcls_replica_log_la_LIBADD = $(PTHREAD_LIBS) $(EXTRALIBS)
+libcls_replica_log_la_LDFLAGS = ${AM_LDFLAGS} -version-info 1:0:0 -export-symbols-regex '.*__cls_.*'
+radoslib_LTLIBRARIES += libcls_replica_log.la
+
+libcls_rgw_la_SOURCES = \
+ cls/rgw/cls_rgw.cc \
+ cls/rgw/cls_rgw_ops.cc \
+ cls/rgw/cls_rgw_types.cc \
+ common/ceph_json.cc
+libcls_rgw_la_LIBADD = libjson_spirit.la $(PTHREAD_LIBS) $(EXTRALIBS)
+libcls_rgw_la_LDFLAGS = ${AM_LDFLAGS} -version-info 1:0:0 -export-symbols-regex '.*__cls_.*'
+radoslib_LTLIBRARIES += libcls_rgw.la
+
+## Rados object client classes
+
+libcls_lock_client_la_SOURCES = \
+ cls/lock/cls_lock_client.cc \
+ cls/lock/cls_lock_types.cc \
+ cls/lock/cls_lock_ops.cc
+noinst_LTLIBRARIES += libcls_lock_client.la
+
+libcls_refcount_client_la_SOURCES = \
+ cls/refcount/cls_refcount_client.cc \
+ cls/refcount/cls_refcount_ops.cc
+noinst_LTLIBRARIES += libcls_refcount_client.la
+
+libcls_version_client_a_SOURCES = \
+ cls/version/cls_version_client.cc \
+ cls/version/cls_version_types.cc
+noinst_LIBRARIES += libcls_version_client.a
+
+libcls_log_client_a_SOURCES = cls/log/cls_log_client.cc
+noinst_LIBRARIES += libcls_log_client.a
+
+libcls_statelog_client_a_SOURCES = cls/statelog/cls_statelog_client.cc
+noinst_LIBRARIES += libcls_statelog_client.a
+
+libcls_replica_log_client_a_SOURCES = \
+ cls/replica_log/cls_replica_log_types.cc \
+ cls/replica_log/cls_replica_log_ops.cc \
+ cls/replica_log/cls_replica_log_client.cc
+noinst_LIBRARIES += libcls_replica_log_client.a
+
+libcls_rgw_client_la_SOURCES = \
+ cls/rgw/cls_rgw_client.cc \
+ cls/rgw/cls_rgw_types.cc \
+ cls/rgw/cls_rgw_ops.cc
+noinst_LTLIBRARIES += libcls_rgw_client.la
+
+libcls_rbd_client_la_SOURCES = cls/rbd/cls_rbd_client.cc
+noinst_LTLIBRARIES += libcls_rbd_client.la
+
+
+noinst_HEADERS += \
+ cls/lock/cls_lock_types.h \
+ cls/lock/cls_lock_ops.h \
+ cls/lock/cls_lock_client.h \
+ cls/rbd/cls_rbd.h \
+ cls/rbd/cls_rbd_client.h \
+ cls/refcount/cls_refcount_ops.h \
+ cls/refcount/cls_refcount_client.h \
+ cls/version/cls_version_types.h \
+ cls/version/cls_version_ops.h \
+ cls/version/cls_version_client.h \
+ cls/log/cls_log_types.h \
+ cls/log/cls_log_ops.h \
+ cls/log/cls_log_client.h \
+ cls/statelog/cls_statelog_types.h \
+ cls/statelog/cls_statelog_ops.h \
+ cls/statelog/cls_statelog_client.h \
+ cls/replica_log/cls_replica_log_types.h \
+ cls/replica_log/cls_replica_log_ops.h \
+ cls/replica_log/cls_replica_log_client.h \
+ cls/rgw/cls_rgw_client.h \
+ cls/rgw/cls_rgw_ops.h \
+ cls/rgw/cls_rgw_types.h
+
diff --git a/src/cls/rbd/cls_rbd.cc b/src/cls/rbd/cls_rbd.cc
index 420de514ee6..12947a08540 100644
--- a/src/cls/rbd/cls_rbd.cc
+++ b/src/cls/rbd/cls_rbd.cc
@@ -25,6 +25,8 @@
* parameters as the client sees them - it would be silly to mention
* in each one that they take an input and an output bufferlist.
*/
+#include "include/int_types.h"
+#include "include/types.h"
#include <algorithm>
#include <cstring>
@@ -35,10 +37,8 @@
#include <sstream>
#include <vector>
-#include "include/types.h"
#include "objclass/objclass.h"
#include "include/rbd_types.h"
-#include <inttypes.h>
#include "cls/rbd/cls_rbd.h"
diff --git a/src/cls/rgw/cls_rgw.cc b/src/cls/rgw/cls_rgw.cc
index 6cda4cba5c3..2f5711ecb32 100644
--- a/src/cls/rgw/cls_rgw.cc
+++ b/src/cls/rgw/cls_rgw.cc
@@ -1,14 +1,14 @@
// -*- mode:C; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
-#include <iostream>
+#include "include/int_types.h"
+#include "include/types.h"
+#include <iostream>
#include <string.h>
#include <stdlib.h>
#include <errno.h>
-#include <inttypes.h>
-#include "include/types.h"
#include "include/utime.h"
#include "objclass/objclass.h"
#include "cls/rgw/cls_rgw_ops.h"
diff --git a/src/common/Formatter.cc b/src/common/Formatter.cc
index c08ea5b9a20..4ef833a45f8 100644
--- a/src/common/Formatter.cc
+++ b/src/common/Formatter.cc
@@ -14,11 +14,12 @@
#define LARGE_SIZE 1024
+#include "include/int_types.h"
+
#include "assert.h"
#include "Formatter.h"
#include "common/escape.h"
-#include <inttypes.h>
#include <iostream>
#include <sstream>
#include <stdarg.h>
diff --git a/src/common/Formatter.h b/src/common/Formatter.h
index da730103f41..27089ce04f2 100644
--- a/src/common/Formatter.h
+++ b/src/common/Formatter.h
@@ -1,8 +1,9 @@
#ifndef CEPH_FORMATTER_H
#define CEPH_FORMATTER_H
+#include "include/int_types.h"
+
#include <deque>
-#include <inttypes.h>
#include <iostream>
#include <list>
#include <ostream>
diff --git a/src/common/Makefile.am b/src/common/Makefile.am
new file mode 100644
index 00000000000..4c027909b4d
--- /dev/null
+++ b/src/common/Makefile.am
@@ -0,0 +1,195 @@
+libcommon_la_SOURCES = \
+ ceph_ver.c \
+ common/DecayCounter.cc \
+ common/LogClient.cc \
+ common/LogEntry.cc \
+ common/PrebufferedStreambuf.cc \
+ common/BackTrace.cc \
+ common/perf_counters.cc \
+ common/Mutex.cc \
+ common/OutputDataSocket.cc \
+ common/admin_socket.cc \
+ common/admin_socket_client.cc \
+ common/cmdparse.cc \
+ common/escape.c \
+ common/Clock.cc \
+ common/Throttle.cc \
+ common/Timer.cc \
+ common/Finisher.cc \
+ common/environment.cc\
+ common/assert.cc \
+ common/run_cmd.cc \
+ common/WorkQueue.cc \
+ common/ConfUtils.cc \
+ common/MemoryModel.cc \
+ common/armor.c \
+ common/fd.cc \
+ common/xattr.c \
+ common/safe_io.c \
+ common/snap_types.cc \
+ common/str_list.cc \
+ common/errno.cc \
+ common/RefCountedObj.cc \
+ common/blkdev.cc \
+ common/common_init.cc \
+ common/pipe.c \
+ common/ceph_argparse.cc \
+ common/ceph_context.cc \
+ common/buffer.cc \
+ common/code_environment.cc \
+ common/dout.cc \
+ common/signal.cc \
+ common/simple_spin.cc \
+ common/Thread.cc \
+ common/Formatter.cc \
+ common/HeartbeatMap.cc \
+ common/config.cc \
+ common/utf8.c \
+ common/mime.c \
+ common/strtol.cc \
+ common/page.cc \
+ common/lockdep.cc \
+ common/version.cc \
+ common/hex.cc \
+ common/entity_name.cc \
+ common/ceph_crypto.cc \
+ common/ceph_crypto_cms.cc \
+ common/ceph_json.cc \
+ common/ipaddr.cc \
+ common/pick_address.cc \
+ common/util.cc \
+ common/TextTable.cc \
+ common/secret.c \
+ common/ceph_fs.cc \
+ common/ceph_hash.cc \
+ common/ceph_strings.cc \
+ common/ceph_frag.cc \
+ common/addr_parsing.c \
+ common/hobject.cc
+
+# these should go out of libcommon
+libcommon_la_SOURCES += \
+ mon/MonCap.cc \
+ mon/MonClient.cc \
+ mon/MonMap.cc \
+ osd/OSDMap.cc \
+ osd/osd_types.cc \
+ mds/MDSMap.cc \
+ mds/inode_backtrace.cc \
+ mds/mdstypes.cc
+
+# inject crc in common
+libcommon_crc_la_SOURCES = \
+ common/sctp_crc32.c \
+ common/crc32c.cc \
+ common/crc32c_intel_baseline.c \
+ common/crc32c_intel_fast.c
+
+if WITH_GOOD_YASM_ELF64
+libcommon_crc_la_SOURCES += common/crc32c_intel_fast_asm.S
+libcommon_crc_la_LIBTOOLFLAGS = --tag=CC
+endif
+LIBCOMMON_DEPS += libcommon_crc.la
+noinst_LTLIBRARIES += libcommon_crc.la
+
+noinst_HEADERS += \
+ common/sctp_crc32.h \
+ common/crc32c_intel_baseline.h \
+ common/crc32c_intel_fast.h
+
+
+# important; libmsg before libauth!
+LIBCOMMON_DEPS += \
+ $(LIBMSG) $(LIBAUTH) \
+ $(LIBCRUSH) $(LIBJSON_SPIRIT) $(LIBLOG) $(LIBARCH) \
+ -lkeyutils
+
+if LINUX
+LIBCOMMON_DEPS += -lrt
+endif # LINUX
+
+libcommon_la_LIBADD = $(LIBCOMMON_DEPS)
+
+noinst_HEADERS += \
+ common/BackTrace.h \
+ common/RefCountedObj.h \
+ common/HeartbeatMap.h \
+ common/LogClient.h \
+ common/LogEntry.h \
+ common/Preforker.h \
+ common/WorkQueue.h \
+ common/PrioritizedQueue.h \
+ common/ceph_argparse.h \
+ common/ceph_context.h \
+ common/xattr.h \
+ common/blkdev.h \
+ common/compiler_extensions.h \
+ common/debug.h \
+ common/dout.h \
+ common/escape.h \
+ common/fd.h \
+ common/version.h \
+ common/hex.h \
+ common/entity_name.h \
+ common/errno.h \
+ common/environment.h \
+ common/likely.h \
+ common/lockdep.h \
+ common/obj_bencher.h \
+ common/snap_types.h \
+ common/Clock.h \
+ common/Cond.h \
+ common/ConfUtils.h \
+ common/DecayCounter.h \
+ common/Finisher.h \
+ common/Formatter.h \
+ common/perf_counters.h \
+ common/OutputDataSocket.h \
+ common/admin_socket.h \
+ common/admin_socket_client.h \
+ common/shared_cache.hpp \
+ common/tracked_int_ptr.hpp \
+ common/simple_cache.hpp \
+ common/sharedptr_registry.hpp \
+ common/map_cacher.hpp \
+ common/MemoryModel.h \
+ common/Mutex.h \
+ common/PrebufferedStreambuf.h \
+ common/RWLock.h \
+ common/Semaphore.h \
+ common/SimpleRNG.h \
+ common/TextTable.h \
+ common/Thread.h \
+ common/Throttle.h \
+ common/Timer.h \
+ common/TrackedOp.h \
+ common/arch.h \
+ common/armor.h \
+ common/common_init.h \
+ common/pipe.h \
+ common/code_environment.h \
+ common/signal.h \
+ common/simple_spin.h \
+ common/run_cmd.h \
+ common/safe_io.h \
+ common/config.h \
+ common/config_obs.h \
+ common/config_opts.h \
+ common/ceph_crypto.h \
+ common/ceph_crypto_cms.h \
+ common/ceph_json.h \
+ common/lru_map.h \
+ common/utf8.h \
+ common/mime.h \
+ common/pick_address.h \
+ common/secret.h \
+ common/strtol.h \
+ common/static_assert.h \
+ common/AsyncReserver.h \
+ common/sync_filesystem.h \
+ common/cmdparse.h \
+ common/hobject.h
+
+noinst_LTLIBRARIES += libcommon.la
+
+
diff --git a/src/common/OutputDataSocket.cc b/src/common/OutputDataSocket.cc
index e4d21fe13ee..3051ca02dbe 100644
--- a/src/common/OutputDataSocket.cc
+++ b/src/common/OutputDataSocket.cc
@@ -12,6 +12,8 @@
*
*/
+#include "include/int_types.h"
+
#include "common/Thread.h"
#include "common/OutputDataSocket.h"
#include "common/config.h"
@@ -25,7 +27,6 @@
#include <errno.h>
#include <fcntl.h>
-#include <inttypes.h>
#include <map>
#include <poll.h>
#include <set>
diff --git a/src/include/addr_parsing.c b/src/common/addr_parsing.c
index c01f817772c..c01f817772c 100644
--- a/src/include/addr_parsing.c
+++ b/src/common/addr_parsing.c
diff --git a/src/common/admin_socket.cc b/src/common/admin_socket.cc
index 1a507e606bf..12e5868b409 100644
--- a/src/common/admin_socket.cc
+++ b/src/common/admin_socket.cc
@@ -12,6 +12,8 @@
*
*/
+#include "include/int_types.h"
+
#include "common/Thread.h"
#include "common/admin_socket.h"
#include "common/config.h"
@@ -26,7 +28,6 @@
#include <errno.h>
#include <fcntl.h>
-#include <inttypes.h>
#include <map>
#include <poll.h>
#include <set>
diff --git a/src/common/admin_socket_client.cc b/src/common/admin_socket_client.cc
index 782e808ad86..335695f9b4b 100644
--- a/src/common/admin_socket_client.cc
+++ b/src/common/admin_socket_client.cc
@@ -12,6 +12,8 @@
*
*/
+#include "include/int_types.h"
+
#include "common/admin_socket.h"
#include "common/ceph_context.h"
#include "common/errno.h"
@@ -21,7 +23,6 @@
#include <arpa/inet.h>
#include <errno.h>
#include <fcntl.h>
-#include <inttypes.h>
#include <map>
#include <poll.h>
#include <sstream>
diff --git a/src/common/blkdev.cc b/src/common/blkdev.cc
index 22b0aa67b3e..b0dc0a54e9e 100644
--- a/src/common/blkdev.cc
+++ b/src/common/blkdev.cc
@@ -1,8 +1,8 @@
-#include <inttypes.h>
+#include "include/int_types.h"
+
#include <fcntl.h>
#include <sys/ioctl.h>
#include <errno.h>
-
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/mount.h>
diff --git a/src/include/ceph_frag.cc b/src/common/ceph_frag.cc
index ab6cf35c409..444b910c24e 100644
--- a/src/include/ceph_frag.cc
+++ b/src/common/ceph_frag.cc
@@ -1,7 +1,7 @@
/*
* Ceph 'frag' type
*/
-#include "types.h"
+#include "include/types.h"
int ceph_frag_compare(__u32 a, __u32 b)
{
diff --git a/src/include/ceph_fs.cc b/src/common/ceph_fs.cc
index 6e3c143361e..3172c577162 100644
--- a/src/include/ceph_fs.cc
+++ b/src/common/ceph_fs.cc
@@ -9,7 +9,7 @@
/*
* Some non-inline ceph helpers
*/
-#include "types.h"
+#include "include/types.h"
/*
* return true if @layout appears to be valid
diff --git a/src/include/ceph_hash.cc b/src/common/ceph_hash.cc
index d6081dfa97d..c581806d83d 100644
--- a/src/include/ceph_hash.cc
+++ b/src/common/ceph_hash.cc
@@ -1,5 +1,5 @@
-#include "types.h"
+#include "include/types.h"
/*
* Robert Jenkin's hash function.
diff --git a/src/include/ceph_strings.cc b/src/common/ceph_strings.cc
index e86aae4fd50..cd08083967a 100644
--- a/src/include/ceph_strings.cc
+++ b/src/common/ceph_strings.cc
@@ -1,7 +1,7 @@
/*
* Ceph string constants
*/
-#include "types.h"
+#include "include/types.h"
const char *ceph_entity_type_name(int type)
{
diff --git a/src/common/crc32c_intel_baseline.c b/src/common/crc32c_intel_baseline.c
index cfcfec624ae..3a92c77b63c 100644
--- a/src/common/crc32c_intel_baseline.c
+++ b/src/common/crc32c_intel_baseline.c
@@ -34,7 +34,8 @@
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <inttypes.h>
+#include "include/int_types.h"
+
#include <stdlib.h>
#define MAX_ITER 8
diff --git a/src/common/crc32c_intel_baseline.h b/src/common/crc32c_intel_baseline.h
index 5b14ddfc07e..e463575e28c 100644
--- a/src/common/crc32c_intel_baseline.h
+++ b/src/common/crc32c_intel_baseline.h
@@ -1,6 +1,8 @@
#ifndef CEPH_COMMON_CRC32C_INTEL_BASELINE_H
#define CEPH_COMMON_CRC32C_INTEL_BASELINE_H
+#include "include/int_types.h"
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/src/common/crc32c_intel_fast.c b/src/common/crc32c_intel_fast.c
index 49305088aff..0532dd261cf 100644
--- a/src/common/crc32c_intel_fast.c
+++ b/src/common/crc32c_intel_fast.c
@@ -1,5 +1,6 @@
-#include <inttypes.h>
#include "acconfig.h"
+#include "include/int_types.h"
+
#include "common/crc32c_intel_baseline.h"
extern unsigned int crc32_iscsi_00(unsigned char const *buffer, int len, unsigned int crc);
diff --git a/src/os/hobject.cc b/src/common/hobject.cc
index d6273693c62..d6273693c62 100644
--- a/src/os/hobject.cc
+++ b/src/common/hobject.cc
diff --git a/src/os/hobject.h b/src/common/hobject.h
index 633e471dffc..633e471dffc 100644
--- a/src/os/hobject.h
+++ b/src/common/hobject.h
diff --git a/src/common/perf_counters.cc b/src/common/perf_counters.cc
index 339ff6a372b..4fe1354fa63 100644
--- a/src/common/perf_counters.cc
+++ b/src/common/perf_counters.cc
@@ -12,13 +12,14 @@
*
*/
+#include "include/int_types.h"
+
#include "common/perf_counters.h"
#include "common/dout.h"
#include "common/errno.h"
#include "common/Formatter.h"
#include <errno.h>
-#include <inttypes.h>
#include <map>
#include <sstream>
#include <stdint.h>
diff --git a/src/crush/Makefile.am b/src/crush/Makefile.am
new file mode 100644
index 00000000000..3d2f45b80e6
--- /dev/null
+++ b/src/crush/Makefile.am
@@ -0,0 +1,30 @@
+libcrush_la_SOURCES = \
+ crush/builder.c \
+ crush/mapper.c \
+ crush/crush.c \
+ crush/hash.c \
+ crush/CrushWrapper.cc \
+ crush/CrushCompiler.cc \
+ crush/CrushTester.cc
+noinst_LTLIBRARIES += libcrush.la
+
+noinst_HEADERS += \
+ crush/CrushCompiler.h \
+ crush/CrushTester.h \
+ crush/CrushWrapper.h \
+ crush/CrushWrapper.i \
+ crush/builder.h \
+ crush/crush.h \
+ crush/grammar.h \
+ crush/hash.h \
+ crush/mapper.h \
+ crush/sample.txt \
+ crush/types.h
+
+#crush_includedir = $(includedir)/crush
+#crush_include_DATA = \
+# $(srcdir)/crush/hash.h \
+# $(srcdir)/crush/crush.h \
+# $(srcdir)/crush/mapper.h \
+# $(srcdir)/crush/types.h
+
diff --git a/src/crush/crush.h b/src/crush/crush.h
index 82d032879d9..4adabcbf331 100644
--- a/src/crush/crush.h
+++ b/src/crush/crush.h
@@ -1,11 +1,12 @@
#ifndef CEPH_CRUSH_CRUSH_H
#define CEPH_CRUSH_CRUSH_H
+#include "include/int_types.h"
+
#if defined(__linux__)
#include <linux/types.h>
#elif defined(__FreeBSD__)
#include <sys/types.h>
-#include "include/inttypes.h"
#endif
/*
diff --git a/src/crush/hash.c b/src/crush/hash.c
index 9f7f3257ebd..9b15321d783 100644
--- a/src/crush/hash.c
+++ b/src/crush/hash.c
@@ -1,10 +1,11 @@
+#include "include/int_types.h"
#if defined(__linux__)
#include <linux/types.h>
#elif defined(__FreeBSD__)
#include <sys/types.h>
-#include "include/inttypes.h"
#endif
+
#include "hash.h"
/*
diff --git a/src/global/Makefile.am b/src/global/Makefile.am
new file mode 100644
index 00000000000..79a7ffff689
--- /dev/null
+++ b/src/global/Makefile.am
@@ -0,0 +1,14 @@
+libglobal_la_SOURCES = \
+ global/global_context.cc \
+ global/global_init.cc \
+ global/pidfile.cc \
+ global/signal_handler.cc
+libglobal_la_LIBADD = $(LIBCOMMON)
+noinst_LTLIBRARIES += libglobal.la
+
+noinst_HEADERS += \
+ global/pidfile.h \
+ global/global_init.h \
+ global/global_context.h \
+ global/signal_handler.h
+
diff --git a/src/include/Makefile.am b/src/include/Makefile.am
new file mode 100644
index 00000000000..d702ebd2795
--- /dev/null
+++ b/src/include/Makefile.am
@@ -0,0 +1,80 @@
+libcephfs_includedir = $(includedir)/cephfs
+libcephfs_include_DATA = $(srcdir)/include/cephfs/libcephfs.h
+
+librbd_includedir = $(includedir)/rbd
+librbd_include_DATA = \
+ $(srcdir)/include/rbd/features.h \
+ $(srcdir)/include/rbd/librbd.h \
+ $(srcdir)/include/rbd/librbd.hpp
+
+rados_includedir = $(includedir)/rados
+rados_include_DATA = \
+ $(srcdir)/include/rados/librados.h \
+ $(srcdir)/include/rados/rados_types.h \
+ $(srcdir)/include/rados/rados_types.hpp \
+ $(srcdir)/include/rados/librados.hpp \
+ $(srcdir)/include/buffer.h \
+ $(srcdir)/include/page.h \
+ $(srcdir)/include/crc32c.h
+
+noinst_HEADERS += \
+ include/bloom_filter.hpp \
+ include/Context.h \
+ include/CompatSet.h \
+ include/Distribution.h \
+ include/addr_parsing.h \
+ include/assert.h \
+ include/atomic.h \
+ include/bitmapper.h \
+ include/blobhash.h \
+ include/buffer.h \
+ include/byteorder.h \
+ include/cephfs/libcephfs.h \
+ include/ceph_features.h \
+ include/ceph_frag.h \
+ include/ceph_fs.h \
+ include/ceph_hash.h \
+ include/cmp.h \
+ include/color.h \
+ include/compat.h \
+ include/crc32c.h \
+ include/encoding.h \
+ include/err.h \
+ include/error.h \
+ include/filepath.h \
+ include/frag.h \
+ include/hash.h \
+ include/intarith.h \
+ include/interval_set.h \
+ include/int_types.h \
+ include/ipaddr.h \
+ include/linux_fiemap.h \
+ include/lru.h \
+ include/msgr.h \
+ include/object.h \
+ include/page.h \
+ include/rangeset.h \
+ include/rados.h \
+ include/rbd_types.h \
+ include/statlite.h \
+ include/str_list.h \
+ include/stringify.h \
+ include/triple.h \
+ include/types.h \
+ include/utime.h \
+ include/dlist.h \
+ include/elist.h \
+ include/uuid.h \
+ include/xlist.h \
+ include/rados/librados.h \
+ include/rados/rados_types.h \
+ include/rados/rados_types.hpp \
+ include/rados/librados.hpp \
+ include/rados/librgw.h \
+ include/rados/page.h \
+ include/rados/crc32c.h \
+ include/rados/buffer.h \
+ include/rbd/features.h \
+ include/rbd/librbd.h \
+ include/rbd/librbd.hpp\
+ include/util.h
diff --git a/src/include/buffer.h b/src/include/buffer.h
index 8e637d658c5..077cf0d9b0b 100644
--- a/src/include/buffer.h
+++ b/src/include/buffer.h
@@ -11,16 +11,16 @@
* Foundation. See file COPYING.
*
*/
-
#ifndef CEPH_BUFFER_H
#define CEPH_BUFFER_H
+#include "include/int_types.h"
+
#if defined(__linux__)
#include <stdlib.h>
#include <linux/types.h>
#elif defined(__FreeBSD__)
#include <sys/types.h>
-#include "include/inttypes.h"
#include <stdlib.h>
#endif
diff --git a/src/include/crc32c.h b/src/include/crc32c.h
index d5f7388be56..8e22c624636 100644
--- a/src/include/crc32c.h
+++ b/src/include/crc32c.h
@@ -1,7 +1,8 @@
#ifndef CEPH_CRC32C_H
#define CEPH_CRC32C_H
-#include "include/inttypes.h"
+#include "include/int_types.h"
+
#include <string.h>
typedef uint32_t (*ceph_crc32c_func_t)(uint32_t crc, unsigned char const *data, unsigned length);
diff --git a/src/include/encoding.h b/src/include/encoding.h
index a091f7f69e9..fedc8b31299 100644
--- a/src/include/encoding.h
+++ b/src/include/encoding.h
@@ -11,13 +11,13 @@
* Foundation. See file COPYING.
*
*/
-
#ifndef CEPH_ENCODING_H
#define CEPH_ENCODING_H
+#include "include/int_types.h"
+
#include <tr1/memory>
-#include "inttypes.h"
#include "byteorder.h"
#include "buffer.h"
#include "assert.h"
diff --git a/src/include/int_types.h b/src/include/int_types.h
new file mode 100644
index 00000000000..f290f9d8d23
--- /dev/null
+++ b/src/include/int_types.h
@@ -0,0 +1,75 @@
+#ifndef CEPH_INTTYPES_H
+#define CEPH_INTTYPES_H
+
+#include "acconfig.h"
+
+#if defined(__linux__)
+#include <linux/types.h>
+#endif
+
+/*
+ * Get 64b integers either from inttypes.h or glib.h
+ */
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+//#else
+//# ifdef HAVE_GLIB
+//# include <glib.h>
+//# endif
+#endif
+
+/*
+ * C99 says inttypes.h includes stdint.h, but that's not true on all
+ * systems. If it's there, include it always - just in case.
+ */
+#ifdef HAVE_STDINT_H
+#include <stdint.h>
+#endif
+
+/*
+ * Emergency replacements for PRI*64 modifiers. Some systems have
+ * an inttypes.h that doesn't define all the PRI[doxu]64 macros.
+ */
+#if !defined(PRIu64)
+# if defined(HAVE_INTTYPES_H) || defined(HAVE_GLIB)
+/* If we have inttypes or glib, assume we have 64-bit long long int */
+# define PRIu64 "llu"
+# define PRIi64 "lli"
+# define PRIx64 "llx"
+# define PRIX64 "llX"
+# define PRIo64 "llo"
+# define PRId64 "lld"
+# else
+/* Assume that we don't have long long, so use long int modifiers */
+# define PRIu64 "lu"
+# define PRIi64 "li"
+# define PRIx64 "lx"
+# define PRIX64 "lX"
+# define PRIo64 "lo"
+# define PRId64 "ld"
+# endif
+#endif
+
+#if defined(__FreeBSD__)
+#include <sys/types.h>
+
+typedef int8_t __s8;
+typedef uint8_t __u8;
+typedef int16_t __s16;
+typedef uint16_t __u16;
+typedef int32_t __s32;
+typedef uint32_t __u32;
+typedef int64_t __s64;
+typedef uint64_t __u64;
+
+#define __bitwise__
+
+typedef __u16 __bitwise__ __le16;
+typedef __u16 __bitwise__ __be16;
+typedef __u32 __bitwise__ __le32;
+typedef __u32 __bitwise__ __be32;
+typedef __u64 __bitwise__ __le64;
+typedef __u64 __bitwise__ __be64;
+
+#endif
+#endif
diff --git a/src/include/inttypes.h b/src/include/inttypes.h
deleted file mode 100644
index 656e2bb0a0f..00000000000
--- a/src/include/inttypes.h
+++ /dev/null
@@ -1,28 +0,0 @@
-#ifndef CEPH_INTTYPES_H
-#define CEPH_INTTYPES_H
-
-#include <stdint.h>
-#if defined(__linux__)
-#include <linux/types.h>
-#elif defined(__FreeBSD__)
-#include <sys/types.h>
-typedef int8_t __s8;
-typedef uint8_t __u8;
-typedef int16_t __s16;
-typedef uint16_t __u16;
-typedef int32_t __s32;
-typedef uint32_t __u32;
-typedef int64_t __s64;
-typedef uint64_t __u64;
-
-#define __bitwise__
-
-typedef __u16 __bitwise__ __le16;
-typedef __u16 __bitwise__ __be16;
-typedef __u32 __bitwise__ __le32;
-typedef __u32 __bitwise__ __be32;
-typedef __u64 __bitwise__ __le64;
-typedef __u64 __bitwise__ __be64;
-
-#endif
-#endif
diff --git a/src/include/linux_fiemap.h b/src/include/linux_fiemap.h
index ba5cb6657fa..352208b2207 100644
--- a/src/include/linux_fiemap.h
+++ b/src/include/linux_fiemap.h
@@ -7,15 +7,15 @@
* Kalpak Shah <kalpak.shah@sun.com>
* Andreas Dilger <adilger@sun.com>
*/
-
#ifndef _LINUX_FIEMAP_H
#define _LINUX_FIEMAP_H
+#include "include/int_types.h"
+
#if defined(__linux__)
#include <linux/types.h>
#elif defined(__FreeBSD_)
#include <sys/types.h>
-#include "include/inttypes.h"
#endif
struct fiemap_extent {
diff --git a/src/include/rados/librados.h b/src/include/rados/librados.h
index 6f5e454c8e8..a85ef3057bc 100644
--- a/src/include/rados/librados.h
+++ b/src/include/rados/librados.h
@@ -1,6 +1,8 @@
#ifndef CEPH_LIBRADOS_H
#define CEPH_LIBRADOS_H
+#include "include/int_types.h"
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -10,7 +12,6 @@ extern "C" {
#include <linux/types.h>
#elif defined(__FreeBSD__)
#include <sys/types.h>
-#include "include/inttypes.h"
#endif
#include <string.h>
#include "rados_types.h"
diff --git a/src/include/types.h b/src/include/types.h
index 7e6ddb7117e..1f9756b22c7 100644
--- a/src/include/types.h
+++ b/src/include/types.h
@@ -11,12 +11,11 @@
* Foundation. See file COPYING.
*
*/
-
#ifndef CEPH_TYPES_H
#define CEPH_TYPES_H
// this is needed for ceph_fs to compile in userland
-#include "inttypes.h"
+#include "int_types.h"
#include "byteorder.h"
#include "uuid.h"
diff --git a/src/init-radosgw b/src/init-radosgw
index a526441c3a0..de1e01e0018 100644
--- a/src/init-radosgw
+++ b/src/init-radosgw
@@ -83,7 +83,7 @@ case "$1" in
echo "$RADOSGW is running."
else
echo "$RADOSGW is not running."
- RETVAL=1
+ exit 1
fi
;;
*)
diff --git a/src/init-radosgw.sysv b/src/init-radosgw.sysv
index e08e1bd1b1b..017e3f9bc07 100644
--- a/src/init-radosgw.sysv
+++ b/src/init-radosgw.sysv
@@ -90,7 +90,7 @@ case "$1" in
echo "$RADOSGW is running."
else
echo "$RADOSGW is not running."
- RETVAL=1
+ exit 1
fi
;;
*)
diff --git a/src/json_spirit/Makefile.am b/src/json_spirit/Makefile.am
new file mode 100644
index 00000000000..43025be0e71
--- /dev/null
+++ b/src/json_spirit/Makefile.am
@@ -0,0 +1,18 @@
+libjson_spirit_la_SOURCES = \
+ json_spirit/json_spirit_reader.cpp \
+ json_spirit/json_spirit_writer.cpp \
+ json_spirit/json_spirit_value.cpp
+noinst_LTLIBRARIES += libjson_spirit.la
+
+noinst_HEADERS += \
+ json_spirit/json_spirit.h \
+ json_spirit/json_spirit_error_position.h \
+ json_spirit/json_spirit_reader.h \
+ json_spirit/json_spirit_reader_template.h \
+ json_spirit/json_spirit_stream_reader.h \
+ json_spirit/json_spirit_utils.h \
+ json_spirit/json_spirit_value.h \
+ json_spirit/json_spirit_writer.h \
+ json_spirit/json_spirit_writer_options.h \
+ json_spirit/json_spirit_writer_template.h
+
diff --git a/src/key_value_store/Makefile.am b/src/key_value_store/Makefile.am
new file mode 100644
index 00000000000..e5bae00155f
--- /dev/null
+++ b/src/key_value_store/Makefile.am
@@ -0,0 +1,10 @@
+libcls_kvs_la_SOURCES = key_value_store/cls_kvs.cc
+libcls_kvs_la_LIBADD = $(PTHREAD_LIBS) $(EXTRALIBS)
+libcls_kvs_la_LDFLAGS = ${AM_LDFLAGS} -version-info 1:0:0 -export-symbols-regex '.*__cls_.*'
+radoslib_LTLIBRARIES += libcls_kvs.la
+
+noinst_HEADERS += \
+ key_value_store/key_value_structure.h \
+ key_value_store/kv_flat_btree_async.h \
+ key_value_store/kvs_arg_types.h
+
diff --git a/src/librados/Makefile.am b/src/librados/Makefile.am
new file mode 100644
index 00000000000..570aa91af93
--- /dev/null
+++ b/src/librados/Makefile.am
@@ -0,0 +1,20 @@
+librados_la_SOURCES = \
+ librados/librados.cc \
+ librados/RadosClient.cc \
+ librados/IoCtxImpl.cc \
+ librados/snap_set_diff.cc
+
+# We need this to avoid basename conflicts with the librados build tests in test/Makefile.am
+librados_la_CFLAGS = ${AM_CFLAGS}
+
+LIBRADOS_DEPS += libcls_lock_client.la $(LIBOSDC) $(LIBCOMMON)
+librados_la_LIBADD = $(LIBRADOS_DEPS) $(PTHREAD_LIBS) $(CRYPTO_LIBS) $(EXTRALIBS)
+librados_la_LDFLAGS = ${AM_LDFLAGS} -version-info 2:0:0 -export-symbols-regex '^rados_.*'
+lib_LTLIBRARIES += librados.la
+
+noinst_HEADERS += \
+ librados/snap_set_diff.h \
+ librados/AioCompletionImpl.h \
+ librados/IoCtxImpl.h \
+ librados/PoolAsyncCompletionImpl.h \
+ librados/RadosClient.h
diff --git a/src/librbd/AioRequest.h b/src/librbd/AioRequest.h
index 7625bdd7ff3..cf50ee2c049 100644
--- a/src/librbd/AioRequest.h
+++ b/src/librbd/AioRequest.h
@@ -3,9 +3,9 @@
#ifndef CEPH_LIBRBD_AIOREQUEST_H
#define CEPH_LIBRBD_AIOREQUEST_H
-#include <map>
+#include "include/int_types.h"
-#include "inttypes.h"
+#include <map>
#include "common/snap_types.h"
#include "include/buffer.h"
diff --git a/src/librbd/ImageCtx.h b/src/librbd/ImageCtx.h
index 29ca2f197ea..c9e74393e13 100644
--- a/src/librbd/ImageCtx.h
+++ b/src/librbd/ImageCtx.h
@@ -3,7 +3,7 @@
#ifndef CEPH_LIBRBD_IMAGECTX_H
#define CEPH_LIBRBD_IMAGECTX_H
-#include <inttypes.h>
+#include "include/int_types.h"
#include <map>
#include <set>
diff --git a/src/librbd/Makefile.am b/src/librbd/Makefile.am
new file mode 100644
index 00000000000..d4e2455c8c1
--- /dev/null
+++ b/src/librbd/Makefile.am
@@ -0,0 +1,24 @@
+librbd_la_SOURCES = \
+ librbd/librbd.cc \
+ librbd/AioCompletion.cc \
+ librbd/AioRequest.cc \
+ librbd/ImageCtx.cc \
+ librbd/internal.cc \
+ librbd/LibrbdWriteback.cc \
+ librbd/WatchCtx.cc
+librbd_la_LIBADD = \
+ $(LIBRADOS) $(LIBOSDC) \
+ libcls_rbd_client.la libcls_lock_client.la \
+ $(PTHREAD_LIBS) $(EXTRALIBS)
+librbd_la_LDFLAGS = ${AM_LDFLAGS} -version-info 1:0:0 -export-symbols-regex '^rbd_.*'
+lib_LTLIBRARIES += librbd.la
+
+noinst_HEADERS += \
+ librbd/AioCompletion.h \
+ librbd/AioRequest.h \
+ librbd/ImageCtx.h \
+ librbd/internal.h \
+ librbd/LibrbdWriteback.h \
+ librbd/parent_types.h \
+ librbd/SnapInfo.h \
+ librbd/WatchCtx.h
diff --git a/src/librbd/SnapInfo.h b/src/librbd/SnapInfo.h
index 5a7852c3c66..44dd4cf208e 100644
--- a/src/librbd/SnapInfo.h
+++ b/src/librbd/SnapInfo.h
@@ -3,7 +3,7 @@
#ifndef CEPH_LIBRBD_SNAPINFO_H
#define CEPH_LIBRBD_SNAPINFO_H
-#include <inttypes.h>
+#include "include/int_types.h"
#include "include/rados/librados.hpp"
diff --git a/src/librbd/WatchCtx.h b/src/librbd/WatchCtx.h
index 0c0802a4035..9872c84307b 100644
--- a/src/librbd/WatchCtx.h
+++ b/src/librbd/WatchCtx.h
@@ -3,7 +3,7 @@
#ifndef CEPH_LIBRBD_WATCHCTX_H
#define CEPH_LIBRBD_WATCHCTX_H
-#include <inttypes.h>
+#include "include/int_types.h"
#include "common/Mutex.h"
#include "include/buffer.h"
diff --git a/src/librbd/internal.cc b/src/librbd/internal.cc
index abc6ff92a28..b8a757ab333 100644
--- a/src/librbd/internal.cc
+++ b/src/librbd/internal.cc
@@ -1,5 +1,7 @@
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
+#include "include/int_types.h"
+
#include <errno.h>
#include <limits.h>
@@ -8,7 +10,6 @@
#include "common/errno.h"
#include "common/Throttle.h"
#include "cls/lock/cls_lock_client.h"
-#include "include/inttypes.h"
#include "include/stringify.h"
#include "cls/rbd/cls_rbd.h"
diff --git a/src/librbd/internal.h b/src/librbd/internal.h
index 33f5191706d..43458886b43 100644
--- a/src/librbd/internal.h
+++ b/src/librbd/internal.h
@@ -3,7 +3,7 @@
#ifndef CEPH_LIBRBD_INTERNAL_H
#define CEPH_LIBRBD_INTERNAL_H
-#include <inttypes.h>
+#include "include/int_types.h"
#include <map>
#include <set>
diff --git a/src/librbd/librbd.cc b/src/librbd/librbd.cc
index af413dda04f..cad0c5eb172 100644
--- a/src/librbd/librbd.cc
+++ b/src/librbd/librbd.cc
@@ -11,9 +11,9 @@
* Foundation. See file COPYING.
*
*/
+#include "include/int_types.h"
#include <errno.h>
-#include <inttypes.h>
#include "common/Cond.h"
#include "common/dout.h"
diff --git a/src/log/Makefile.am b/src/log/Makefile.am
new file mode 100644
index 00000000000..b66e6cf84ce
--- /dev/null
+++ b/src/log/Makefile.am
@@ -0,0 +1,11 @@
+liblog_la_SOURCES = \
+ log/Log.cc \
+ log/SubsystemMap.cc
+noinst_LTLIBRARIES += liblog.la
+
+noinst_HEADERS += \
+ log/Entry.h \
+ log/EntryQueue.h \
+ log/Log.h \
+ log/SubsystemMap.h
+
diff --git a/src/mds/CInode.cc b/src/mds/CInode.cc
index dd483263b6d..46f8d33cfd8 100644
--- a/src/mds/CInode.cc
+++ b/src/mds/CInode.cc
@@ -12,7 +12,8 @@
*
*/
-#include <inttypes.h>
+#include "include/int_types.h"
+
#include <string>
#include <stdio.h>
diff --git a/src/mds/Makefile.am b/src/mds/Makefile.am
new file mode 100644
index 00000000000..05d0e1a2429
--- /dev/null
+++ b/src/mds/Makefile.am
@@ -0,0 +1,92 @@
+libmds_la_SOURCES = \
+ mds/Anchor.cc \
+ mds/Capability.cc \
+ mds/Dumper.cc \
+ mds/Resetter.cc \
+ mds/MDS.cc \
+ mds/flock.cc \
+ mds/locks.c \
+ mds/journal.cc \
+ mds/Server.cc \
+ mds/Mutation.cc \
+ mds/MDCache.cc \
+ mds/Locker.cc \
+ mds/Migrator.cc \
+ mds/MDBalancer.cc \
+ mds/CDentry.cc \
+ mds/CDir.cc \
+ mds/CInode.cc \
+ mds/LogEvent.cc \
+ mds/MDSTable.cc \
+ mds/InoTable.cc \
+ mds/MDSTableClient.cc \
+ mds/MDSTableServer.cc \
+ mds/AnchorServer.cc \
+ mds/AnchorClient.cc \
+ mds/SnapRealm.cc \
+ mds/SnapServer.cc \
+ mds/snap.cc \
+ mds/SessionMap.cc \
+ mds/MDLog.cc
+libmds_la_LIBADD = $(LIBOSDC)
+noinst_LTLIBRARIES += libmds.la
+
+noinst_HEADERS += \
+ mds/inode_backtrace.h \
+ mds/flock.h \
+ mds/locks.c \
+ mds/locks.h \
+ mds/Anchor.h \
+ mds/AnchorClient.h \
+ mds/AnchorServer.h \
+ mds/CDentry.h \
+ mds/CDir.h \
+ mds/CInode.h \
+ mds/Capability.h \
+ mds/Dumper.h \
+ mds/InoTable.h \
+ mds/LocalLock.h \
+ mds/Locker.h \
+ mds/LogEvent.h \
+ mds/LogSegment.h \
+ mds/MDBalancer.h \
+ mds/MDCache.h \
+ mds/MDLog.h \
+ mds/MDS.h \
+ mds/MDSMap.h \
+ mds/MDSTable.h \
+ mds/MDSTableServer.h \
+ mds/MDSTableClient.h \
+ mds/Mutation.h \
+ mds/Migrator.h \
+ mds/Resetter.h \
+ mds/ScatterLock.h \
+ mds/Server.h \
+ mds/SessionMap.h \
+ mds/SimpleLock.h \
+ mds/SnapClient.h \
+ mds/SnapRealm.h \
+ mds/SnapServer.h \
+ mds/inode_backtrace.h \
+ mds/mds_table_types.h \
+ mds/mdstypes.h \
+ mds/snap.h
+
+noinst_HEADERS += \
+ mds/events/ECommitted.h \
+ mds/events/EExport.h \
+ mds/events/EFragment.h \
+ mds/events/EImportFinish.h \
+ mds/events/EImportStart.h \
+ mds/events/EMetaBlob.h \
+ mds/events/EOpen.h \
+ mds/events/EResetJournal.h \
+ mds/events/ESession.h \
+ mds/events/ESessions.h \
+ mds/events/ESlaveUpdate.h \
+ mds/events/ESubtreeMap.h \
+ mds/events/ETableClient.h \
+ mds/events/ETableServer.h \
+ mds/events/EUpdate.h
+
+
diff --git a/src/mds/locks.c b/src/mds/locks.c
index 37e3f5ea764..f367eda29d2 100644
--- a/src/mds/locks.c
+++ b/src/mds/locks.c
@@ -1,15 +1,15 @@
-
// there must be a better way?
typedef char bool;
#define false 0
#define true 1
+#include "include/int_types.h"
+
#include <netinet/in.h>
#if defined(__linux__)
#include <linux/types.h>
#elif defined(__FreeBSD__)
#include <sys/types.h>
-#include "include/inttypes.h"
#endif
#include <string.h>
#include <fcntl.h>
diff --git a/src/mds/mdstypes.h b/src/mds/mdstypes.h
index 4fcf584fb8c..902e3104aa8 100644
--- a/src/mds/mdstypes.h
+++ b/src/mds/mdstypes.h
@@ -3,7 +3,8 @@
#ifndef CEPH_MDSTYPES_H
#define CEPH_MDSTYPES_H
-#include <inttypes.h>
+#include "include/int_types.h"
+
#include <math.h>
#include <ostream>
#include <set>
diff --git a/src/messages/Makefile.am b/src/messages/Makefile.am
new file mode 100644
index 00000000000..c503d3fca9b
--- /dev/null
+++ b/src/messages/Makefile.am
@@ -0,0 +1,113 @@
+
+noinst_HEADERS += \
+ messages/MAuth.h \
+ messages/MAuthReply.h \
+ messages/MCacheExpire.h \
+ messages/MClientCaps.h \
+ messages/MClientCapRelease.h \
+ messages/MClientLease.h \
+ messages/MClientReconnect.h \
+ messages/MClientReply.h \
+ messages/MClientRequest.h \
+ messages/MClientRequestForward.h \
+ messages/MClientSession.h \
+ messages/MClientSnap.h \
+ messages/MCommand.h \
+ messages/MCommandReply.h \
+ messages/MDentryLink.h \
+ messages/MDentryUnlink.h \
+ messages/MDirUpdate.h \
+ messages/MDiscover.h \
+ messages/MDiscoverReply.h \
+ messages/MExportCaps.h \
+ messages/MExportCapsAck.h \
+ messages/MExportDir.h \
+ messages/MExportDirAck.h \
+ messages/MExportDirCancel.h \
+ messages/MExportDirDiscover.h \
+ messages/MExportDirDiscoverAck.h \
+ messages/MExportDirFinish.h \
+ messages/MExportDirNotify.h \
+ messages/MExportDirNotifyAck.h \
+ messages/MExportDirPrep.h \
+ messages/MExportDirPrepAck.h \
+ messages/MGenericMessage.h \
+ messages/MGetPoolStats.h \
+ messages/MGetPoolStatsReply.h \
+ messages/MHeartbeat.h \
+ messages/MInodeFileCaps.h \
+ messages/MLock.h \
+ messages/MLog.h \
+ messages/MLogAck.h \
+ messages/MMDSBeacon.h \
+ messages/MMDSCacheRejoin.h \
+ messages/MMDSLoadTargets.h \
+ messages/MMDSFindIno.h \
+ messages/MMDSFindInoReply.h \
+ messages/MMDSFragmentNotify.h \
+ messages/MMDSMap.h \
+ messages/MMDSOpenIno.h \
+ messages/MMDSOpenInoReply.h \
+ messages/MMDSResolve.h \
+ messages/MMDSResolveAck.h \
+ messages/MMDSSlaveRequest.h \
+ messages/MMDSTableRequest.h \
+ messages/MMonCommand.h \
+ messages/MMonCommandAck.h \
+ messages/MMonElection.h \
+ messages/MMonGetMap.h \
+ messages/MMonGetVersion.h \
+ messages/MMonGetVersionReply.h \
+ messages/MMonGlobalID.h \
+ messages/MMonHealth.h \
+ messages/MMonJoin.h \
+ messages/MMonMap.h \
+ messages/MMonPaxos.h \
+ messages/MMonProbe.h \
+ messages/MMonScrub.h \
+ messages/MMonSubscribe.h \
+ messages/MMonSubscribeAck.h \
+ messages/MMonSync.h \
+ messages/MOSDAlive.h \
+ messages/MOSDBoot.h \
+ messages/MOSDFailure.h \
+ messages/MOSDMarkMeDown.h \
+ messages/MOSDMap.h \
+ messages/MOSDOp.h \
+ messages/MOSDOpReply.h \
+ messages/MOSDPGBackfill.h \
+ messages/MOSDPGCreate.h \
+ messages/MOSDPGPush.h \
+ messages/MOSDPGPull.h \
+ messages/MOSDPGPushReply.h \
+ messages/MOSDPGInfo.h \
+ messages/MOSDPGLog.h \
+ messages/MOSDPGMissing.h \
+ messages/MOSDPGNotify.h \
+ messages/MOSDPGQuery.h \
+ messages/MOSDPGRemove.h \
+ messages/MOSDPGScan.h \
+ messages/MBackfillReserve.h \
+ messages/MRecoveryReserve.h \
+ messages/MMonQuorumService.h \
+ messages/MOSDPGTemp.h \
+ messages/MOSDPGTrim.h \
+ messages/MOSDPing.h \
+ messages/MOSDRepScrub.h \
+ messages/MOSDScrub.h \
+ messages/MOSDSubOp.h \
+ messages/MOSDSubOpReply.h \
+ messages/MPGStats.h \
+ messages/MPGStatsAck.h \
+ messages/MPing.h \
+ messages/MPoolOp.h \
+ messages/MPoolOpReply.h \
+ messages/MRemoveSnaps.h \
+ messages/MRoute.h \
+ messages/MForward.h \
+ messages/MStatfs.h \
+ messages/MStatfsReply.h \
+ messages/MTimeCheck.h \
+ messages/MWatchNotify.h \
+ messages/PaxosServiceMessage.h
+
diff --git a/src/mon/Makefile.am b/src/mon/Makefile.am
new file mode 100644
index 00000000000..d9094a81b0e
--- /dev/null
+++ b/src/mon/Makefile.am
@@ -0,0 +1,45 @@
+libmon_la_SOURCES = \
+ mon/Monitor.cc \
+ mon/Paxos.cc \
+ mon/PaxosService.cc \
+ mon/OSDMonitor.cc \
+ mon/MDSMonitor.cc \
+ mon/MonmapMonitor.cc \
+ mon/PGMonitor.cc \
+ mon/PGMap.cc \
+ mon/LogMonitor.cc \
+ mon/AuthMonitor.cc \
+ mon/Elector.cc \
+ mon/MonitorStore.cc \
+ mon/HealthMonitor.cc \
+ mon/DataHealthService.cc \
+ mon/ConfigKeyService.cc
+libmon_la_LIBADD = $(LIBAUTH) $(LIBCOMMON) $(LIBOS)
+noinst_LTLIBRARIES += libmon.la
+
+noinst_HEADERS += \
+ mon/AuthMonitor.h \
+ mon/DataHealthService.h \
+ mon/Elector.h \
+ mon/LogMonitor.h \
+ mon/ConfigKeyService.h \
+ mon/HealthMonitor.h \
+ mon/HealthService.h \
+ mon/MDSMonitor.h \
+ mon/MonmapMonitor.h \
+ mon/MonCap.h \
+ mon/MonClient.h \
+ mon/MonCommands.h \
+ mon/MonMap.h \
+ mon/Monitor.h \
+ mon/MonitorStore.h \
+ mon/MonitorDBStore.h \
+ mon/OSDMonitor.h \
+ mon/PGMap.h \
+ mon/PGMonitor.h \
+ mon/Paxos.h \
+ mon/PaxosService.h \
+ mon/QuorumService.h \
+ mon/Session.h \
+ mon/mon_types.h
+
diff --git a/src/msg/Makefile.am b/src/msg/Makefile.am
new file mode 100644
index 00000000000..a849a1ca26a
--- /dev/null
+++ b/src/msg/Makefile.am
@@ -0,0 +1,20 @@
+libmsg_la_SOURCES = \
+ msg/Accepter.cc \
+ msg/DispatchQueue.cc \
+ msg/Message.cc \
+ msg/Messenger.cc \
+ msg/Pipe.cc \
+ msg/SimpleMessenger.cc \
+ msg/msg_types.cc
+
+noinst_HEADERS += \
+ msg/Accepter.h \
+ msg/DispatchQueue.h \
+ msg/Dispatcher.h \
+ msg/Message.h \
+ msg/Messenger.h \
+ msg/Pipe.h \
+ msg/SimpleMessenger.h \
+ msg/msg_types.h
+
+noinst_LTLIBRARIES += libmsg.la
diff --git a/src/os/BtrfsFileStoreBackend.cc b/src/os/BtrfsFileStoreBackend.cc
index ac7d1014ac7..bb11a45e10b 100644
--- a/src/os/BtrfsFileStoreBackend.cc
+++ b/src/os/BtrfsFileStoreBackend.cc
@@ -12,7 +12,9 @@
*
*/
-#include <inttypes.h>
+#include "include/int_types.h"
+#include "include/types.h"
+
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
@@ -22,7 +24,6 @@
#include <sys/ioctl.h>
#include "include/compat.h"
#include "include/linux_fiemap.h"
-#include "include/types.h"
#include "include/color.h"
#include "include/buffer.h"
#include "include/assert.h"
diff --git a/src/os/DBObjectMap.cc b/src/os/DBObjectMap.cc
index 5142f4d7420..90c840bbe9c 100644
--- a/src/os/DBObjectMap.cc
+++ b/src/os/DBObjectMap.cc
@@ -1,13 +1,13 @@
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-#include <iostream>
-#include <inttypes.h>
+#include "include/int_types.h"
#include "include/buffer.h"
+
+#include <iostream>
#include <set>
#include <map>
#include <string>
#include <tr1/memory>
-
#include <vector>
#include "ObjectMap.h"
diff --git a/src/os/FDCache.h b/src/os/FDCache.h
index f0f40e7bbf4..00e632f3e0f 100644
--- a/src/os/FDCache.h
+++ b/src/os/FDCache.h
@@ -18,7 +18,7 @@
#include <memory>
#include <errno.h>
#include <cstdio>
-#include "hobject.h"
+#include "common/hobject.h"
#include "common/Mutex.h"
#include "common/Cond.h"
#include "common/shared_cache.hpp"
diff --git a/src/os/FileStore.cc b/src/os/FileStore.cc
index d4d540df876..7ef415213b0 100644
--- a/src/os/FileStore.cc
+++ b/src/os/FileStore.cc
@@ -11,8 +11,8 @@
* Foundation. See file COPYING.
*
*/
+#include "include/int_types.h"
-#include <inttypes.h>
#include <unistd.h>
#include <stdlib.h>
#include <sys/types.h>
@@ -30,10 +30,6 @@
#include <iostream>
#include <map>
-#if defined(__FreeBSD__)
-#include "include/inttypes.h"
-#endif
-
#include "include/compat.h"
#include "include/linux_fiemap.h"
diff --git a/src/os/GenericFileStoreBackend.cc b/src/os/GenericFileStoreBackend.cc
index d0b3df5f6f2..461158fdfab 100644
--- a/src/os/GenericFileStoreBackend.cc
+++ b/src/os/GenericFileStoreBackend.cc
@@ -12,7 +12,9 @@
*
*/
-#include <inttypes.h>
+#include "include/int_types.h"
+#include "include/types.h"
+
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
@@ -27,7 +29,6 @@
#include "include/compat.h"
#include "include/linux_fiemap.h"
-#include "include/types.h"
#include <iostream>
#include <fstream>
diff --git a/src/os/Makefile.am b/src/os/Makefile.am
new file mode 100644
index 00000000000..b7fef8dd209
--- /dev/null
+++ b/src/os/Makefile.am
@@ -0,0 +1,49 @@
+libos_la_SOURCES = \
+ os/FileJournal.cc \
+ os/FileStore.cc \
+ os/chain_xattr.cc \
+ os/ObjectStore.cc \
+ os/JournalingObjectStore.cc \
+ os/LFNIndex.cc \
+ os/HashIndex.cc \
+ os/IndexManager.cc \
+ os/FlatIndex.cc \
+ os/DBObjectMap.cc \
+ os/LevelDBStore.cc \
+ os/WBThrottle.cc \
+ os/BtrfsFileStoreBackend.cc \
+ os/GenericFileStoreBackend.cc \
+ os/ZFSFileStoreBackend.cc
+noinst_LTLIBRARIES += libos.la
+
+noinst_HEADERS += \
+ os/btrfs_ioctl.h \
+ os/chain_xattr.h \
+ os/CollectionIndex.h \
+ os/FileJournal.h \
+ os/FileStore.h \
+ os/BtrfsFileStoreBackend.h \
+ os/GenericFileStoreBackend.h \
+ os/ZFSFileStoreBackend.h \
+ os/FlatIndex.h \
+ os/HashIndex.h \
+ os/FDCache.h \
+ os/WBThrottle.h \
+ os/IndexManager.h \
+ os/Journal.h \
+ os/JournalingObjectStore.h \
+ os/LFNIndex.h \
+ os/ObjectStore.h \
+ os/SequencerPosition.h \
+ os/ObjectMap.h \
+ os/DBObjectMap.h \
+ os/KeyValueDB.h \
+ os/LevelDBStore.h
+
+if WITH_LIBZFS
+libos_zfs_a_SOURCES = os/ZFS.cc
+libos_zfs_a_CXXFLAGS = ${AM_CXXFLAGS} ${LIBZFS_CFLAGS}
+noinst_LIBRARIES += libos_zfs.a
+noinst_HEADERS += os/ZFS.h
+endif
+
diff --git a/src/os/WBThrottle.h b/src/os/WBThrottle.h
index 070de08e123..d480a6b751c 100644
--- a/src/os/WBThrottle.h
+++ b/src/os/WBThrottle.h
@@ -20,7 +20,7 @@
#include <tr1/memory>
#include "include/buffer.h"
#include "common/Formatter.h"
-#include "os/hobject.h"
+#include "common/hobject.h"
#include "include/interval_set.h"
#include "FDCache.h"
#include "common/Thread.h"
diff --git a/src/os/ZFSFileStoreBackend.cc b/src/os/ZFSFileStoreBackend.cc
index 0f01bd20ee7..aa52b8d2933 100644
--- a/src/os/ZFSFileStoreBackend.cc
+++ b/src/os/ZFSFileStoreBackend.cc
@@ -1,7 +1,9 @@
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
-#include <inttypes.h>
+#include "include/int_types.h"
+#include "include/types.h"
+
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
@@ -12,7 +14,6 @@
#include "include/compat.h"
#include "include/linux_fiemap.h"
-#include "include/types.h"
#include "include/color.h"
#include "include/buffer.h"
#include "include/assert.h"
diff --git a/src/os/chain_xattr.cc b/src/os/chain_xattr.cc
index 96f334f8d00..62733e390d3 100644
--- a/src/os/chain_xattr.cc
+++ b/src/os/chain_xattr.cc
@@ -3,7 +3,8 @@
#include "chain_xattr.h"
-#include <inttypes.h>
+#include "include/int_types.h"
+
#include <unistd.h>
#include <stdlib.h>
#include <sys/types.h>
@@ -21,10 +22,6 @@
#include <linux/fs.h>
#endif
-#if defined(__FreeBSD__)
-#include "include/inttypes.h"
-#endif
-
#include "common/xattr.h"
/*
diff --git a/src/osd/ErasureCodeInterface.h b/src/osd/ErasureCodeInterface.h
new file mode 100644
index 00000000000..5ce2842d562
--- /dev/null
+++ b/src/osd/ErasureCodeInterface.h
@@ -0,0 +1,210 @@
+// -*- 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) 2013 Cloudwatt <libre.licensing@cloudwatt.com>
+ *
+ * Author: Loic Dachary <loic@dachary.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ */
+
+#ifndef CEPH_ERASURE_CODE_INTERFACE_H
+#define CEPH_ERASURE_CODE_INTERFACE_H
+
+/*! @file ErasureCodeInterface.h
+ @brief Interface provided by erasure code plugins
+
+ The erasure coded pools rely on plugins implementing
+ **ErasureCodeInterface** to encode and decode content. All codes
+ are systematic (i.e. the data is not mangled and can be
+ reconstructed by concatenating chunks ).
+
+ All methods returns **0** on success and a negative value on
+ error. If the value returned on error is not explained in
+ **ErasureCodeInterface**, the sources or the documentation of the
+ interface implementer must be read to figure out what it means. It
+ is recommended that each error code matches an *errno* value that
+ relates to the cause of the error.
+
+ Assuming the interface implementer provides three data chunks ( K
+ = 3 ) and two coding chunks ( M = 2 ), a buffer can be encoded as
+ follows:
+
+ ~~~~~~~~~~~~~~~~{.c}
+ set<int> want_to_encode(0, 1, 2, // data chunks
+ 3, 4 // coding chunks
+ );
+ bufferlist in = "ABCDEF";
+ map<int, bufferlist> encoded
+ encode(want_to_encode, in, &encoded);
+ encoded[0] == "AB" // data chunk 0
+ encoded[1] == "CD" // data chunk 1
+ encoded[2] == "EF" // data chunk 2
+ encoded[3] // coding chunk 0
+ encoded[4] // coding chunk 1
+ ~~~~~~~~~~~~~~~~
+
+ If encoded[2] ( which contains **EF** ) is missing and accessing
+ encoded[3] ( the first coding chunk ) is more expensive than
+ accessing encoded[4] ( the second coding chunk ), the
+ **minimum_to_decode_with_cost** method can be called as follows:
+
+ ~~~~~~~~~~~~~~~~{.c}
+ set<int> want_to_read(2); // want the chunk containing "EF"
+ map<int,int> available(
+ 0 => 1, // data chunk 0 : available and costs 1
+ 1 => 1, // data chunk 1 : available and costs 1
+ 3 => 9, // coding chunk 1 : available and costs 9
+ 4 => 1, // coding chunk 2 : available and costs 1
+ );
+ set<int> minimum;
+ minimum_to_decode_with_cost(want_to_read,
+ available,
+ &minimum);
+ minimum == set<int>(0, 1, 4);
+ ~~~~~~~~~~~~~~~~
+
+ It sets **minimum** with three chunks to reconstruct the desired
+ data chunk and will pick the second coding chunk ( 4 ) because it
+ is less expensive ( 1 < 9 ) to retrieve than the first coding
+ chunk ( 3 ). The caller is responsible for retrieving the chunks
+ and call **decode** to reconstruct the second data chunk content.
+
+ ~~~~~~~~~~~~~~~~{.c}
+ map<int,bufferlist> chunks;
+ for i in minimum.keys():
+ chunks[i] = fetch_chunk(i); // get chunk from storage
+ map<int, bufferlist> decoded;
+ decode(want_to_read, chunks, &decoded);
+ decoded[2] == "EF"
+ ~~~~~~~~~~~~~~~~
+
+ */
+
+#include <map>
+#include <set>
+#include <tr1/memory>
+#include "include/buffer.h"
+
+using namespace std;
+
+namespace ceph {
+
+ class ErasureCodeInterface {
+ public:
+ virtual ~ErasureCodeInterface() {}
+
+ /**
+ * Compute the smallest subset of **available** chunks that needs
+ * to be retrieved in order to successfully decode
+ * **want_to_read** chunks.
+ *
+ * It is strictly equivalent to calling
+ * **minimum_to_decode_with_cost** where each **available** chunk
+ * has the same cost.
+ *
+ * @see minimum_to_decode_with_cost
+ *
+ * @param [in] want_to_read chunk indexes to be decoded
+ * @param [in] available chunk indexes containing valid data
+ * @param [out] minimum chunk indexes to retrieve for decode
+ * @return **0** on success or a negative errno on error.
+ */
+ virtual int minimum_to_decode(const set<int> &want_to_read,
+ const set<int> &available,
+ set<int> *minimum) = 0;
+
+ /**
+ * Compute the smallest subset of **available** chunks that needs
+ * to be retrieved in order to successfully decode
+ * **want_to_read** chunks. If there are more than one possible
+ * subset, select the subset that contains the chunks with the
+ * lowest cost.
+ *
+ * The **available** parameter maps chunk indexes to their
+ * retrieval cost. The higher the cost value, the more costly it
+ * is to retrieve the chunk content.
+ *
+ * Returns -EIO if there are not enough chunk indexes in
+ * **available** to decode **want_to_read**.
+ *
+ * Returns 0 on success.
+ *
+ * The **minimum** argument must be a pointer to an empty set.
+ *
+ * @param [in] want_to_read chunk indexes to be decoded
+ * @param [in] available map chunk indexes containing valid data
+ * to their retrieval cost
+ * @param [out] minimum chunk indexes to retrieve for decode
+ * @return **0** on success or a negative errno on error.
+ */
+ virtual int minimum_to_decode_with_cost(const set<int> &want_to_read,
+ const map<int, int> &available,
+ set<int> *minimum) = 0;
+
+ /**
+ * Encode the content of **in** and store the result in
+ * **encoded**. The **encoded** map contains at least all
+ * chunk indexes found in the **want_to_encode** set.
+ *
+ * The **encoded** map is expected to be a pointer to an empty
+ * map.
+ *
+ * The **encoded** map may contain more chunks than required by
+ * **want_to_encode** and the caller is expected to permanently
+ * store all of them, not just the chunks from **want_to_encode**.
+ *
+ * Returns 0 on success.
+ *
+ * @param [in] want_to_encode chunk indexes to be encoded
+ * @param [in] in data to be encoded
+ * @param [out] encoded map chunk indexes to chunk data
+ * @return **0** on success or a negative errno on error.
+ */
+ virtual int encode(const set<int> &want_to_encode,
+ const bufferlist &in,
+ map<int, bufferlist> *encoded) = 0;
+
+ /**
+ * Decode the **chunks** and store at least **want_to_read** chunks
+ * in **decoded**.
+ *
+ * There must be enough **chunks** ( as returned by
+ * **minimum_to_decode** or **minimum_to_decode_with_cost** ) to
+ * perform a successfull decoding of all chunks found in
+ * **want_to_read**.
+ *
+ * The **decoded** map is expected to be a pointer to an empty
+ * map.
+ *
+ * The **decoded** map may contain more chunks than required by
+ * **want_to_read** and they can safely be used by the caller.
+ *
+ * If a chunk is listed in **want_to_read** and there is
+ * corresponding **bufferlist** in **chunks**, it will be copied
+ * verbatim into **decoded**. If not it will be reconstructed from
+ * the existing chunks.
+ *
+ * Returns 0 on success.
+ *
+ * @param [in] want_to_read chunk indexes to be decoded
+ * @param [in] chunks map chunk indexes to chunk data
+ * @param [out] decoded map chunk indexes to chunk data
+ * @return **0** on success or a negative errno on error.
+ */
+ virtual int decode(const set<int> &want_to_read,
+ const map<int, bufferlist> &chunks,
+ map<int, bufferlist> *decoded) = 0;
+ };
+
+ typedef std::tr1::shared_ptr<ErasureCodeInterface> ErasureCodeInterfaceRef;
+
+}
+
+#endif
diff --git a/src/osd/ErasureCodePlugin.cc b/src/osd/ErasureCodePlugin.cc
new file mode 100644
index 00000000000..10b65b2604b
--- /dev/null
+++ b/src/osd/ErasureCodePlugin.cc
@@ -0,0 +1,134 @@
+// -*- 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) 2013 Cloudwatt <libre.licensing@cloudwatt.com>
+ *
+ * Author: Loic Dachary <loic@dachary.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ */
+
+#include "common/debug.h"
+
+#include <dlfcn.h>
+
+#include "ErasureCodePlugin.h"
+
+#define dout_subsys ceph_subsys_osd
+#undef dout_prefix
+#define dout_prefix _prefix(_dout)
+
+static ostream& _prefix(std::ostream* _dout)
+{
+ return *_dout << "ErasureCodePlugin: ";
+}
+
+#define PLUGIN_PREFIX "libec_"
+#define PLUGIN_SUFFIX ".so"
+#define PLUGIN_INIT_FUNCTION "__erasure_code_init"
+
+ErasureCodePluginRegistry ErasureCodePluginRegistry::singleton;
+
+ErasureCodePluginRegistry::ErasureCodePluginRegistry() :
+ lock("ErasureCodePluginRegistry::lock")
+{
+}
+
+ErasureCodePluginRegistry::~ErasureCodePluginRegistry()
+{
+ for (std::map<std::string,ErasureCodePlugin*>::iterator i = plugins.begin();
+ i != plugins.end();
+ i++) {
+ void *library = i->second->library;
+ delete i->second;
+ dlclose(library);
+ }
+}
+
+int ErasureCodePluginRegistry::add(const std::string &name,
+ ErasureCodePlugin* plugin)
+{
+ if (plugins.find(name) != plugins.end())
+ return -EEXIST;
+ plugins[name] = plugin;
+ return 0;
+}
+
+ErasureCodePlugin *ErasureCodePluginRegistry::get(const std::string &name)
+{
+ if (plugins.find(name) != plugins.end())
+ return plugins[name];
+ else
+ return 0;
+}
+
+int ErasureCodePluginRegistry::factory(const std::string &plugin_name,
+ const map<std::string,std::string> &parameters,
+ ErasureCodeInterfaceRef *erasure_code)
+{
+ Mutex::Locker l(lock);
+ int r = 0;
+ ErasureCodePlugin *plugin = get(plugin_name);
+ if (plugin == 0) {
+ r = load(plugin_name, parameters, &plugin);
+ if (r != 0)
+ return r;
+ }
+
+ return plugin->factory(parameters, erasure_code);
+}
+
+int ErasureCodePluginRegistry::load(const std::string &plugin_name,
+ const map<std::string,std::string> &parameters,
+ ErasureCodePlugin **plugin)
+{
+ assert(parameters.count("erasure-code-directory") != 0);
+ std::string fname = parameters.find("erasure-code-directory")->second
+ + "/" PLUGIN_PREFIX
+ + plugin_name + PLUGIN_SUFFIX;
+ dout(10) << "load " << plugin_name << " from " << fname << dendl;
+
+ void *library = dlopen(fname.c_str(), RTLD_NOW);
+ if (!library) {
+ derr << "load dlopen(" << fname
+ << "): " << dlerror() << dendl;
+ return -EIO;
+ }
+
+ int (*erasure_code_init)(const char *) =
+ (int (*)(const char *))dlsym(library, PLUGIN_INIT_FUNCTION);
+ if (erasure_code_init) {
+ std::string name = plugin_name;
+ int r = erasure_code_init(name.c_str());
+ if (r != 0) {
+ derr << "erasure_code_init(" << plugin_name
+ << "): " << strerror(-r) << dendl;
+ return r;
+ }
+ } else {
+ derr << "load dlsym(" << fname
+ << ", " << PLUGIN_INIT_FUNCTION
+ << "): " << dlerror() << dendl;
+ dlclose(library);
+ return -ENOENT;
+ }
+
+ *plugin = get(plugin_name);
+ if (*plugin == 0) {
+ derr << "load " << PLUGIN_INIT_FUNCTION << "()"
+ << "did not register " << plugin_name << dendl;
+ dlclose(library);
+ return -EBADF;
+ }
+
+ (*plugin)->library = library;
+
+ return 0;
+}
+
diff --git a/src/osd/ErasureCodePlugin.h b/src/osd/ErasureCodePlugin.h
new file mode 100644
index 00000000000..f1c1ccb31b3
--- /dev/null
+++ b/src/osd/ErasureCodePlugin.h
@@ -0,0 +1,69 @@
+// -*- 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) 2013 Cloudwatt <libre.licensing@cloudwatt.com>
+ *
+ * Author: Loic Dachary <loic@dachary.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ */
+
+#ifndef CEPH_ERASURE_CODE_PLUGIN_H
+#define CEPH_ERASURE_CODE_PLUGIN_H
+
+#include "common/Mutex.h"
+#include "ErasureCodeInterface.h"
+
+extern "C" {
+ int __erasure_code_init(char *plugin_name);
+}
+
+namespace ceph {
+
+ class ErasureCodePlugin {
+ public:
+ void *library;
+
+ ErasureCodePlugin() :
+ library(0) {}
+ virtual ~ErasureCodePlugin() {}
+
+ virtual int factory(const map<std::string,std::string> &parameters,
+ ErasureCodeInterfaceRef *erasure_code) = 0;
+ };
+
+ class ErasureCodePluginRegistry {
+ public:
+ Mutex lock;
+ std::map<std::string,ErasureCodePlugin*> plugins;
+
+ static ErasureCodePluginRegistry singleton;
+
+ ErasureCodePluginRegistry();
+ ~ErasureCodePluginRegistry();
+
+ static ErasureCodePluginRegistry &instance() {
+ return singleton;
+ }
+
+ int factory(const std::string &plugin,
+ const map<std::string,std::string> &parameters,
+ ErasureCodeInterfaceRef *erasure_code);
+
+ int add(const std::string &name, ErasureCodePlugin *plugin);
+ ErasureCodePlugin *get(const std::string &name);
+
+ int load(const std::string &plugin_name,
+ const map<std::string,std::string> &parameters,
+ ErasureCodePlugin **plugin);
+
+ };
+}
+
+#endif
diff --git a/src/osd/Makefile.am b/src/osd/Makefile.am
new file mode 100644
index 00000000000..a6ab39275aa
--- /dev/null
+++ b/src/osd/Makefile.am
@@ -0,0 +1,38 @@
+## erasure code plugins
+erasure_codelibdir = $(libdir)/erasure-code
+erasure_codelib_LTLIBRARIES =
+
+libosd_la_SOURCES = \
+ osd/ErasureCodePlugin.cc \
+ osd/PG.cc \
+ osd/PGLog.cc \
+ osd/ReplicatedPG.cc \
+ osd/Ager.cc \
+ osd/OSD.cc \
+ osd/OSDCap.cc \
+ osd/Watch.cc \
+ osd/ClassHandler.cc \
+ osd/OpRequest.cc \
+ osd/SnapMapper.cc \
+ osd/osd_types.cc \
+ objclass/class_api.cc
+libosd_la_LIBADD = $(LIBOSDC) $(LIBOS)
+noinst_LTLIBRARIES += libosd.la
+
+noinst_HEADERS += \
+ osd/Ager.h \
+ osd/ClassHandler.h \
+ osd/ErasureCodeInterface.h \
+ osd/ErasureCodePlugin.h \
+ osd/OSD.h \
+ osd/OSDCap.h \
+ osd/OSDMap.h \
+ osd/ObjectVersioner.h \
+ osd/OpRequest.h \
+ osd/SnapMapper.h \
+ osd/PG.h \
+ osd/PGLog.h \
+ osd/ReplicatedPG.h \
+ osd/Watch.h \
+ osd/osd_types.h
+
diff --git a/src/osd/OSD.h b/src/osd/OSD.h
index 239ce88dcb3..f5f50be4af8 100644
--- a/src/osd/OSD.h
+++ b/src/osd/OSD.h
@@ -439,7 +439,7 @@ public:
bool ms_get_authorizer(int dest_type,
AuthAuthorizer **authorizer,
bool force_new);
- ObjecterDispatcher(OSDService *o) : Dispatcher(g_ceph_context), osd(o) {}
+ ObjecterDispatcher(OSDService *o) : Dispatcher(cct), osd(o) {}
} objecter_dispatcher;
friend class ObjecterDispatcher;
diff --git a/src/osd/PG.cc b/src/osd/PG.cc
index e2fb09f6b5a..f319d160a39 100644
--- a/src/osd/PG.cc
+++ b/src/osd/PG.cc
@@ -5118,9 +5118,9 @@ std::ostream& operator<<(std::ostream& oss,
/*------Crashed-------*/
PG::RecoveryState::Crashed::Crashed(my_context ctx)
- : my_base(ctx)
+ : my_base(ctx),
+ NamedState(context< RecoveryMachine >().pg->cct, "Crashed")
{
- state_name = "Crashed";
context< RecoveryMachine >().log_enter(state_name);
assert(0 == "we got a bad state machine event");
}
@@ -5128,9 +5128,9 @@ PG::RecoveryState::Crashed::Crashed(my_context ctx)
/*------Initial-------*/
PG::RecoveryState::Initial::Initial(my_context ctx)
- : my_base(ctx)
+ : my_base(ctx),
+ NamedState(context< RecoveryMachine >().pg->cct, "Initial")
{
- state_name = "Initial";
context< RecoveryMachine >().log_enter(state_name);
}
@@ -5179,9 +5179,9 @@ void PG::RecoveryState::Initial::exit()
/*------Started-------*/
PG::RecoveryState::Started::Started(my_context ctx)
- : my_base(ctx)
+ : my_base(ctx),
+ NamedState(context< RecoveryMachine >().pg->cct, "Started")
{
- state_name = "Started";
context< RecoveryMachine >().log_enter(state_name);
}
@@ -5228,9 +5228,9 @@ void PG::RecoveryState::Started::exit()
/*--------Reset---------*/
PG::RecoveryState::Reset::Reset(my_context ctx)
- : my_base(ctx)
+ : my_base(ctx),
+ NamedState(context< RecoveryMachine >().pg->cct, "Reset")
{
- state_name = "Reset";
context< RecoveryMachine >().log_enter(state_name);
PG *pg = context< RecoveryMachine >().pg;
pg->flushed = false;
@@ -5303,9 +5303,9 @@ void PG::RecoveryState::Reset::exit()
/*-------Start---------*/
PG::RecoveryState::Start::Start(my_context ctx)
- : my_base(ctx)
+ : my_base(ctx),
+ NamedState(context< RecoveryMachine >().pg->cct, "Start")
{
- state_name = "Start";
context< RecoveryMachine >().log_enter(state_name);
PG *pg = context< RecoveryMachine >().pg;
@@ -5328,9 +5328,9 @@ void PG::RecoveryState::Start::exit()
/*---------Primary--------*/
PG::RecoveryState::Primary::Primary(my_context ctx)
- : my_base(ctx)
+ : my_base(ctx),
+ NamedState(context< RecoveryMachine >().pg->cct, "Started/Primary")
{
- state_name = "Started/Primary";
context< RecoveryMachine >().log_enter(state_name);
PG *pg = context< RecoveryMachine >().pg;
assert(pg->want_acting.empty());
@@ -5377,9 +5377,10 @@ void PG::RecoveryState::Primary::exit()
/*---------Peering--------*/
PG::RecoveryState::Peering::Peering(my_context ctx)
- : my_base(ctx), flushed(false)
+ : my_base(ctx),
+ NamedState(context< RecoveryMachine >().pg->cct, "Started/Primary/Peering"),
+ flushed(false)
{
- state_name = "Started/Primary/Peering";
context< RecoveryMachine >().log_enter(state_name);
PG *pg = context< RecoveryMachine >().pg;
@@ -5466,9 +5467,9 @@ void PG::RecoveryState::Peering::exit()
/*------Backfilling-------*/
PG::RecoveryState::Backfilling::Backfilling(my_context ctx)
- : my_base(ctx)
+ : my_base(ctx),
+ NamedState(context< RecoveryMachine >().pg->cct, "Started/Primary/Active/Backfilling")
{
- state_name = "Started/Primary/Active/Backfilling";
context< RecoveryMachine >().log_enter(state_name);
PG *pg = context< RecoveryMachine >().pg;
pg->backfill_reserved = true;
@@ -5504,9 +5505,9 @@ void PG::RecoveryState::Backfilling::exit()
/*--WaitRemoteBackfillReserved--*/
PG::RecoveryState::WaitRemoteBackfillReserved::WaitRemoteBackfillReserved(my_context ctx)
- : my_base(ctx)
+ : my_base(ctx),
+ NamedState(context< RecoveryMachine >().pg->cct, "Started/Primary/Active/WaitRemoteBackfillReserved")
{
- state_name = "Started/Primary/Active/WaitRemoteBackfillReserved";
context< RecoveryMachine >().log_enter(state_name);
PG *pg = context< RecoveryMachine >().pg;
pg->state_set(PG_STATE_BACKFILL_WAIT);
@@ -5559,9 +5560,9 @@ PG::RecoveryState::WaitRemoteBackfillReserved::react(const RemoteReservationReje
/*--WaitLocalBackfillReserved--*/
PG::RecoveryState::WaitLocalBackfillReserved::WaitLocalBackfillReserved(my_context ctx)
- : my_base(ctx)
+ : my_base(ctx),
+ NamedState(context< RecoveryMachine >().pg->cct, "Started/Primary/Active/WaitLocalBackfillReserved")
{
- state_name = "Started/Primary/Active/WaitLocalBackfillReserved";
context< RecoveryMachine >().log_enter(state_name);
PG *pg = context< RecoveryMachine >().pg;
pg->state_set(PG_STATE_BACKFILL_WAIT);
@@ -5583,9 +5584,9 @@ void PG::RecoveryState::WaitLocalBackfillReserved::exit()
/*----NotBackfilling------*/
PG::RecoveryState::NotBackfilling::NotBackfilling(my_context ctx)
- : my_base(ctx)
+ : my_base(ctx),
+ NamedState(context< RecoveryMachine >().pg->cct, "Started/Primary/Active/NotBackfilling")
{
- state_name = "Started/Primary/Active/NotBackfilling";
context< RecoveryMachine >().log_enter(state_name);
}
@@ -5599,9 +5600,9 @@ void PG::RecoveryState::NotBackfilling::exit()
/*---RepNotRecovering----*/
PG::RecoveryState::RepNotRecovering::RepNotRecovering(my_context ctx)
- : my_base(ctx)
+ : my_base(ctx),
+ NamedState(context< RecoveryMachine >().pg->cct, "Started/ReplicaActive/RepNotRecovering")
{
- state_name = "Started/ReplicaActive/RepNotRecovering";
context< RecoveryMachine >().log_enter(state_name);
}
@@ -5615,9 +5616,9 @@ void PG::RecoveryState::RepNotRecovering::exit()
/*---RepWaitRecoveryReserved--*/
PG::RecoveryState::RepWaitRecoveryReserved::RepWaitRecoveryReserved(my_context ctx)
- : my_base(ctx)
+ : my_base(ctx),
+ NamedState(context< RecoveryMachine >().pg->cct, "Started/ReplicaActive/RepWaitRecoveryReserved")
{
- state_name = "Started/ReplicaActive/RepWaitRecoveryReserved";
context< RecoveryMachine >().log_enter(state_name);
PG *pg = context< RecoveryMachine >().pg;
@@ -5652,9 +5653,9 @@ void PG::RecoveryState::RepWaitRecoveryReserved::exit()
/*-RepWaitBackfillReserved*/
PG::RecoveryState::RepWaitBackfillReserved::RepWaitBackfillReserved(my_context ctx)
- : my_base(ctx)
+ : my_base(ctx),
+ NamedState(context< RecoveryMachine >().pg->cct, "Started/ReplicaActive/RepWaitBackfillReserved")
{
- state_name = "Started/ReplicaActive/RepWaitBackfillReserved";
context< RecoveryMachine >().log_enter(state_name);
}
@@ -5712,9 +5713,9 @@ PG::RecoveryState::RepWaitBackfillReserved::react(const RemoteReservationRejecte
/*---RepRecovering-------*/
PG::RecoveryState::RepRecovering::RepRecovering(my_context ctx)
- : my_base(ctx)
+ : my_base(ctx),
+ NamedState(context< RecoveryMachine >().pg->cct, "Started/ReplicaActive/RepRecovering")
{
- state_name = "Started/ReplicaActive/RepRecovering";
context< RecoveryMachine >().log_enter(state_name);
}
@@ -5737,9 +5738,9 @@ void PG::RecoveryState::RepRecovering::exit()
/*------Activating--------*/
PG::RecoveryState::Activating::Activating(my_context ctx)
- : my_base(ctx)
+ : my_base(ctx),
+ NamedState(context< RecoveryMachine >().pg->cct, "Started/Primary/Active/Activating")
{
- state_name = "Started/Primary/Active/Activating";
context< RecoveryMachine >().log_enter(state_name);
}
@@ -5752,9 +5753,9 @@ void PG::RecoveryState::Activating::exit()
}
PG::RecoveryState::WaitLocalRecoveryReserved::WaitLocalRecoveryReserved(my_context ctx)
- : my_base(ctx)
+ : my_base(ctx),
+ NamedState(context< RecoveryMachine >().pg->cct, "Started/Primary/Active/WaitLocalRecoveryReserved")
{
- state_name = "Started/Primary/Active/WaitLocalRecoveryReserved";
context< RecoveryMachine >().log_enter(state_name);
PG *pg = context< RecoveryMachine >().pg;
pg->state_set(PG_STATE_RECOVERY_WAIT);
@@ -5775,9 +5776,9 @@ void PG::RecoveryState::WaitLocalRecoveryReserved::exit()
PG::RecoveryState::WaitRemoteRecoveryReserved::WaitRemoteRecoveryReserved(my_context ctx)
: my_base(ctx),
+ NamedState(context< RecoveryMachine >().pg->cct, "Started/Primary/Active/WaitRemoteRecoveryReserved"),
acting_osd_it(context< Active >().sorted_acting_set.begin())
{
- state_name = "Started/Primary/Active/WaitRemoteRecoveryReserved";
context< RecoveryMachine >().log_enter(state_name);
post_event(RemoteRecoveryReserved());
}
@@ -5821,9 +5822,9 @@ void PG::RecoveryState::WaitRemoteRecoveryReserved::exit()
}
PG::RecoveryState::Recovering::Recovering(my_context ctx)
- : my_base(ctx)
+ : my_base(ctx),
+ NamedState(context< RecoveryMachine >().pg->cct, "Started/Primary/Active/Recovering")
{
- state_name = "Started/Primary/Active/Recovering";
context< RecoveryMachine >().log_enter(state_name);
PG *pg = context< RecoveryMachine >().pg;
@@ -5884,11 +5885,11 @@ void PG::RecoveryState::Recovering::exit()
}
PG::RecoveryState::Recovered::Recovered(my_context ctx)
- : my_base(ctx)
+ : my_base(ctx),
+ NamedState(context< RecoveryMachine >().pg->cct, "Started/Primary/Active/Recovered")
{
int newest_update_osd;
- state_name = "Started/Primary/Active/Recovered";
context< RecoveryMachine >().log_enter(state_name);
PG *pg = context< RecoveryMachine >().pg;
@@ -5918,9 +5919,9 @@ void PG::RecoveryState::Recovered::exit()
}
PG::RecoveryState::Clean::Clean(my_context ctx)
- : my_base(ctx)
+ : my_base(ctx),
+ NamedState(context< RecoveryMachine >().pg->cct, "Started/Primary/Active/Clean")
{
- state_name = "Started/Primary/Active/Clean";
context< RecoveryMachine >().log_enter(state_name);
PG *pg = context< RecoveryMachine >().pg;
@@ -5948,11 +5949,11 @@ void PG::RecoveryState::Clean::exit()
/*---------Active---------*/
PG::RecoveryState::Active::Active(my_context ctx)
: my_base(ctx),
+ NamedState(context< RecoveryMachine >().pg->cct, "Started/Primary/Active"),
sorted_acting_set(context< RecoveryMachine >().pg->acting.begin(),
context< RecoveryMachine >().pg->acting.end()),
all_replicas_activated(false)
{
- state_name = "Started/Primary/Active";
context< RecoveryMachine >().log_enter(state_name);
PG *pg = context< RecoveryMachine >().pg;
@@ -6198,10 +6199,9 @@ void PG::RecoveryState::Active::exit()
/*------ReplicaActive-----*/
PG::RecoveryState::ReplicaActive::ReplicaActive(my_context ctx)
- : my_base(ctx)
+ : my_base(ctx),
+ NamedState(context< RecoveryMachine >().pg->cct, "Started/ReplicaActive")
{
- state_name = "Started/ReplicaActive";
-
context< RecoveryMachine >().log_enter(state_name);
PG *pg = context< RecoveryMachine >().pg;
@@ -6291,8 +6291,9 @@ void PG::RecoveryState::ReplicaActive::exit()
/*-------Stray---*/
PG::RecoveryState::Stray::Stray(my_context ctx)
- : my_base(ctx) {
- state_name = "Started/Stray";
+ : my_base(ctx),
+ NamedState(context< RecoveryMachine >().pg->cct, "Started/Stray")
+{
context< RecoveryMachine >().log_enter(state_name);
PG *pg = context< RecoveryMachine >().pg;
@@ -6393,9 +6394,9 @@ void PG::RecoveryState::Stray::exit()
/*--------GetInfo---------*/
PG::RecoveryState::GetInfo::GetInfo(my_context ctx)
- : my_base(ctx)
+ : my_base(ctx),
+ NamedState(context< RecoveryMachine >().pg->cct, "Started/Primary/Peering/GetInfo")
{
- state_name = "Started/Primary/Peering/GetInfo";
context< RecoveryMachine >().log_enter(state_name);
PG *pg = context< RecoveryMachine >().pg;
@@ -6567,10 +6568,11 @@ void PG::RecoveryState::GetInfo::exit()
}
/*------GetLog------------*/
-PG::RecoveryState::GetLog::GetLog(my_context ctx) :
- my_base(ctx), newest_update_osd(-1), msg(0)
+PG::RecoveryState::GetLog::GetLog(my_context ctx)
+ : my_base(ctx),
+ NamedState(context< RecoveryMachine >().pg->cct, "Started/Primary/Peering/GetLog"),
+ newest_update_osd(-1), msg(0)
{
- state_name = "Started/Primary/Peering/GetLog";
context< RecoveryMachine >().log_enter(state_name);
PG *pg = context< RecoveryMachine >().pg;
@@ -6683,9 +6685,9 @@ void PG::RecoveryState::GetLog::exit()
/*------WaitActingChange--------*/
PG::RecoveryState::WaitActingChange::WaitActingChange(my_context ctx)
- : my_base(ctx)
+ : my_base(ctx),
+ NamedState(context< RecoveryMachine >().pg->cct, "Started/Primary/Peering/WaitActingChange")
{
- state_name = "Started/Primary/Peering/WaitActingChange";
context< RecoveryMachine >().log_enter(state_name);
}
@@ -6743,9 +6745,9 @@ void PG::RecoveryState::WaitActingChange::exit()
/*------Incomplete--------*/
PG::RecoveryState::Incomplete::Incomplete(my_context ctx)
- : my_base(ctx)
+ : my_base(ctx),
+ NamedState(context< RecoveryMachine >().pg->cct, "Started/Primary/Peering/Incomplete")
{
- state_name = "Started/Primary/Peering/Incomplete";
context< RecoveryMachine >().log_enter(state_name);
PG *pg = context< RecoveryMachine >().pg;
@@ -6780,9 +6782,9 @@ void PG::RecoveryState::Incomplete::exit()
/*------GetMissing--------*/
PG::RecoveryState::GetMissing::GetMissing(my_context ctx)
- : my_base(ctx)
+ : my_base(ctx),
+ NamedState(context< RecoveryMachine >().pg->cct, "Started/Primary/Peering/GetMissing")
{
- state_name = "Started/Primary/Peering/GetMissing";
context< RecoveryMachine >().log_enter(state_name);
PG *pg = context< RecoveryMachine >().pg;
@@ -6905,9 +6907,9 @@ void PG::RecoveryState::GetMissing::exit()
/*---WaitFlushedPeering---*/
PG::RecoveryState::WaitFlushedPeering::WaitFlushedPeering(my_context ctx)
- : my_base(ctx)
+ : my_base(ctx),
+ NamedState(context< RecoveryMachine >().pg->cct, "Started/Primary/Peering/WaitFlushedPeering")
{
- state_name = "Started/Primary/Peering/WaitFlushedPeering";
PG *pg = context< RecoveryMachine >().pg;
context< RecoveryMachine >().log_enter(state_name);
if (context< RecoveryMachine >().pg->flushed)
@@ -6935,9 +6937,9 @@ PG::RecoveryState::WaitFlushedPeering::react(const QueryState &q)
/*------WaitUpThru--------*/
PG::RecoveryState::WaitUpThru::WaitUpThru(my_context ctx)
- : my_base(ctx)
+ : my_base(ctx),
+ NamedState(context< RecoveryMachine >().pg->cct, "Started/Primary/Peering/WaitUpThru")
{
- state_name = "Started/Primary/Peering/WaitUpThru";
context< RecoveryMachine >().log_enter(state_name);
}
diff --git a/src/osd/PG.h b/src/osd/PG.h
index 7fef58adbd1..cbafd0f43d9 100644
--- a/src/osd/PG.h
+++ b/src/osd/PG.h
@@ -385,7 +385,9 @@ public:
const char *state_name;
utime_t enter_time;
const char *get_state_name() { return state_name; }
- NamedState() : state_name(0), enter_time(ceph_clock_now(g_ceph_context)) {};
+ NamedState(CephContext *cct_, const char *state_name_)
+ : state_name(state_name_),
+ enter_time(ceph_clock_now(cct_)) {};
virtual ~NamedState() {}
};
diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc
index e1f8b0cf81e..b391e173d14 100644
--- a/src/osd/ReplicatedPG.cc
+++ b/src/osd/ReplicatedPG.cc
@@ -4134,7 +4134,7 @@ void ReplicatedPG::_copy_some(OpContext *ctx, CopyOpRef cop)
dout(10) << __func__ << " " << ctx << " " << cop << dendl;
ObjectOperation op;
op.assert_version(cop->version);
- op.copy_get(&cop->cursor, g_conf->osd_copyfrom_max_chunk,
+ op.copy_get(&cop->cursor, cct->_conf->osd_copyfrom_max_chunk,
&cop->size, &cop->mtime, &cop->attrs,
&cop->data, &cop->omap,
&cop->rval);
@@ -8066,9 +8066,10 @@ void ReplicatedPG::SnapTrimmer::log_exit(const char *state_name, utime_t enter_t
<< "SnapTrimmer state<" << get_state_name() << ">: ")
/* NotTrimming */
-ReplicatedPG::NotTrimming::NotTrimming(my_context ctx) : my_base(ctx)
+ReplicatedPG::NotTrimming::NotTrimming(my_context ctx)
+ : my_base(ctx),
+ NamedState(context< SnapTrimmer >().pg->cct, "NotTrimming")
{
- state_name = "NotTrimming";
context< SnapTrimmer >().requeue = false;
context< SnapTrimmer >().log_enter(state_name);
}
@@ -8107,9 +8108,10 @@ boost::statechart::result ReplicatedPG::NotTrimming::react(const SnapTrim&)
}
/* TrimmingObjects */
-ReplicatedPG::TrimmingObjects::TrimmingObjects(my_context ctx) : my_base(ctx)
+ReplicatedPG::TrimmingObjects::TrimmingObjects(my_context ctx)
+ : my_base(ctx),
+ NamedState(context< SnapTrimmer >().pg->cct, "Trimming/TrimmingObjects")
{
- state_name = "Trimming/TrimmingObjects";
context< SnapTrimmer >().log_enter(state_name);
}
@@ -8157,9 +8159,10 @@ boost::statechart::result ReplicatedPG::TrimmingObjects::react(const SnapTrim&)
return discard_event();
}
/* WaitingOnReplicasObjects */
-ReplicatedPG::WaitingOnReplicas::WaitingOnReplicas(my_context ctx) : my_base(ctx)
+ReplicatedPG::WaitingOnReplicas::WaitingOnReplicas(my_context ctx)
+ : my_base(ctx),
+ NamedState(context< SnapTrimmer >().pg->cct, "Trimming/WaitingOnReplicas")
{
- state_name = "Trimming/WaitingOnReplicas";
context< SnapTrimmer >().log_enter(state_name);
context< SnapTrimmer >().requeue = false;
}
diff --git a/src/osd/SnapMapper.h b/src/osd/SnapMapper.h
index 560cc43497f..f0d0baa2190 100644
--- a/src/osd/SnapMapper.h
+++ b/src/osd/SnapMapper.h
@@ -21,7 +21,7 @@
#include <string.h>
#include "common/map_cacher.hpp"
-#include "os/hobject.h"
+#include "common/hobject.h"
#include "include/buffer.h"
#include "include/encoding.h"
#include "include/object.h"
diff --git a/src/osd/osd_types.h b/src/osd/osd_types.h
index 312eb81e3fd..da139b853b1 100644
--- a/src/osd/osd_types.h
+++ b/src/osd/osd_types.h
@@ -26,7 +26,7 @@
#include "include/interval_set.h"
#include "common/snap_types.h"
#include "common/Formatter.h"
-#include "os/hobject.h"
+#include "common/hobject.h"
#include "Watch.h"
#define CEPH_OSD_ONDISK_MAGIC "ceph osd volume v026"
diff --git a/src/osdc/Makefile.am b/src/osdc/Makefile.am
new file mode 100644
index 00000000000..3a8a2165aaa
--- /dev/null
+++ b/src/osdc/Makefile.am
@@ -0,0 +1,17 @@
+libosdc_la_SOURCES = \
+ osdc/Objecter.cc \
+ osdc/ObjectCacher.cc \
+ osdc/Filer.cc \
+ osdc/Striper.cc \
+ osdc/Journaler.cc
+noinst_LTLIBRARIES += libosdc.la
+
+noinst_HEADERS += \
+ osdc/Blinker.h \
+ osdc/Filer.h \
+ osdc/Journaler.h \
+ osdc/ObjectCacher.h \
+ osdc/Objecter.h \
+ osdc/Striper.h \
+ osdc/WritebackHandler.h
+
diff --git a/src/perfglue/Makefile.am b/src/perfglue/Makefile.am
new file mode 100644
index 00000000000..c34e7f16760
--- /dev/null
+++ b/src/perfglue/Makefile.am
@@ -0,0 +1,23 @@
+libperfglue_la_SOURCES =
+
+if WITH_TCMALLOC
+libperfglue_la_SOURCES += perfglue/heap_profiler.cc
+AM_CFLAGS += -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free
+AM_CXXFLAGS += -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free
+else
+libperfglue_la_SOURCES += perfglue/disabled_heap_profiler.cc
+endif # WITH_TCMALLOC
+
+if WITH_PROFILER
+libperfglue_la_SOURCES += perfglue/cpu_profiler.cc
+else
+libperfglue_la_SOURCES += perfglue/disabled_stubs.cc
+endif # WITH_PROFILER
+
+libperfglue_la_LIBADD = -ltcmalloc
+noinst_LTLIBRARIES += libperfglue.la
+
+noinst_HEADERS += \
+ perfglue/cpu_profiler.h \
+ perfglue/heap_profiler.h
+
diff --git a/src/rbd.cc b/src/rbd.cc
index eba91958d8c..eea9733c4b9 100644
--- a/src/rbd.cc
+++ b/src/rbd.cc
@@ -8,6 +8,7 @@
* LGPL2. See file COPYING.
*
*/
+#include "include/int_types.h"
#include "mon/MonClient.h"
#include "mon/MonMap.h"
@@ -33,7 +34,6 @@
#include <boost/scoped_ptr.hpp>
#include <dirent.h>
#include <errno.h>
-#include <inttypes.h>
#include <iostream>
#include <memory>
#include <sstream>
diff --git a/src/rbd_fuse/rbd-fuse.c b/src/rbd_fuse/rbd-fuse.c
index 5a4bfe2702c..eea6edb9eb8 100644
--- a/src/rbd_fuse/rbd-fuse.c
+++ b/src/rbd_fuse/rbd-fuse.c
@@ -3,6 +3,8 @@
*/
#define FUSE_USE_VERSION 26
+#include "include/int_types.h"
+
#include <stdio.h>
#include <stdlib.h>
#include <stddef.h>
@@ -15,7 +17,6 @@
#include <sys/types.h>
#include <unistd.h>
#include <getopt.h>
-#include <inttypes.h>
#include "include/rbd/librbd.h"
diff --git a/src/rgw/Makefile.am b/src/rgw/Makefile.am
new file mode 100644
index 00000000000..b812d908569
--- /dev/null
+++ b/src/rgw/Makefile.am
@@ -0,0 +1,155 @@
+if WITH_RADOSGW
+librgw_la_SOURCES = \
+ rgw/librgw.cc \
+ rgw/rgw_acl.cc \
+ rgw/rgw_acl_s3.cc \
+ rgw/rgw_acl_swift.cc \
+ rgw/rgw_client_io.cc \
+ rgw/rgw_fcgi.cc \
+ rgw/rgw_xml.cc \
+ rgw/rgw_usage.cc \
+ rgw/rgw_json_enc.cc \
+ rgw/rgw_user.cc \
+ rgw/rgw_bucket.cc\
+ rgw/rgw_tools.cc \
+ rgw/rgw_rados.cc \
+ rgw/rgw_http_client.cc \
+ rgw/rgw_rest_client.cc \
+ rgw/rgw_rest_conn.cc \
+ rgw/rgw_op.cc \
+ rgw/rgw_common.cc \
+ rgw/rgw_cache.cc \
+ rgw/rgw_formats.cc \
+ rgw/rgw_log.cc \
+ rgw/rgw_multi.cc \
+ rgw/rgw_policy_s3.cc \
+ rgw/rgw_gc.cc \
+ rgw/rgw_multi_del.cc \
+ rgw/rgw_env.cc \
+ rgw/rgw_cors.cc \
+ rgw/rgw_cors_s3.cc \
+ rgw/rgw_auth_s3.cc \
+ rgw/rgw_metadata.cc \
+ rgw/rgw_replica_log.cc \
+ rgw/rgw_keystone.cc
+librgw_la_CXXFLAGS = -Woverloaded-virtual ${AM_CXXFLAGS}
+noinst_LTLIBRARIES += librgw.la
+
+LIBRGW_DEPS += \
+ $(LIBRADOS) \
+ libcls_rgw_client.la \
+ libcls_log_client.a \
+ libcls_statelog_client.a \
+ libcls_replica_log_client.a \
+ libcls_lock_client.la \
+ libcls_refcount_client.la \
+ libcls_version_client.a \
+ -lcurl \
+ -lexpat \
+ -lm \
+ -lfcgi
+
+radosgw_SOURCES = \
+ rgw/rgw_resolve.cc \
+ rgw/rgw_rest.cc \
+ rgw/rgw_rest_swift.cc \
+ rgw/rgw_rest_s3.cc \
+ rgw/rgw_rest_usage.cc \
+ rgw/rgw_rest_user.cc \
+ rgw/rgw_rest_bucket.cc \
+ rgw/rgw_rest_metadata.cc \
+ rgw/rgw_replica_log.cc \
+ rgw/rgw_rest_log.cc \
+ rgw/rgw_rest_opstate.cc \
+ rgw/rgw_rest_replica_log.cc \
+ rgw/rgw_rest_config.cc \
+ rgw/rgw_http_client.cc \
+ rgw/rgw_swift.cc \
+ rgw/rgw_swift_auth.cc \
+ rgw/rgw_main.cc
+radosgw_LDADD = $(LIBRGW) $(LIBRGW_DEPS) -lresolv $(CEPH_GLOBAL)
+bin_PROGRAMS += radosgw
+
+radosgw_admin_SOURCES = rgw/rgw_admin.cc
+radosgw_admin_LDADD = $(LIBRGW) $(LIBRGW_DEPS) $(CEPH_GLOBAL)
+bin_PROGRAMS += radosgw-admin
+
+ceph_rgw_multiparser_SOURCES = rgw/rgw_multiparser.cc
+ceph_rgw_multiparser_LDADD = $(LIBRGW) $(LIBRGW_DEPS) $(CEPH_GLOBAL)
+bin_DEBUGPROGRAMS += ceph_rgw_multiparser
+
+ceph_rgw_jsonparser_SOURCES = \
+ rgw/rgw_jsonparser.cc \
+ rgw/rgw_common.cc \
+ rgw/rgw_env.cc \
+ rgw/rgw_json_enc.cc
+ceph_rgw_jsonparser_LDADD = $(LIBRGW) $(LIBRGW_DEPS) $(CEPH_GLOBAL)
+bin_DEBUGPROGRAMS += ceph_rgw_jsonparser
+
+# inject rgw stuff in the decoder testcase
+DENCODER_SOURCES += \
+ rgw/rgw_dencoder.cc \
+ rgw/rgw_acl.cc \
+ rgw/rgw_common.cc \
+ rgw/rgw_env.cc \
+ rgw/rgw_json_enc.cc
+DENCODER_DEPS += \
+ libcls_lock_client.la \
+ libcls_rgw_client.la \
+ libcls_replica_log_client.a \
+ libcls_refcount_client.la
+
+
+endif # WITH_RADOSGW
+
+
+noinst_HEADERS += \
+ rgw/logrotate.conf \
+ rgw/rgw_acl.h \
+ rgw/rgw_acl_s3.h \
+ rgw/rgw_acl_swift.h \
+ rgw/rgw_client_io.h \
+ rgw/rgw_fcgi.h \
+ rgw/rgw_xml.h \
+ rgw/rgw_cache.h \
+ rgw/rgw_common.h \
+ rgw/rgw_cors.h \
+ rgw/rgw_cors_s3.h \
+ rgw/rgw_cors_swift.h \
+ rgw/rgw_string.h \
+ rgw/rgw_formats.h \
+ rgw/rgw_http_errors.h \
+ rgw/rgw_log.h \
+ rgw/rgw_multi.h \
+ rgw/rgw_policy_s3.h \
+ rgw/rgw_gc.h \
+ rgw/rgw_metadata.h \
+ rgw/rgw_multi_del.h \
+ rgw/rgw_op.h \
+ rgw/rgw_http_client.h \
+ rgw/rgw_swift.h \
+ rgw/rgw_swift_auth.h \
+ rgw/rgw_rados.h \
+ rgw/rgw_replica_log.h \
+ rgw/rgw_resolve.h \
+ rgw/rgw_rest.h \
+ rgw/rgw_rest_swift.h \
+ rgw/rgw_rest_s3.h \
+ rgw/rgw_auth_s3.h \
+ rgw/rgw_rest_admin.h \
+ rgw/rgw_rest_usage.h \
+ rgw/rgw_rest_user.h \
+ rgw/rgw_rest_bucket.h \
+ rgw/rgw_rest_client.h \
+ rgw/rgw_rest_conn.h \
+ rgw/rgw_tools.h \
+ rgw/rgw_rest_metadata.h \
+ rgw/rgw_rest_log.h \
+ rgw/rgw_rest_opstate.h \
+ rgw/rgw_rest_replica_log.h \
+ rgw/rgw_rest_config.h \
+ rgw/rgw_usage.h \
+ rgw/rgw_user.h \
+ rgw/rgw_bucket.h \
+ rgw/rgw_keystone.h
+
diff --git a/src/rgw/rgw_op.cc b/src/rgw/rgw_op.cc
index b5ed3e7fd6f..114b8709a22 100644
--- a/src/rgw/rgw_op.cc
+++ b/src/rgw/rgw_op.cc
@@ -1994,7 +1994,6 @@ int RGWDeleteCORS::verify_permission()
void RGWDeleteCORS::execute()
{
- RGWCORSConfiguration bucket_cors;
ret = read_bucket_cors();
if (ret < 0)
return;
diff --git a/src/rgw/rgw_op.h b/src/rgw/rgw_op.h
index 241584bac68..948a11830c2 100644
--- a/src/rgw/rgw_op.h
+++ b/src/rgw/rgw_op.h
@@ -531,7 +531,6 @@ public:
class RGWGetCORS : public RGWOp {
protected:
int ret;
- RGWCORSConfiguration bucket_cors;
public:
RGWGetCORS() : ret(0) {}
diff --git a/src/test/Makefile.am b/src/test/Makefile.am
new file mode 100644
index 00000000000..72246ac748f
--- /dev/null
+++ b/src/test/Makefile.am
@@ -0,0 +1,838 @@
+## Unknown/other tests
+
+ceph_test_timers_SOURCES = test/TestTimers.cc
+ceph_test_timers_LDADD = $(CEPH_GLOBAL)
+bin_DEBUGPROGRAMS += ceph_test_timers
+
+ceph_test_signal_handlers_SOURCES = test/TestSignalHandlers.cc
+ceph_test_signal_handlers_LDADD = $(CEPH_GLOBAL)
+bin_DEBUGPROGRAMS += ceph_test_signal_handlers
+
+ceph_test_rados_SOURCES = \
+ test/osd/TestRados.cc \
+ test/osd/TestOpStat.cc \
+ test/osd/Object.cc \
+ test/osd/RadosModel.cc
+ceph_test_rados_LDADD = $(LIBRADOS) $(CEPH_GLOBAL)
+bin_DEBUGPROGRAMS += ceph_test_rados
+
+ceph_test_mutate_SOURCES = test/test_mutate.cc
+ceph_test_mutate_LDADD = $(LIBRADOS) $(CEPH_GLOBAL)
+bin_DEBUGPROGRAMS += ceph_test_mutate
+
+ceph_test_rewrite_latency_SOURCES = test/test_rewrite_latency.cc
+ceph_test_rewrite_latency_LDADD = $(LIBCOMMON) $(PTHREAD_LIBS) -lm $(CRYPTO_LIBS) $(EXTRALIBS)
+bin_DEBUGPROGRAMS += ceph_test_rewrite_latency
+
+ceph_test_msgr_SOURCES = test/testmsgr.cc
+ceph_test_msgr_LDADD = $(CEPH_GLOBAL)
+bin_DEBUGPROGRAMS += ceph_test_msgr
+
+ceph_streamtest_SOURCES = test/streamtest.cc
+ceph_streamtest_LDADD = $(LIBOS) $(CEPH_GLOBAL)
+bin_DEBUGPROGRAMS += ceph_streamtest
+
+ceph_test_trans_SOURCES = test/test_trans.cc
+ceph_test_trans_LDADD = $(LIBOS) $(CEPH_GLOBAL)
+bin_DEBUGPROGRAMS += ceph_test_trans
+
+ceph_test_crypto_SOURCES = test/testcrypto.cc
+ceph_test_crypto_LDADD = $(CEPH_GLOBAL)
+bin_DEBUGPROGRAMS += ceph_test_crypto
+
+ceph_test_keys_SOURCES = test/testkeys.cc
+ceph_test_keys_LDADD = $(LIBMON) $(CEPH_GLOBAL)
+bin_DEBUGPROGRAMS += ceph_test_keys
+
+
+## Dencoder test
+
+ceph_dencoder_SOURCES = \
+ test/encoding/ceph_dencoder.cc \
+ $(DENCODER_SOURCES)
+ceph_dencoder_LDADD = \
+ $(LIBOSD) $(LIBMDS) $(LIBMON) \
+ $(DENCODER_DEPS) $(CEPH_GLOBAL)
+
+# These should always use explicit _CFLAGS/_CXXFLAGS so avoid basename conflicts
+ceph_dencoder_CFLAGS = ${AM_CFLAGS}
+ceph_dencoder_CXXFLAGS = ${AM_CXXFLAGS}
+
+if COMPILER_HAS_VTA
+ceph_dencoder_CFLAGS += -fno-var-tracking-assignments
+ceph_dencoder_CXXFLAGS += -fno-var-tracking-assignments
+endif
+
+bin_PROGRAMS += ceph-dencoder
+
+
+## Build tests
+# These should all use explicit _CXXFLAGS so avoid basename conflicts
+
+if WITH_BUILD_TESTS
+test_build_libcommon_SOURCES = \
+ test/buildtest_skeleton.cc \
+ $(libcommon_la_SOURCES)
+test_build_libcommon_LDADD = \
+ $(LIBCOMMON_DEPS) \
+ $(PTHREAD_LIBS) $(CRYPTO_LIBS) $(EXTRALIBS)
+test_build_libcommon_LDFLAGS = -static-libtool-libs
+test_build_libcommon_CFLAGS = $(AM_CFLAGS)
+test_build_libcommon_CXXFLAGS = $(AM_CXXFLAGS)
+bin_DEBUGPROGRAMS += test_build_libcommon
+
+test_build_librados_SOURCES = \
+ test/buildtest_skeleton.cc \
+ $(librados_la_SOURCES)
+test_build_librados_LDADD = \
+ $(LIBRADOS_DEPS) \
+ $(PTHREAD_LIBS) $(CRYPTO_LIBS) $(EXTRALIBS)
+test_build_librados_LDFLAGS = -static-libtool-libs
+test_build_librados_CFLAGS = $(AM_CFLAGS)
+test_build_librados_CXXFLAGS = $(AM_CXXFLAGS)
+bin_DEBUGPROGRAMS += test_build_librados
+
+test_build_librgw_SOURCES = \
+ test/buildtest_skeleton.cc \
+ $(librgw_la_SOURCES)
+test_build_librgw_LDADD = \
+ $(LIBRGW_DEPS) \
+ $(PTHREAD_LIBS) $(CRYPTO_LIBS) $(EXTRALIBS) \
+ $(CEPH_GLOBAL)
+test_build_librgw_LDFLAGS = -static-libtool-libs
+test_build_librgw_CFLAGS = $(AM_CFLAGS)
+test_build_librgw_CXXFLAGS = $(AM_CXXFLAGS)
+bin_DEBUGPROGRAMS += test_build_librgw
+
+# I dont get this one... testing the osdc build but link in libcephfs?
+test_build_libcephfs_SOURCES = \
+ test/buildtest_skeleton.cc \
+ $(libosdc_la_SOURCES)
+test_build_libcephfs_LDADD = \
+ $(LIBCEPHFS) -lexpat \
+ $(PTHREAD_LIBS) $(CRYPTO_LIBS) $(EXTRALIBS)
+test_build_libcephfs_LDFLAGS = -static-libtool-libs
+test_build_libcephfs_CFLAGS = $(AM_CFLAGS)
+test_build_libcephfs_CXXFLAGS = $(AM_CXXFLAGS)
+bin_DEBUGPROGRAMS += test_build_libcephfs
+
+if WITH_HADOOPCLIENT
+test_build_libhadoopcephfs_SOURCES = \
+ test/buildtest_skeleton.cc \
+ $(libhadoopcephfs_la_SOURCES)
+test_build_libhadoopcephfs_LDADD = \
+ $(LIBCEPHFS) -lexpat \
+ $(PTHREAD_LIBS) $(CRYPTO_LIBS) $(EXTRALIBS)
+test_build_libhadoopcephfs_LDFLAGS = -static-libtool-libs
+test_build_libhadoopcephfs_CFLAGS = $(AM_CFLAGS)
+test_build_libhadoopcephfs_CXXFLAGS = $(AM_CXXFLAGS)
+bin_DEBUGPROGRAMS += test_build_libhadoopcephfs
+endif # WITH_HADOOPCLIENT
+
+endif # WITH_BUILD_TESTS
+
+
+## Benchmarks
+
+ceph_smalliobench_SOURCES = \
+ test/bench/small_io_bench.cc \
+ test/bench/rados_backend.cc \
+ test/bench/detailed_stat_collector.cc \
+ test/bench/bencher.cc
+ceph_smalliobench_LDADD = $(LIBRADOS) -lboost_program_options $(CEPH_GLOBAL)
+bin_DEBUGPROGRAMS += ceph_smalliobench
+
+ceph_smalliobenchfs_SOURCES = \
+ test/bench/small_io_bench_fs.cc \
+ test/bench/testfilestore_backend.cc \
+ test/bench/detailed_stat_collector.cc \
+ test/bench/bencher.cc
+ceph_smalliobenchfs_LDADD = $(LIBRADOS) -lboost_program_options $(LIBOS) $(CEPH_GLOBAL)
+bin_DEBUGPROGRAMS += ceph_smalliobenchfs
+
+ceph_smalliobenchdumb_SOURCES = \
+ test/bench/small_io_bench_dumb.cc \
+ test/bench/dumb_backend.cc \
+ test/bench/detailed_stat_collector.cc \
+ test/bench/bencher.cc
+ceph_smalliobenchdumb_LDADD = $(LIBRADOS) -lboost_program_options $(LIBOS) $(CEPH_GLOBAL)
+bin_DEBUGPROGRAMS += ceph_smalliobenchdumb
+
+ceph_smalliobenchrbd_SOURCES = \
+ test/bench/small_io_bench_rbd.cc \
+ test/bench/rbd_backend.cc \
+ test/bench/detailed_stat_collector.cc \
+ test/bench/bencher.cc
+ceph_smalliobenchrbd_LDADD = $(LIBRBD) $(LIBRADOS) -lboost_program_options $(CEPH_GLOBAL)
+bin_DEBUGPROGRAMS += ceph_smalliobenchrbd
+
+ceph_tpbench_SOURCES = \
+ test/bench/tp_bench.cc \
+ test/bench/detailed_stat_collector.cc
+ceph_tpbench_LDADD = $(LIBRADOS) -lboost_program_options $(LIBOS) $(CEPH_GLOBAL)
+bin_DEBUGPROGRAMS += ceph_tpbench
+
+ceph_omapbench_SOURCES = test/omap_bench.cc
+ceph_omapbench_LDADD = $(LIBRADOS) $(CEPH_GLOBAL)
+bin_DEBUGPROGRAMS += ceph_omapbench
+
+ceph_kvstorebench_SOURCES = \
+ test/kv_store_bench.cc \
+ key_value_store/kv_flat_btree_async.cc
+ceph_kvstorebench_LDADD = $(LIBRADOS) $(CEPH_GLOBAL)
+bin_DEBUGPROGRAMS += ceph_kvstorebench
+
+ceph_multi_stress_watch_SOURCES = \
+ test/multi_stress_watch.cc \
+ test/librados/test.cc
+ceph_multi_stress_watch_LDADD = $(LIBRADOS) $(CEPH_GLOBAL)
+bin_DEBUGPROGRAMS += ceph_multi_stress_watch
+
+
+
+
+
+
+## System tests
+
+libsystest_la_SOURCES = \
+ test/system/cross_process_sem.cc \
+ test/system/systest_runnable.cc \
+ test/system/systest_settings.cc
+libsystest_la_LIBADD = $(CEPH_GLOBAL)
+noinst_LTLIBRARIES += libsystest.la
+
+ceph_test_rados_list_parallel_SOURCES = \
+ test/system/rados_list_parallel.cc \
+ test/system/st_rados_create_pool.cc \
+ test/system/st_rados_list_objects.cc
+ceph_test_rados_list_parallel_LDADD = $(LIBRADOS) libsystest.la $(PTHREAD_LIBS)
+bin_DEBUGPROGRAMS += ceph_test_rados_list_parallel
+
+ceph_test_rados_open_pools_parallel_SOURCES = \
+ test/system/rados_open_pools_parallel.cc \
+ test/system/st_rados_create_pool.cc
+ceph_test_rados_open_pools_parallel_LDADD = $(LIBRADOS) libsystest.la $(PTHREAD_LIBS)
+bin_DEBUGPROGRAMS += ceph_test_rados_open_pools_parallel
+
+ceph_test_rados_delete_pools_parallel_SOURCES = \
+ test/system/rados_delete_pools_parallel.cc \
+ test/system/st_rados_create_pool.cc \
+ test/system/st_rados_delete_pool.cc \
+ test/system/st_rados_list_objects.cc
+ceph_test_rados_delete_pools_parallel_LDADD = $(LIBRADOS) libsystest.la $(PTHREAD_LIBS)
+bin_DEBUGPROGRAMS += ceph_test_rados_delete_pools_parallel
+
+ceph_test_rados_watch_notify_SOURCES = \
+ test/system/rados_watch_notify.cc \
+ test/system/st_rados_create_pool.cc \
+ test/system/st_rados_delete_pool.cc \
+ test/system/st_rados_delete_objs.cc \
+ test/system/st_rados_watch.cc \
+ test/system/st_rados_notify.cc
+ceph_test_rados_watch_notify_LDADD = $(LIBRADOS) libsystest.la $(PTHREAD_LIBS)
+bin_DEBUGPROGRAMS += ceph_test_rados_watch_notify
+
+ceph_bench_log_SOURCES = test/bench_log.cc
+ceph_bench_log_LDADD = $(CEPH_GLOBAL)
+bin_DEBUGPROGRAMS += ceph_bench_log
+
+
+
+## Unit tests
+
+# target to build but not run the unit tests
+unittests:: $(check_PROGRAMS)
+
+UNITTEST_CXXFLAGS = \
+ $(AM_CXXFLAGS) \
+ -I$(top_srcdir)/src/gtest/include \
+ -I$(top_builddir)/src/gtest/include
+UNITTEST_LDADD = \
+ $(top_builddir)/src/gtest/lib/libgtest.a \
+ $(top_builddir)/src/gtest/lib/libgtest_main.a \
+ $(PTHREAD_LIBS)
+
+unittest_encoding_SOURCES = test/encoding.cc
+unittest_encoding_LDADD = $(LIBCEPHFS) $(LIBRADOS) -lm $(UNITTEST_LDADD)
+unittest_encoding_CXXFLAGS = $(UNITTEST_CXXFLAGS) -fno-strict-aliasing
+check_PROGRAMS += unittest_encoding
+
+unittest_addrs_SOURCES = test/test_addrs.cc
+unittest_addrs_CXXFLAGS = $(UNITTEST_CXXFLAGS)
+unittest_addrs_LDADD = $(UNITTEST_LDADD) $(CEPH_GLOBAL)
+check_PROGRAMS += unittest_addrs
+
+unittest_sharedptr_registry_SOURCES = test/common/test_sharedptr_registry.cc
+unittest_sharedptr_registry_CXXFLAGS = $(UNITTEST_CXXFLAGS)
+unittest_sharedptr_registry_LDADD = $(UNITTEST_LDADD) $(CEPH_GLOBAL)
+check_PROGRAMS += unittest_sharedptr_registry
+
+unittest_util_SOURCES = test/common/test_util.cc
+unittest_util_CXXFLAGS = $(UNITTEST_CXXFLAGS)
+unittest_util_LDADD = $(LIBCOMMON) -lm $(UNITTEST_LDADD) $(CRYPTO_LIBS) $(EXTRALIBS)
+check_PROGRAMS += unittest_util
+
+unittest_workqueue_SOURCES = test/test_workqueue.cc
+unittest_workqueue_CXXFLAGS = $(UNITTEST_CXXFLAGS)
+unittest_workqueue_LDADD = $(UNITTEST_LDADD) $(CEPH_GLOBAL)
+check_PROGRAMS += unittest_workqueue
+
+unittest_striper_SOURCES = test/test_striper.cc
+unittest_striper_CXXFLAGS = $(UNITTEST_CXXFLAGS)
+unittest_striper_LDADD = $(LIBOSDC) $(UNITTEST_LDADD) $(CEPH_GLOBAL)
+check_PROGRAMS += unittest_striper
+
+unittest_prebufferedstreambuf_SOURCES = test/test_prebufferedstreambuf.cc
+unittest_prebufferedstreambuf_CXXFLAGS = $(UNITTEST_CXXFLAGS)
+unittest_prebufferedstreambuf_LDADD = $(LIBCOMMON) $(UNITTEST_LDADD) $(EXTRALIBS)
+check_PROGRAMS += unittest_prebufferedstreambuf
+
+unittest_str_list_SOURCES = test/test_str_list.cc
+unittest_str_list_CXXFLAGS = $(UNITTEST_CXXFLAGS)
+unittest_str_list_LDADD = $(UNITTEST_LDADD) $(CEPH_GLOBAL)
+check_PROGRAMS += unittest_str_list
+
+unittest_log_SOURCES = log/test.cc
+unittest_log_LDADD = $(LIBCOMMON) $(UNITTEST_LDADD)
+unittest_log_CXXFLAGS = $(UNITTEST_CXXFLAGS) -O2
+check_PROGRAMS += unittest_log
+
+unittest_throttle_SOURCES = test/common/Throttle.cc
+unittest_throttle_LDADD = $(UNITTEST_LDADD) $(CEPH_GLOBAL)
+unittest_throttle_CXXFLAGS = $(UNITTEST_CXXFLAGS) -O2
+check_PROGRAMS += unittest_throttle
+
+unittest_base64_SOURCES = test/base64.cc
+unittest_base64_LDADD = $(LIBCEPHFS) -lm $(UNITTEST_LDADD)
+unittest_base64_CXXFLAGS = $(UNITTEST_CXXFLAGS)
+check_PROGRAMS += unittest_base64
+
+unittest_ceph_argparse_SOURCES = test/ceph_argparse.cc
+unittest_ceph_argparse_LDADD = $(UNITTEST_LDADD) $(CEPH_GLOBAL)
+unittest_ceph_argparse_CXXFLAGS = $(UNITTEST_CXXFLAGS)
+check_PROGRAMS += unittest_ceph_argparse
+
+libec_example_la_SOURCES = test/osd/ErasureCodePluginExample.cc
+libec_example_la_CFLAGS = ${AM_CFLAGS}
+libec_example_la_CXXFLAGS= ${AM_CXXFLAGS}
+libec_example_la_LIBADD = $(PTHREAD_LIBS) $(EXTRALIBS)
+libec_example_la_LDFLAGS = ${AM_LDFLAGS} -export-symbols-regex '.*__erasure_code_.*'
+erasure_codelib_LTLIBRARIES += libec_example.la
+
+unittest_erasure_code_plugin_SOURCES = test/osd/TestErasureCodePluginExample.cc
+unittest_erasure_code_plugin_CXXFLAGS = ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS}
+unittest_erasure_code_plugin_LDADD = $(LIBOSD) $(LIBCOMMON) $(UNITTEST_LDADD) $(CEPH_GLOBAL)
+if LINUX
+unittest_erasure_code_plugin_LDADD += -ldl
+endif
+check_PROGRAMS += unittest_erasure_code_plugin
+
+
+unittest_erasure_code_example_SOURCES = test/osd/TestErasureCodeExample.cc
+noinst_HEADERS += test/osd/ErasureCodeExample.h
+unittest_erasure_code_example_CXXFLAGS = ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS}
+unittest_erasure_code_example_LDADD = $(LIBOSD) $(LIBCOMMON) $(UNITTEST_LDADD) $(CEPH_GLOBAL)
+check_PROGRAMS += unittest_erasure_code_example
+
+unittest_osd_types_SOURCES = test/test_osd_types.cc
+unittest_osd_types_CXXFLAGS = $(UNITTEST_CXXFLAGS)
+unittest_osd_types_LDADD = $(UNITTEST_LDADD) $(CEPH_GLOBAL)
+check_PROGRAMS += unittest_osd_types
+
+unittest_pglog_SOURCES = test/osd/TestPGLog.cc
+unittest_pglog_CXXFLAGS = $(UNITTEST_CXXFLAGS)
+unittest_pglog_LDADD = $(LIBOSD) $(UNITTEST_LDADD) $(CEPH_GLOBAL)
+check_PROGRAMS += unittest_pglog
+
+if LINUX
+unittest_pglog_LDADD += -ldl
+endif # LINUX
+
+unittest_gather_SOURCES = test/gather.cc
+unittest_gather_LDADD = $(UNITTEST_LDADD) $(CEPH_GLOBAL)
+unittest_gather_CXXFLAGS = $(UNITTEST_CXXFLAGS)
+check_PROGRAMS += unittest_gather
+
+unittest_run_cmd_SOURCES = test/run_cmd.cc
+unittest_run_cmd_LDADD = $(LIBCEPHFS) $(UNITTEST_LDADD)
+unittest_run_cmd_CXXFLAGS = $(UNITTEST_CXXFLAGS)
+check_PROGRAMS += unittest_run_cmd
+
+unittest_signals_SOURCES = test/signals.cc
+unittest_signals_LDADD = $(UNITTEST_LDADD) $(CEPH_GLOBAL)
+unittest_signals_CXXFLAGS = $(UNITTEST_CXXFLAGS)
+check_PROGRAMS += unittest_signals
+
+unittest_simple_spin_SOURCES = test/simple_spin.cc
+unittest_simple_spin_LDADD = $(LIBCEPHFS) $(UNITTEST_LDADD)
+unittest_simple_spin_CXXFLAGS = $(UNITTEST_CXXFLAGS)
+check_PROGRAMS += unittest_simple_spin
+
+unittest_librados_SOURCES = test/librados/librados.cc
+unittest_librados_LDADD = $(LIBRADOS) $(UNITTEST_LDADD)
+unittest_librados_CXXFLAGS = $(UNITTEST_CXXFLAGS)
+check_PROGRAMS += unittest_librados
+
+unittest_bufferlist_SOURCES = test/bufferlist.cc
+unittest_bufferlist_LDADD = $(UNITTEST_LDADD) $(CEPH_GLOBAL)
+unittest_bufferlist_CXXFLAGS = $(UNITTEST_CXXFLAGS)
+check_PROGRAMS += unittest_bufferlist
+
+unittest_crypto_SOURCES = test/crypto.cc
+unittest_crypto_LDADD = $(UNITTEST_LDADD) $(CEPH_GLOBAL)
+unittest_crypto_CXXFLAGS = $(UNITTEST_CXXFLAGS)
+check_PROGRAMS += unittest_crypto
+
+unittest_perf_counters_SOURCES = test/perf_counters.cc
+unittest_perf_counters_LDADD = $(UNITTEST_LDADD) $(CEPH_GLOBAL)
+unittest_perf_counters_CXXFLAGS = $(UNITTEST_CXXFLAGS)
+check_PROGRAMS += unittest_perf_counters
+
+unittest_admin_socket_SOURCES = test/admin_socket.cc
+unittest_admin_socket_LDADD = $(UNITTEST_LDADD) $(CEPH_GLOBAL)
+unittest_admin_socket_CXXFLAGS = $(UNITTEST_CXXFLAGS)
+check_PROGRAMS += unittest_admin_socket
+
+unittest_ceph_crypto_SOURCES = test/ceph_crypto.cc
+unittest_ceph_crypto_LDADD = $(UNITTEST_LDADD) $(CEPH_GLOBAL)
+unittest_ceph_crypto_CXXFLAGS = $(UNITTEST_CXXFLAGS)
+check_PROGRAMS += unittest_ceph_crypto
+
+unittest_utf8_SOURCES = test/utf8.cc
+unittest_utf8_LDADD = $(UNITTEST_LDADD) $(CEPH_GLOBAL)
+unittest_utf8_CXXFLAGS = $(UNITTEST_CXXFLAGS)
+check_PROGRAMS += unittest_utf8
+
+unittest_mime_SOURCES = test/mime.cc
+unittest_mime_LDADD = $(UNITTEST_LDADD) $(CEPH_GLOBAL)
+unittest_mime_CXXFLAGS = $(UNITTEST_CXXFLAGS)
+check_PROGRAMS += unittest_mime
+
+unittest_escape_SOURCES = test/escape.cc
+unittest_escape_LDADD = $(UNITTEST_LDADD) $(CEPH_GLOBAL)
+unittest_escape_CXXFLAGS = $(UNITTEST_CXXFLAGS)
+check_PROGRAMS += unittest_escape
+
+unittest_chain_xattr_SOURCES = test/filestore/chain_xattr.cc
+unittest_chain_xattr_LDADD = $(LIBOS) $(UNITTEST_LDADD) $(CEPH_GLOBAL)
+unittest_chain_xattr_CXXFLAGS = $(UNITTEST_CXXFLAGS)
+check_PROGRAMS += unittest_chain_xattr
+
+unittest_flatindex_SOURCES = test/os/TestFlatIndex.cc
+unittest_flatindex_LDADD = $(LIBOS) $(UNITTEST_LDADD) $(CEPH_GLOBAL)
+unittest_flatindex_CXXFLAGS = $(UNITTEST_CXXFLAGS)
+check_PROGRAMS += unittest_flatindex
+
+unittest_strtol_SOURCES = test/strtol.cc
+unittest_strtol_LDADD = $(UNITTEST_LDADD) $(CEPH_GLOBAL)
+unittest_strtol_CXXFLAGS = $(UNITTEST_CXXFLAGS)
+check_PROGRAMS += unittest_strtol
+
+unittest_confutils_SOURCES = test/confutils.cc
+unittest_confutils_LDADD = $(UNITTEST_LDADD) $(CEPH_GLOBAL)
+unittest_confutils_CXXFLAGS = $(UNITTEST_CXXFLAGS)
+check_PROGRAMS += unittest_confutils
+
+unittest_heartbeatmap_SOURCES = test/heartbeat_map.cc
+unittest_heartbeatmap_LDADD = $(LIBCOMMON) $(UNITTEST_LDADD) $(CEPH_GLOBAL)
+unittest_heartbeatmap_CXXFLAGS = $(UNITTEST_CXXFLAGS)
+check_PROGRAMS += unittest_heartbeatmap
+
+# why does this include rgw/rgw_formats.cc...?
+unittest_formatter_SOURCES = \
+ test/formatter.cc \
+ rgw/rgw_formats.cc
+unittest_formatter_LDADD = $(UNITTEST_LDADD) $(CEPH_GLOBAL)
+unittest_formatter_CXXFLAGS = $(UNITTEST_CXXFLAGS)
+check_PROGRAMS += unittest_formatter
+
+unittest_libcephfs_config_SOURCES = test/libcephfs_config.cc
+unittest_libcephfs_config_LDADD = $(LIBCEPHFS) $(UNITTEST_LDADD)
+unittest_libcephfs_config_CXXFLAGS = $(UNITTEST_CXXFLAGS)
+check_PROGRAMS += unittest_libcephfs_config
+
+unittest_lfnindex_SOURCES = test/os/TestLFNIndex.cc
+unittest_lfnindex_LDADD = $(LIBOS) $(UNITTEST_LDADD) $(CEPH_GLOBAL)
+unittest_lfnindex_CXXFLAGS = $(UNITTEST_CXXFLAGS)
+check_PROGRAMS += unittest_lfnindex
+
+unittest_librados_config_SOURCES = test/librados/librados_config.cc
+unittest_librados_config_LDADD = $(LIBRADOS) $(UNITTEST_LDADD)
+unittest_librados_config_CXXFLAGS = $(UNITTEST_CXXFLAGS)
+check_PROGRAMS += unittest_librados_config
+
+#unittest_librgw_link_SOURCES = test/librgw_link.cc
+#unittest_librgw_link_LDFLAGS = $(PTHREAD_CFLAGS) ${AM_LDFLAGS}
+#unittest_librgw_link_LDADD = $(LIBRGW) ${UNITTEST_LDADD}
+#unittest_librgw_link_CXXFLAGS = ${CRYPTO_CFLAGS} ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS}
+#check_PROGRAMS += unittest_librgw_link
+
+unittest_daemon_config_SOURCES = test/daemon_config.cc
+unittest_daemon_config_LDADD = $(UNITTEST_LDADD) $(CEPH_GLOBAL)
+unittest_daemon_config_CXXFLAGS = $(UNITTEST_CXXFLAGS)
+check_PROGRAMS += unittest_daemon_config
+
+unittest_osd_osdcap_SOURCES = test/osd/osdcap.cc
+unittest_osd_osdcap_LDADD = $(LIBOSD) $(UNITTEST_LDADD) $(CEPH_GLOBAL)
+unittest_osd_osdcap_CXXFLAGS = $(UNITTEST_CXXFLAGS)
+check_PROGRAMS += unittest_osd_osdcap
+
+unittest_mon_moncap_SOURCES = test/mon/moncap.cc
+unittest_mon_moncap_LDADD = $(LIBMON) $(UNITTEST_LDADD) $(CEPH_GLOBAL)
+unittest_mon_moncap_CXXFLAGS = $(UNITTEST_CXXFLAGS)
+check_PROGRAMS += unittest_mon_moncap
+
+#if WITH_RADOSGW
+#unittest_librgw_SOURCES = test/librgw.cc
+#unittest_librgw_LDFLAGS = -lrt $(PTHREAD_CFLAGS) -lcurl ${AM_LDFLAGS}
+#unittest_librgw_LDADD = librgw.la $(LIBRADOS) ${UNITTEST_LDADD} -lexpat $(CEPH_GLOBAL)
+#unittest_librgw_CXXFLAGS = ${CRYPTO_CFLAGS} ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS}
+#check_PROGRAMS += unittest_librgw
+#endif # WITH_RADOSGW
+
+unittest_ipaddr_SOURCES = test/test_ipaddr.cc
+unittest_ipaddr_LDADD = $(UNITTEST_LDADD) $(CEPH_GLOBAL)
+unittest_ipaddr_CXXFLAGS = $(UNITTEST_CXXFLAGS)
+check_PROGRAMS += unittest_ipaddr
+
+unittest_texttable_SOURCES = test/test_texttable.cc
+unittest_texttable_LDADD = $(LIBCOMMON) $(UNITTEST_LDADD)
+unittest_texttable_CXXFLAGS = $(UNITTEST_CXXFLAGS)
+check_PROGRAMS += unittest_texttable
+
+if WITH_RADOSGW
+ceph_test_cors_SOURCES = test/test_cors.cc
+ceph_test_cors_LDADD = \
+ $(LIBRADOS) $(LIBRGW) $(CEPH_GLOBAL) \
+ $(UNITTEST_LDADD) \
+ -lcurl -luuid -lexpat
+ceph_test_cors_CXXFLAGS = $(UNITTEST_CXXFLAGS)
+bin_DEBUGPROGRAMS += ceph_test_cors
+
+ceph_test_cls_rgw_meta_SOURCES = test/test_rgw_admin_meta.cc
+ceph_test_cls_rgw_meta_LDADD = \
+ $(LIBRADOS) $(LIBRGW) $(CEPH_GLOBAL) \
+ $(UNITTEST_LDADD) $(CRYPTO_LIBS) \
+ -lcurl -luuid -lexpat \
+ libcls_version_client.a libcls_log_client.a \
+ libcls_statelog_client.a libcls_refcount_client.la \
+ libcls_rgw_client.la libcls_lock_client.la
+ceph_test_cls_rgw_meta_CXXFLAGS = $(UNITTEST_CXXFLAGS)
+bin_DEBUGPROGRAMS += ceph_test_cls_rgw_meta
+
+ceph_test_cls_rgw_log_SOURCES = test/test_rgw_admin_log.cc
+ceph_test_cls_rgw_log_LDADD = \
+ $(LIBRADOS) $(LIBRGW) $(CEPH_GLOBAL) \
+ $(UNITTEST_LDADD) $(CRYPTO_LIBS) \
+ -lcurl -luuid -lexpat \
+ libcls_version_client.a libcls_log_client.a \
+ libcls_statelog_client.a libcls_refcount_client.la \
+ libcls_rgw_client.la libcls_lock_client.la
+ceph_test_cls_rgw_log_CXXFLAGS = $(UNITTEST_CXXFLAGS)
+bin_DEBUGPROGRAMS += ceph_test_cls_rgw_log
+
+ceph_test_cls_rgw_opstate_SOURCES = test/test_rgw_admin_opstate.cc
+ceph_test_cls_rgw_opstate_LDADD = \
+ $(LIBRADOS) $(LIBRGW) $(CEPH_GLOBAL) \
+ $(UNITTEST_LDADD) $(CRYPTO_LIBS) \
+ -lcurl -luuid -lexpat \
+ libcls_version_client.a libcls_log_client.a \
+ libcls_statelog_client.a libcls_refcount_client.la \
+ libcls_rgw_client.la libcls_lock_client.la
+ceph_test_cls_rgw_opstate_CXXFLAGS = $(UNITTEST_CXXFLAGS)
+bin_DEBUGPROGRAMS += ceph_test_cls_rgw_opstate
+endif # WITH_RADOSGW
+
+ceph_test_librbd_SOURCES = \
+ test/librbd/test_librbd.cc \
+ test/librados/test.cc
+ceph_test_librbd_LDADD = $(LIBRBD) $(LIBRADOS) $(UNITTEST_LDADD)
+ceph_test_librbd_CXXFLAGS = $(UNITTEST_CXXFLAGS)
+bin_DEBUGPROGRAMS += ceph_test_librbd
+
+ceph_test_librbd_fsx_SOURCES = test/librbd/fsx.c
+ceph_test_librbd_fsx_LDADD = $(LIBRBD) $(LIBRADOS) -lm
+ceph_test_librbd_fsx_CFLAGS = ${AM_CFLAGS} -Wno-format
+bin_DEBUGPROGRAMS += ceph_test_librbd_fsx
+
+ceph_test_cls_rbd_SOURCES = \
+ test/cls_rbd/test_cls_rbd.cc \
+ test/librados/test.cc
+ceph_test_cls_rbd_LDADD = $(LIBRADOS) libcls_rbd_client.la libcls_lock_client.la $(UNITTEST_LDADD)
+ceph_test_cls_rbd_CXXFLAGS = $(UNITTEST_CXXFLAGS)
+bin_DEBUGPROGRAMS += ceph_test_cls_rbd
+
+ceph_test_cls_refcount_SOURCES = \
+ test/cls_refcount/test_cls_refcount.cc \
+ test/librados/test.cc
+ceph_test_cls_refcount_LDADD = $(LIBRADOS) libcls_refcount_client.la $(UNITTEST_LDADD)
+ceph_test_cls_refcount_CXXFLAGS = $(UNITTEST_CXXFLAGS)
+bin_DEBUGPROGRAMS += ceph_test_cls_refcount
+
+ceph_test_cls_version_SOURCES = \
+ test/cls_version/test_cls_version.cc \
+ test/librados/test.cc
+ceph_test_cls_version_LDADD = $(LIBRADOS) libcls_version_client.a $(UNITTEST_LDADD)
+ceph_test_cls_version_CXXFLAGS = $(UNITTEST_CXXFLAGS)
+bin_DEBUGPROGRAMS += ceph_test_cls_version
+
+ceph_test_cls_log_SOURCES = \
+ test/cls_log/test_cls_log.cc \
+ test/librados/test.cc
+ceph_test_cls_log_LDADD = $(LIBRADOS) libcls_log_client.a $(UNITTEST_LDADD) $(CEPH_GLOBAL)
+ceph_test_cls_log_CXXFLAGS = $(UNITTEST_CXXFLAGS)
+bin_DEBUGPROGRAMS += ceph_test_cls_log
+
+ceph_test_cls_statelog_SOURCES = \
+ test/cls_statelog/test_cls_statelog.cc \
+ test/librados/test.cc
+ceph_test_cls_statelog_LDADD = $(LIBRADOS) libcls_statelog_client.a $(UNITTEST_LDADD) $(CEPH_GLOBAL)
+ceph_test_cls_statelog_CXXFLAGS = $(UNITTEST_CXXFLAGS)
+bin_DEBUGPROGRAMS += ceph_test_cls_statelog
+
+ceph_test_cls_replica_log_SOURCES = \
+ test/cls_replica_log/test_cls_replica_log.cc \
+ test/librados/test.cc
+ceph_test_cls_replica_log_LDADD = \
+ $(LIBRADOS) libcls_replica_log_client.a \
+ $(UNITTEST_LDADD) $(CEPH_GLOBAL)
+ceph_test_cls_replica_log_CXXFLAGS = $(UNITTEST_CXXFLAGS)
+bin_DEBUGPROGRAMS += ceph_test_cls_replica_log
+
+ceph_test_cls_lock_SOURCES = \
+ test/cls_lock/test_cls_lock.cc \
+ test/librados/test.cc
+ceph_test_cls_lock_LDADD = $(LIBRADOS) libcls_lock_client.la $(UNITTEST_LDADD)
+ceph_test_cls_lock_CXXFLAGS = $(UNITTEST_CXXFLAGS)
+bin_DEBUGPROGRAMS += ceph_test_cls_lock
+
+ceph_test_cls_hello_SOURCES = \
+ test/cls_hello/test_cls_hello.cc \
+ test/librados/test.cc
+ceph_test_cls_hello_LDADD = \
+ $(LIBRADOS) $(CRYPTO_LIBS) \
+ $(UNITTEST_LDADD) $(CEPH_GLOBAL)
+ceph_test_cls_hello_CXXFLAGS = $(UNITTEST_CXXFLAGS)
+bin_DEBUGPROGRAMS += ceph_test_cls_hello
+
+if WITH_RADOSGW
+ceph_test_cls_rgw_SOURCES = \
+ test/cls_rgw/test_cls_rgw.cc \
+ test/librados/test.cc
+ceph_test_cls_rgw_LDADD = $(LIBRADOS) libcls_rgw_client.la $(UNITTEST_LDADD)
+ceph_test_cls_rgw_CXXFLAGS = $(UNITTEST_CXXFLAGS)
+bin_DEBUGPROGRAMS += ceph_test_cls_rgw
+endif # WITH_RADOSGW
+
+ceph_test_mon_workloadgen_SOURCES = test/mon/test_mon_workloadgen.cc
+ceph_test_mon_workloadgen_LDADD = $(LIBOS) $(LIBOSDC) $(CEPH_GLOBAL)
+bin_DEBUGPROGRAMS += ceph_test_mon_workloadgen
+
+ceph_test_rados_api_cmd_SOURCES = \
+ test/librados/cmd.cc \
+ test/librados/test.cc
+ceph_test_rados_api_cmd_LDADD = $(LIBRADOS) $(UNITTEST_LDADD)
+ceph_test_rados_api_cmd_CXXFLAGS = $(UNITTEST_CXXFLAGS)
+bin_DEBUGPROGRAMS += ceph_test_rados_api_cmd
+
+ceph_test_rados_api_io_SOURCES = \
+ test/librados/io.cc \
+ test/librados/test.cc
+ceph_test_rados_api_io_LDADD = $(LIBRADOS) $(UNITTEST_LDADD)
+ceph_test_rados_api_io_CXXFLAGS = $(UNITTEST_CXXFLAGS)
+bin_DEBUGPROGRAMS += ceph_test_rados_api_io
+
+ceph_test_rados_api_aio_SOURCES = \
+ test/librados/aio.cc \
+ test/librados/test.cc
+ceph_test_rados_api_aio_LDADD = $(LIBRADOS) $(UNITTEST_LDADD)
+ceph_test_rados_api_aio_CXXFLAGS = $(UNITTEST_CXXFLAGS)
+bin_DEBUGPROGRAMS += ceph_test_rados_api_aio
+
+ceph_test_rados_api_list_SOURCES = \
+ test/librados/list.cc \
+ test/librados/test.cc
+ceph_test_rados_api_list_LDADD = $(LIBRADOS) $(UNITTEST_LDADD)
+ceph_test_rados_api_list_CXXFLAGS = $(UNITTEST_CXXFLAGS)
+bin_DEBUGPROGRAMS += ceph_test_rados_api_list
+
+ceph_test_rados_api_pool_SOURCES = \
+ test/librados/pool.cc \
+ test/librados/test.cc
+ceph_test_rados_api_pool_LDADD = $(LIBRADOS) $(UNITTEST_LDADD)
+ceph_test_rados_api_pool_CXXFLAGS = $(UNITTEST_CXXFLAGS)
+bin_DEBUGPROGRAMS += ceph_test_rados_api_pool
+
+ceph_test_rados_api_stat_SOURCES = \
+ test/librados/stat.cc \
+ test/librados/test.cc
+ceph_test_rados_api_stat_LDADD = $(LIBRADOS) $(UNITTEST_LDADD)
+ceph_test_rados_api_stat_CXXFLAGS = $(UNITTEST_CXXFLAGS)
+bin_DEBUGPROGRAMS += ceph_test_rados_api_stat
+
+ceph_test_rados_api_watch_notify_SOURCES = \
+ test/librados/watch_notify.cc \
+ test/librados/test.cc
+ceph_test_rados_api_watch_notify_LDADD = $(LIBRADOS) $(UNITTEST_LDADD)
+ceph_test_rados_api_watch_notify_CXXFLAGS = $(UNITTEST_CXXFLAGS)
+bin_DEBUGPROGRAMS += ceph_test_rados_api_watch_notify
+
+ceph_test_rados_api_snapshots_SOURCES = \
+ test/librados/snapshots.cc \
+ test/librados/test.cc
+ceph_test_rados_api_snapshots_LDADD = $(LIBRADOS) $(UNITTEST_LDADD)
+ceph_test_rados_api_snapshots_CXXFLAGS = $(UNITTEST_CXXFLAGS)
+bin_DEBUGPROGRAMS += ceph_test_rados_api_snapshots
+
+ceph_test_rados_api_cls_SOURCES = \
+ test/librados/cls.cc \
+ test/librados/test.cc
+ceph_test_rados_api_cls_LDADD = $(LIBRADOS) $(UNITTEST_LDADD)
+ceph_test_rados_api_cls_CXXFLAGS = $(UNITTEST_CXXFLAGS)
+bin_DEBUGPROGRAMS += ceph_test_rados_api_cls
+
+ceph_test_rados_api_misc_SOURCES = \
+ test/librados/misc.cc \
+ test/librados/test.cc
+ceph_test_rados_api_misc_LDADD = $(LIBRADOS) $(UNITTEST_LDADD) $(CEPH_GLOBAL)
+ceph_test_rados_api_misc_CXXFLAGS = $(UNITTEST_CXXFLAGS)
+bin_DEBUGPROGRAMS += ceph_test_rados_api_misc
+
+ceph_test_rados_api_lock_SOURCES = \
+ test/librados/lock.cc \
+ test/librados/test.cc
+ceph_test_rados_api_lock_LDADD = $(LIBRADOS) $(UNITTEST_LDADD)
+ceph_test_rados_api_lock_CXXFLAGS = $(UNITTEST_CXXFLAGS)
+bin_DEBUGPROGRAMS += ceph_test_rados_api_lock
+
+ceph_test_libcephfs_SOURCES = \
+ test/libcephfs/test.cc \
+ test/libcephfs/readdir_r_cb.cc \
+ test/libcephfs/caps.cc \
+ test/libcephfs/multiclient.cc
+ceph_test_libcephfs_LDADD = $(LIBCEPHFS) $(UNITTEST_LDADD)
+ceph_test_libcephfs_CXXFLAGS = $(UNITTEST_CXXFLAGS)
+bin_DEBUGPROGRAMS += ceph_test_libcephfs
+
+ceph_test_filestore_SOURCES = test/filestore/store_test.cc
+ceph_test_filestore_LDADD = $(LIBOS) $(UNITTEST_LDADD) $(CEPH_GLOBAL)
+ceph_test_filestore_CXXFLAGS = $(UNITTEST_CXXFLAGS)
+bin_DEBUGPROGRAMS += ceph_test_filestore
+
+ceph_test_filestore_workloadgen_SOURCES = \
+ test/filestore/workload_generator.cc \
+ test/filestore/TestFileStoreState.cc
+ceph_test_filestore_workloadgen_LDADD = $(LIBOS) $(CEPH_GLOBAL)
+bin_DEBUGPROGRAMS += ceph_test_filestore_workloadgen
+
+ceph_test_filestore_idempotent_SOURCES = \
+ test/filestore/test_idempotent.cc \
+ test/filestore/FileStoreTracker.cc \
+ test/common/ObjectContents.cc
+ceph_test_filestore_idempotent_LDADD = $(LIBOS) $(CEPH_GLOBAL)
+bin_DEBUGPROGRAMS += ceph_test_filestore_idempotent
+
+ceph_test_filestore_idempotent_sequence_SOURCES = \
+ test/filestore/test_idempotent_sequence.cc \
+ test/filestore/DeterministicOpSequence.cc \
+ test/filestore/TestFileStoreState.cc \
+ test/filestore/FileStoreDiff.cc
+ceph_test_filestore_idempotent_sequence_LDADD = $(LIBOS) $(CEPH_GLOBAL)
+bin_DEBUGPROGRAMS += ceph_test_filestore_idempotent_sequence
+
+ceph_xattr_bench_SOURCES = test/xattr_bench.cc
+ceph_xattr_bench_LDADD = $(LIBOS) $(UNITTEST_LDADD) $(CEPH_GLOBAL)
+ceph_xattr_bench_CXXFLAGS = $(UNITTEST_CXXFLAGS)
+bin_DEBUGPROGRAMS += ceph_xattr_bench
+
+ceph_test_filejournal_SOURCES = test/test_filejournal.cc
+ceph_test_filejournal_LDADD = $(LIBOS) $(UNITTEST_LDADD) $(CEPH_GLOBAL)
+ceph_test_filejournal_CXXFLAGS = $(UNITTEST_CXXFLAGS)
+bin_DEBUGPROGRAMS += ceph_test_filejournal
+
+ceph_test_stress_watch_SOURCES = \
+ test/test_stress_watch.cc \
+ test/librados/test.cc
+ceph_test_stress_watch_LDADD = $(LIBRADOS) $(UNITTEST_LDADD)
+ceph_test_stress_watch_CXXFLAGS = $(UNITTEST_CXXFLAGS)
+bin_DEBUGPROGRAMS += ceph_test_stress_watch
+
+ceph_test_objectcacher_stress_SOURCES = \
+ test/osdc/object_cacher_stress.cc \
+ test/osdc/FakeWriteback.cc
+ceph_test_objectcacher_stress_LDADD = $(LIBOSDC) $(CEPH_GLOBAL)
+bin_DEBUGPROGRAMS += ceph_test_objectcacher_stress
+
+ceph_test_snap_mapper_SOURCES = test/test_snap_mapper.cc
+ceph_test_snap_mapper_LDADD = $(LIBOSD) $(UNITTEST_LDADD) $(CEPH_GLOBAL)
+ceph_test_snap_mapper_CXXFLAGS = $(UNITTEST_CXXFLAGS)
+bin_DEBUGPROGRAMS += ceph_test_snap_mapper
+
+ceph_test_object_map_SOURCES = \
+ test/ObjectMap/test_object_map.cc \
+ test/ObjectMap/KeyValueDBMemory.cc
+ceph_test_object_map_LDADD = $(LIBOS) $(UNITTEST_LDADD) $(CEPH_GLOBAL)
+ceph_test_object_map_CXXFLAGS = $(UNITTEST_CXXFLAGS)
+bin_DEBUGPROGRAMS += ceph_test_object_map
+
+ceph_test_keyvaluedb_atomicity_SOURCES = test/ObjectMap/test_keyvaluedb_atomicity.cc
+ceph_test_keyvaluedb_atomicity_LDADD = $(LIBOS) $(UNITTEST_LDADD) $(CEPH_GLOBAL)
+ceph_test_keyvaluedb_atomicity_CXXFLAGS = $(UNITTEST_CXXFLAGS)
+bin_DEBUGPROGRAMS += ceph_test_keyvaluedb_atomicity
+
+ceph_test_keyvaluedb_iterators_SOURCES = \
+ test/ObjectMap/test_keyvaluedb_iterators.cc \
+ test/ObjectMap/KeyValueDBMemory.cc
+ceph_test_keyvaluedb_iterators_LDADD = $(LIBOS) $(UNITTEST_LDADD) $(CEPH_GLOBAL)
+ceph_test_keyvaluedb_iterators_CXXFLAGS = $(UNITTEST_CXXFLAGS)
+bin_DEBUGPROGRAMS += ceph_test_keyvaluedb_iterators
+
+ceph_test_store_tool_SOURCES = test/ObjectMap/test_store_tool/test_store_tool.cc
+ceph_test_store_tool_LDADD = $(LIBOS) $(CEPH_GLOBAL)
+ceph_test_store_tool_CXXFLAGS = $(UNITTEST_CXXFLAGS)
+bin_DEBUGPROGRAMS += ceph_test_store_tool
+
+ceph_test_cfuse_cache_invalidate_SOURCES = test/test_cfuse_cache_invalidate.cc
+bin_DEBUGPROGRAMS += ceph_test_cfuse_cache_invalidate
+
+
+noinst_HEADERS += \
+ test/osd/RadosModel.h \
+ test/osd/Object.h \
+ test/osd/TestOpStat.h \
+ test/bench/distribution.h \
+ test/bench/rados_backend.h \
+ test/bench/rbd_backend.h \
+ test/bench/bencher.h \
+ test/bench/backend.h \
+ test/bench/dumb_backend.h \
+ test/bench/stat_collector.h \
+ test/bench/detailed_stat_collector.h \
+ test/bench/testfilestore_backend.h \
+ test/common/ObjectContents.h \
+ test/encoding/types.h \
+ test/filestore/DeterministicOpSequence.h \
+ test/filestore/FileStoreTracker.h \
+ test/filestore/FileStoreDiff.h \
+ test/filestore/TestFileStoreState.h \
+ test/filestore/workload_generator.h \
+ test/kv_store_bench.h \
+ test/librados/test.h \
+ test/ObjectMap/KeyValueDBMemory.h \
+ test/omap_bench.h \
+ test/osd/Object.h \
+ test/osd/RadosModel.h \
+ test/osd/TestOpStat.h \
+ test/osdc/FakeWriteback.h \
+ test/system/cross_process_sem.h \
+ test/system/st_rados_create_pool.h \
+ test/system/st_rados_list_objects.h \
+ test/system/st_rados_delete_objs.h \
+ test/system/st_rados_delete_pool.h \
+ test/system/st_rados_notify.h \
+ test/system/st_rados_watch.h \
+ test/system/systest_runnable.h \
+ test/system/systest_settings.h \
+ test/unit.h
+
diff --git a/src/barclass.cc b/src/test/barclass.cc
index f5354f1e0f3..f5354f1e0f3 100644
--- a/src/barclass.cc
+++ b/src/test/barclass.cc
diff --git a/src/test/test_libcommon_build.cc b/src/test/buildtest_skeleton.cc
index 8215a05dbda..8215a05dbda 100644
--- a/src/test/test_libcommon_build.cc
+++ b/src/test/buildtest_skeleton.cc
diff --git a/src/test/encoding/types.h b/src/test/encoding/types.h
index a6f7cfb7883..514c76fc1a8 100644
--- a/src/test/encoding/types.h
+++ b/src/test/encoding/types.h
@@ -75,7 +75,7 @@ TYPE(ObjectStore::Transaction)
#include "os/SequencerPosition.h"
TYPE(SequencerPosition)
-#include "os/hobject.h"
+#include "common/hobject.h"
TYPE(hobject_t)
#include "mon/AuthMonitor.h"
diff --git a/src/fooclass.cc b/src/test/fooclass.cc
index 2db2d815bb0..2db2d815bb0 100644
--- a/src/fooclass.cc
+++ b/src/test/fooclass.cc
diff --git a/src/test/libcephfs/caps.cc b/src/test/libcephfs/caps.cc
index 96f1a90024d..9fa92cf29dc 100644
--- a/src/test/libcephfs/caps.cc
+++ b/src/test/libcephfs/caps.cc
@@ -11,11 +11,11 @@
* Foundation. See file COPYING.
*
*/
+#include "include/int_types.h"
#include "gtest/gtest.h"
#include "include/cephfs/libcephfs.h"
#include <linux/types.h>
-#include <inttypes.h>
#include "include/ceph_fs.h"
#include <errno.h>
#include <sys/fcntl.h>
diff --git a/src/test/librbd/test_librbd.cc b/src/test/librbd/test_librbd.cc
index 562be6a6bcf..84bf3477aff 100644
--- a/src/test/librbd/test_librbd.cc
+++ b/src/test/librbd/test_librbd.cc
@@ -12,6 +12,7 @@
*
*/
+#include "include/int_types.h"
#include "include/rados/librados.h"
#include "include/rbd_types.h"
#include "include/rbd/librbd.h"
@@ -20,7 +21,6 @@
#include "gtest/gtest.h"
#include <errno.h>
-#include <inttypes.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
diff --git a/src/test/osd/ErasureCodeExample.h b/src/test/osd/ErasureCodeExample.h
new file mode 100644
index 00000000000..896e614c6b5
--- /dev/null
+++ b/src/test/osd/ErasureCodeExample.h
@@ -0,0 +1,115 @@
+// -*- 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) 2013 Cloudwatt <libre.licensing@cloudwatt.com>
+ *
+ * Author: Loic Dachary <loic@dachary.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ */
+
+#ifndef CEPH_ERASURE_CODE_EXAMPLE_H
+#define CEPH_ERASURE_CODE_EXAMPLE_H
+
+#include <unistd.h>
+#include <errno.h>
+#include <sstream>
+#include "osd/ErasureCodeInterface.h"
+
+#define DATA_CHUNKS 2u
+#define CODING_CHUNKS 1u
+
+class ErasureCodeExample : public ErasureCodeInterface {
+public:
+ useconds_t delay;
+ ErasureCodeExample(const map<std::string,std::string> &parameters) :
+ delay(0)
+ {
+ if (parameters.find("usleep") != parameters.end()) {
+ std::istringstream ss(parameters.find("usleep")->second);
+ ss >> delay;
+ usleep(delay);
+ }
+ }
+
+ virtual ~ErasureCodeExample() {}
+
+ virtual int minimum_to_decode(const set<int> &want_to_read,
+ const set<int> &available_chunks,
+ set<int> *minimum) {
+ if (available_chunks.size() < DATA_CHUNKS)
+ return -EIO;
+ set<int>::iterator i;
+ unsigned j;
+ for (i = available_chunks.begin(), j = 0; j < DATA_CHUNKS; i++, j++)
+ minimum->insert(*i);
+ return 0;
+ }
+
+ virtual int minimum_to_decode_with_cost(const set<int> &want_to_read,
+ const map<int, int> &available,
+ set<int> *minimum) {
+ set <int> available_chunks;
+ for (map<int, int>::const_iterator i = available.begin();
+ i != available.end();
+ i++)
+ available_chunks.insert(i->first);
+ return minimum_to_decode(want_to_read, available_chunks, minimum);
+ }
+
+ virtual int encode(const set<int> &want_to_encode,
+ const bufferlist &in,
+ map<int, bufferlist> *encoded) {
+ unsigned chunk_length = ( in.length() / DATA_CHUNKS ) + 1;
+ unsigned length = chunk_length * ( DATA_CHUNKS + CODING_CHUNKS );
+ bufferlist out(in);
+ bufferptr pad(length - in.length());
+ pad.zero(0, DATA_CHUNKS);
+ out.push_back(pad);
+ char *p = out.c_str();
+ for (unsigned i = 0; i < chunk_length * DATA_CHUNKS; i++)
+ p[i + 2 * chunk_length] =
+ p[i + 0 * chunk_length] ^ p[i + 1 * chunk_length];
+ const bufferptr ptr = out.buffers().front();
+ for (set<int>::iterator j = want_to_encode.begin();
+ j != want_to_encode.end();
+ j++) {
+ bufferptr chunk(ptr, (*j) * chunk_length, chunk_length);
+ (*encoded)[*j].push_front(chunk);
+ }
+ return 0;
+ }
+
+ virtual int decode(const set<int> &want_to_read,
+ const map<int, bufferlist> &chunks,
+ map<int, bufferlist> *decoded) {
+
+ unsigned chunk_length = (*chunks.begin()).second.length();
+ for (set<int>::iterator i = want_to_read.begin();
+ i != want_to_read.end();
+ i++) {
+ if (chunks.find(*i) != chunks.end())
+ (*decoded)[*i] = chunks.find(*i)->second;
+ else {
+ bufferptr chunk(chunk_length);
+ map<int, bufferlist>::const_iterator k = chunks.begin();
+ const char *a = k->second.buffers().front().c_str();
+ k++;
+ const char *b = k->second.buffers().front().c_str();
+ for (unsigned j = 0; j < chunk_length; j++) {
+ chunk[j] = a[j] ^ b[j];
+ }
+ (*decoded)[*i].push_front(chunk);
+ }
+ }
+ return 0;
+ }
+};
+
+#endif
diff --git a/src/test/osd/ErasureCodePluginExample.cc b/src/test/osd/ErasureCodePluginExample.cc
new file mode 100644
index 00000000000..1543b1cdaed
--- /dev/null
+++ b/src/test/osd/ErasureCodePluginExample.cc
@@ -0,0 +1,34 @@
+// -*- 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) 2013 Cloudwatt <libre.licensing@cloudwatt.com>
+ *
+ * Author: Loic Dachary <loic@dachary.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ */
+
+#include "osd/ErasureCodePlugin.h"
+#include "ErasureCodeExample.h"
+
+class ErasureCodePluginExample : public ErasureCodePlugin {
+public:
+ virtual int factory(const map<std::string,std::string> &parameters,
+ ErasureCodeInterfaceRef *erasure_code)
+ {
+ *erasure_code = ErasureCodeInterfaceRef(new ErasureCodeExample(parameters));
+ return 0;
+ }
+};
+
+int __erasure_code_init(char *plugin_name)
+{
+ ErasureCodePluginRegistry &instance = ErasureCodePluginRegistry::instance();
+ return instance.add(plugin_name, new ErasureCodePluginExample());
+}
diff --git a/src/test/osd/RadosModel.h b/src/test/osd/RadosModel.h
index b9967d7af50..4f1aa4c3582 100644
--- a/src/test/osd/RadosModel.h
+++ b/src/test/osd/RadosModel.h
@@ -1,4 +1,6 @@
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
+#include "include/int_types.h"
+
#include "common/Mutex.h"
#include "common/Cond.h"
#include "include/rados/librados.hpp"
@@ -15,7 +17,6 @@
#include <time.h>
#include "Object.h"
#include "TestOpStat.h"
-#include "inttypes.h"
#include "test/librados/test.h"
#ifndef RADOSMODEL_H
diff --git a/src/test/osd/TestErasureCodeExample.cc b/src/test/osd/TestErasureCodeExample.cc
new file mode 100644
index 00000000000..66f521d7863
--- /dev/null
+++ b/src/test/osd/TestErasureCodeExample.cc
@@ -0,0 +1,146 @@
+// -*- 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) 2013 Cloudwatt <libre.licensing@cloudwatt.com>
+ *
+ * Author: Loic Dachary <loic@dachary.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ */
+
+#include "global/global_init.h"
+#include "ErasureCodeExample.h"
+#include "common/ceph_argparse.h"
+#include "global/global_context.h"
+#include "gtest/gtest.h"
+
+TEST(ErasureCodeExample, constructor)
+{
+ map<std::string,std::string> parameters;
+ {
+ ErasureCodeExample example(parameters);
+ EXPECT_EQ(0u, example.delay);
+ }
+ parameters["usleep"] = "10";
+ {
+ ErasureCodeExample example(parameters);
+ EXPECT_EQ(10u, example.delay);
+ }
+}
+
+TEST(ErasureCodeExample, minimum_to_decode)
+{
+ map<std::string,std::string> parameters;
+ ErasureCodeExample example(parameters);
+ set<int> available_chunks;
+ set<int> want_to_read;
+ want_to_read.insert(1);
+ {
+ set<int> minimum;
+ EXPECT_EQ(-EIO, example.minimum_to_decode(want_to_read,
+ available_chunks,
+ &minimum));
+ }
+ available_chunks.insert(0);
+ available_chunks.insert(2);
+ {
+ set<int> minimum;
+ EXPECT_EQ(0, example.minimum_to_decode(want_to_read,
+ available_chunks,
+ &minimum));
+ EXPECT_EQ(available_chunks, minimum);
+ EXPECT_EQ(2u, minimum.size());
+ EXPECT_EQ(1u, minimum.count(0));
+ EXPECT_EQ(1u, minimum.count(2));
+ }
+ {
+ set<int> minimum;
+ available_chunks.insert(1);
+ EXPECT_EQ(0, example.minimum_to_decode(want_to_read,
+ available_chunks,
+ &minimum));
+ EXPECT_EQ(2u, minimum.size());
+ EXPECT_EQ(1u, minimum.count(0));
+ EXPECT_EQ(1u, minimum.count(1));
+ }
+}
+
+TEST(ErasureCodeExample, encode_decode)
+{
+ map<std::string,std::string> parameters;
+ ErasureCodeExample example(parameters);
+
+ bufferlist in;
+ in.append("ABCDE");
+ int want_to_encode[] = { 0, 1, 2 };
+ map<int, bufferlist> encoded;
+ EXPECT_EQ(0, example.encode(set<int>(want_to_encode, want_to_encode+3),
+ in,
+ &encoded));
+ EXPECT_EQ(3u, encoded.size());
+ EXPECT_EQ(3u, encoded[0].length());
+ EXPECT_EQ('A', encoded[0][0]);
+ EXPECT_EQ('B', encoded[0][1]);
+ EXPECT_EQ('C', encoded[0][2]);
+ EXPECT_EQ('D', encoded[1][0]);
+ EXPECT_EQ('E', encoded[1][1]);
+ EXPECT_EQ('A'^'D', encoded[2][0]);
+ EXPECT_EQ('B'^'E', encoded[2][1]);
+ EXPECT_EQ('C'^0, encoded[2][2]);
+
+ // all chunks are available
+ {
+ int want_to_decode[] = { 0, 1 };
+ map<int, bufferlist> decoded;
+ EXPECT_EQ(0, example.decode(set<int>(want_to_decode, want_to_decode+2),
+ encoded,
+ &decoded));
+ EXPECT_EQ(2u, decoded.size());
+ EXPECT_EQ(3u, decoded[0].length());
+ EXPECT_EQ('A', decoded[0][0]);
+ EXPECT_EQ('B', decoded[0][1]);
+ EXPECT_EQ('C', decoded[0][2]);
+ EXPECT_EQ('D', decoded[1][0]);
+ EXPECT_EQ('E', decoded[1][1]);
+ }
+
+ // one chunk is missing
+ {
+ map<int, bufferlist> degraded = encoded;
+ degraded.erase(0);
+ EXPECT_EQ(2u, degraded.size());
+ int want_to_decode[] = { 0, 1 };
+ map<int, bufferlist> decoded;
+ EXPECT_EQ(0, example.decode(set<int>(want_to_decode, want_to_decode+2),
+ degraded,
+ &decoded));
+ EXPECT_EQ(2u, decoded.size());
+ EXPECT_EQ(3u, decoded[0].length());
+ EXPECT_EQ('A', decoded[0][0]);
+ EXPECT_EQ('B', decoded[0][1]);
+ EXPECT_EQ('C', decoded[0][2]);
+ EXPECT_EQ('D', decoded[1][0]);
+ EXPECT_EQ('E', decoded[1][1]);
+ }
+}
+
+int main(int argc, char **argv) {
+ vector<const char*> args;
+ argv_to_vec(argc, (const char **)argv, args);
+
+ global_init(NULL, args, CEPH_ENTITY_TYPE_CLIENT, CODE_ENVIRONMENT_UTILITY, 0);
+ common_init_finish(g_ceph_context);
+
+ ::testing::InitGoogleTest(&argc, argv);
+ return RUN_ALL_TESTS();
+}
+
+// Local Variables:
+// compile-command: "cd ../.. ; make -j4 && make unittest_erasure_code_example && ./unittest_erasure_code_example --gtest_filter=*.* --log-to-stderr=true --debug-osd=20"
+// End:
diff --git a/src/test/osd/TestErasureCodePluginExample.cc b/src/test/osd/TestErasureCodePluginExample.cc
new file mode 100644
index 00000000000..67b41f2011a
--- /dev/null
+++ b/src/test/osd/TestErasureCodePluginExample.cc
@@ -0,0 +1,51 @@
+// -*- 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) 2013 Cloudwatt <libre.licensing@cloudwatt.com>
+ *
+ * Author: Loic Dachary <loic@dachary.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ */
+
+#include <errno.h>
+#include "common/Thread.h"
+#include "global/global_init.h"
+#include "osd/ErasureCodePlugin.h"
+#include "common/ceph_argparse.h"
+#include "global/global_context.h"
+#include "gtest/gtest.h"
+
+TEST(ErasureCodePluginRegistry, factory)
+{
+ map<std::string,std::string> parameters;
+ parameters["erasure-code-directory"] = ".libs";
+ ErasureCodeInterfaceRef erasure_code;
+ ErasureCodePluginRegistry &instance = ErasureCodePluginRegistry::instance();
+ EXPECT_FALSE(erasure_code);
+ EXPECT_EQ(0, instance.factory("example", parameters, &erasure_code));
+ EXPECT_TRUE(erasure_code);
+ ErasureCodePlugin *plugin = 0;
+ EXPECT_EQ(-EEXIST, instance.load("example", parameters, &plugin));
+}
+
+int main(int argc, char **argv) {
+ vector<const char*> args;
+ argv_to_vec(argc, (const char **)argv, args);
+
+ global_init(NULL, args, CEPH_ENTITY_TYPE_CLIENT, CODE_ENVIRONMENT_UTILITY, 0);
+ common_init_finish(g_ceph_context);
+
+ ::testing::InitGoogleTest(&argc, argv);
+ return RUN_ALL_TESTS();
+}
+
+// Local Variables:
+// compile-command: "cd ../.. ; make -j4 && make unittest_erasure_code_plugin && ./unittest_erasure_code_plugin --gtest_filter=*.* --log-to-stderr=true --debug-osd=20"
+// End:
diff --git a/src/test/perf_counters.cc b/src/test/perf_counters.cc
index d0b05f9f049..c44a15ef856 100644
--- a/src/test/perf_counters.cc
+++ b/src/test/perf_counters.cc
@@ -11,6 +11,10 @@
* Foundation. See file COPYING.
*
*/
+#include "include/int_types.h"
+#include "include/types.h" // FIXME: ordering shouldn't be important, but right
+ // now, this include has to come before the others.
+
#include "common/perf_counters.h"
#include "common/admin_socket_client.h"
@@ -19,9 +23,6 @@
#include "common/errno.h"
#include "common/safe_io.h"
-#include "include/types.h" // FIXME: ordering shouldn't be important, but right
- // now, this include has to come before the others.
-
#include "common/code_environment.h"
#include "global/global_context.h"
#include "global/global_init.h"
@@ -30,7 +31,6 @@
#include <errno.h>
#include <fcntl.h>
-#include <inttypes.h>
#include <map>
#include <poll.h>
#include <sstream>
diff --git a/src/streamtest.cc b/src/test/streamtest.cc
index 21693ac8713..21693ac8713 100644
--- a/src/streamtest.cc
+++ b/src/test/streamtest.cc
diff --git a/src/test_trans.cc b/src/test/test_trans.cc
index 43821c13aec..43821c13aec 100644
--- a/src/test_trans.cc
+++ b/src/test/test_trans.cc
diff --git a/src/testclass.cc b/src/test/testclass.cc
index 22a97be6dcb..22a97be6dcb 100644
--- a/src/testclass.cc
+++ b/src/test/testclass.cc
diff --git a/src/testcrypto.cc b/src/test/testcrypto.cc
index 0b7a9d54742..0b7a9d54742 100644
--- a/src/testcrypto.cc
+++ b/src/test/testcrypto.cc
diff --git a/src/testkeys.cc b/src/test/testkeys.cc
index 27c38124ade..27c38124ade 100644
--- a/src/testkeys.cc
+++ b/src/test/testkeys.cc
diff --git a/src/testmsgr.cc b/src/test/testmsgr.cc
index 4de779b5d7f..4de779b5d7f 100644
--- a/src/testmsgr.cc
+++ b/src/test/testmsgr.cc
diff --git a/src/tools/Makefile.am b/src/tools/Makefile.am
new file mode 100644
index 00000000000..4b8da77951a
--- /dev/null
+++ b/src/tools/Makefile.am
@@ -0,0 +1,87 @@
+ceph_osdomap_tool_SOURCES = tools/ceph-osdomap-tool.cc
+ceph_osdomap_tool_LDADD = $(LIBOS) $(CEPH_GLOBAL) -lboost_program_options
+bin_DEBUGPROGRAMS += ceph-osdomap-tool
+
+ceph_monstore_tool_SOURCES = tools/ceph-monstore-tool.cc
+ceph_monstore_tool_LDADD = $(LIBOS) $(CEPH_GLOBAL) -lboost_program_options
+bin_DEBUGPROGRAMS += ceph-monstore-tool
+
+ceph_filestore_dump_SOURCES = tools/ceph-filestore-dump.cc
+ceph_filestore_dump_LDADD = $(LIBOSD) $(LIBOS) $(CEPH_GLOBAL) -lboost_program_options
+if LINUX
+ceph_filestore_dump_LDADD += -ldl
+endif # LINUX
+bin_PROGRAMS += ceph_filestore_dump
+
+monmaptool_SOURCES = tools/monmaptool.cc
+monmaptool_LDADD = $(CEPH_GLOBAL)
+bin_PROGRAMS += monmaptool
+
+crushtool_SOURCES = tools/crushtool.cc
+crushtool_LDADD = $(CEPH_GLOBAL)
+bin_PROGRAMS += crushtool
+
+osdmaptool_SOURCES = tools/osdmaptool.cc
+osdmaptool_LDADD = $(CEPH_GLOBAL)
+bin_PROGRAMS += osdmaptool
+
+ceph_scratchtool_SOURCES = tools/scratchtool.c
+ceph_scratchtool_LDADD = $(LIBRADOS) $(CEPH_GLOBAL)
+bin_DEBUGPROGRAMS += ceph_scratchtool
+
+ceph_scratchtoolpp_SOURCES = tools/scratchtoolpp.cc
+ceph_scratchtoolpp_LDADD = $(LIBRADOS) $(CEPH_GLOBAL)
+bin_DEBUGPROGRAMS += ceph_scratchtoolpp
+
+ceph_psim_SOURCES = tools/psim.cc
+ceph_psim_LDADD = $(CEPH_GLOBAL)
+bin_DEBUGPROGRAMS += ceph_psim
+
+ceph_dupstore_SOURCES = tools/dupstore.cc
+ceph_dupstore_LDADD = $(LIBOS) $(CEPH_GLOBAL)
+bin_DEBUGPROGRAMS += ceph_dupstore
+
+ceph_radosacl_SOURCES = tools/radosacl.cc
+ceph_radosacl_LDADD = $(LIBRADOS) $(CEPH_GLOBAL)
+bin_DEBUGPROGRAMS += ceph_radosacl
+
+rados_SOURCES = \
+ tools/rados/rados.cc \
+ tools/rados/rados_import.cc \
+ tools/rados/rados_export.cc \
+ tools/rados/rados_sync.cc
+rados_SOURCES += common/obj_bencher.cc # needs cleanup so it can go in libcommon.la
+rados_LDADD = libcls_lock_client.la $(LIBRADOS) $(CEPH_GLOBAL)
+bin_PROGRAMS += rados
+
+if WITH_REST_BENCH
+rest_bench_SOURCES = tools/rest_bench.cc
+rest_bench_SOURCES += common/obj_bencher.cc # needs cleanup so it can go in libcommon.la
+rest_bench_LDADD = $(CEPH_GLOBAL)
+bin_PROGRAMS += rest-bench
+
+if WITH_SYSTEM_LIBS3
+rest_bench_LDADD += -ls3
+else
+rest_bench_LDADD += libs3/build/lib/libs3.a -lcurl -lxml2
+rest_bench_CXXFLAGS = ${AM_CXXFLAGS} -I$(top_srcdir)/src/libs3/inc
+SUBDIRS += libs3
+endif # WITH_SYSTEM_LIBS3
+endif # WITH_REST_BENCH
+
+ceph_conf_SOURCES = tools/ceph_conf.cc
+ceph_conf_LDADD = $(CEPH_GLOBAL)
+bin_PROGRAMS += ceph-conf
+
+ceph_authtool_SOURCES = tools/ceph_authtool.cc
+ceph_authtool_LDADD = $(CEPH_GLOBAL)
+bin_PROGRAMS += ceph-authtool
+
+ceph_mon_store_converter_SOURCES = tools/mon_store_converter.cc
+ceph_mon_store_converter_LDADD = $(LIBMON) $(LIBOS) $(CEPH_GLOBAL)
+bin_PROGRAMS += ceph_mon_store_converter
+
+noinst_HEADERS += \
+ tools/rados/rados_sync.h \
+ tools/common.h
+
diff --git a/src/tools/ceph-filestore-dump.cc b/src/tools/ceph-filestore-dump.cc
index 3badc2160b0..49b8d10bdba 100644
--- a/src/tools/ceph-filestore-dump.cc
+++ b/src/tools/ceph-filestore-dump.cc
@@ -1017,7 +1017,7 @@ int main(int argc, char **argv)
("pgid", po::value<string>(&pgidstr),
"PG id, mandatory")
("type", po::value<string>(&type),
- "Type which is 'info' or 'log', mandatory")
+ "Type one of info, log, export, or import, mandatory")
("file", po::value<string>(&file),
"path of file to export or import")
("debug", "Enable diagnostic output to stderr")
diff --git a/src/ceph_authtool.cc b/src/tools/ceph_authtool.cc
index f66a3c66eee..f66a3c66eee 100644
--- a/src/ceph_authtool.cc
+++ b/src/tools/ceph_authtool.cc
diff --git a/src/ceph_conf.cc b/src/tools/ceph_conf.cc
index b2286f4e094..b2286f4e094 100644
--- a/src/ceph_conf.cc
+++ b/src/tools/ceph_conf.cc
diff --git a/src/crushtool.cc b/src/tools/crushtool.cc
index 75c26c098b6..75c26c098b6 100644
--- a/src/crushtool.cc
+++ b/src/tools/crushtool.cc
diff --git a/src/dupstore.cc b/src/tools/dupstore.cc
index e17eb2201a7..e17eb2201a7 100644
--- a/src/dupstore.cc
+++ b/src/tools/dupstore.cc
diff --git a/src/mon_store_converter.cc b/src/tools/mon_store_converter.cc
index 1c0d3af98e2..1c0d3af98e2 100644
--- a/src/mon_store_converter.cc
+++ b/src/tools/mon_store_converter.cc
diff --git a/src/monmaptool.cc b/src/tools/monmaptool.cc
index 57843aa350d..57843aa350d 100644
--- a/src/monmaptool.cc
+++ b/src/tools/monmaptool.cc
diff --git a/src/osdmaptool.cc b/src/tools/osdmaptool.cc
index 2e55026076c..2e55026076c 100644
--- a/src/osdmaptool.cc
+++ b/src/tools/osdmaptool.cc
diff --git a/src/psim.cc b/src/tools/psim.cc
index c1adc7580fb..c1adc7580fb 100644
--- a/src/psim.cc
+++ b/src/tools/psim.cc
diff --git a/src/rados.cc b/src/tools/rados/rados.cc
index 0b7cc2b9cb7..e8386959349 100644
--- a/src/rados.cc
+++ b/src/tools/rados/rados.cc
@@ -880,7 +880,7 @@ protected:
public:
RadosBencher(CephContext *cct_, librados::Rados& _r, librados::IoCtx& _i)
- : ObjBencher(cct), completions(NULL), rados(_r), io_ctx(_i), iterator_valid(false) {}
+ : ObjBencher(cct_), completions(NULL), rados(_r), io_ctx(_i), iterator_valid(false) {}
~RadosBencher() { }
};
diff --git a/src/rados_export.cc b/src/tools/rados/rados_export.cc
index 5b8a899d3b8..bf6654114c5 100644
--- a/src/rados_export.cc
+++ b/src/tools/rados/rados_export.cc
@@ -11,6 +11,7 @@
* Foundation. See file COPYING.
*
*/
+#include "include/int_types.h"
#include "rados_sync.h"
#include "common/errno.h"
@@ -20,7 +21,6 @@
#include <dirent.h>
#include <errno.h>
#include <fstream>
-#include <inttypes.h>
#include <iostream>
#include <sstream>
#include <stdlib.h>
diff --git a/src/rados_import.cc b/src/tools/rados/rados_import.cc
index da968a7cc50..a6a398d767b 100644
--- a/src/rados_import.cc
+++ b/src/tools/rados/rados_import.cc
@@ -11,11 +11,11 @@
* Foundation. See file COPYING.
*
*/
+#include "include/int_types.h"
#include <dirent.h>
#include <errno.h>
#include <fstream>
-#include <inttypes.h>
#include <iostream>
#include <sstream>
#include <stdlib.h>
diff --git a/src/rados_sync.cc b/src/tools/rados/rados_sync.cc
index d16894c6ea9..03293d3402a 100644
--- a/src/rados_sync.cc
+++ b/src/tools/rados/rados_sync.cc
@@ -11,6 +11,7 @@
* Foundation. See file COPYING.
*
*/
+#include "include/int_types.h"
#include "common/ceph_argparse.h"
#include "common/config.h"
@@ -27,7 +28,6 @@
#include <dirent.h>
#include <errno.h>
#include <fstream>
-#include <inttypes.h>
#include <iostream>
#include <memory>
#include <sstream>
diff --git a/src/rados_sync.h b/src/tools/rados/rados_sync.h
index 0f7226e0239..0f7226e0239 100644
--- a/src/rados_sync.h
+++ b/src/tools/rados/rados_sync.h
diff --git a/src/radosacl.cc b/src/tools/radosacl.cc
index d2f7ca5c488..d2f7ca5c488 100644
--- a/src/radosacl.cc
+++ b/src/tools/radosacl.cc
diff --git a/src/scratchtool.c b/src/tools/scratchtool.c
index 22cf2bdf531..22cf2bdf531 100644
--- a/src/scratchtool.c
+++ b/src/tools/scratchtool.c
diff --git a/src/scratchtoolpp.cc b/src/tools/scratchtoolpp.cc
index 62096920300..62096920300 100644
--- a/src/scratchtoolpp.cc
+++ b/src/tools/scratchtoolpp.cc