/usr/include/linux/fs.h defines this on CentOS 5, even though it does not
in fact compile. This stupid workaround avoids the problem.
Reported-by: Nick Couchman <Nick.Couchman@seakr.com>
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
First try the FL_ALLOC_PUNCH_HOLE fallocate() flag. If we get EOPNOTSUPP,
fall back to writing zeros.
Check for fallocate(2) with configure. Also, avoid this if we are not
Linux, since I'm not sure about the hard-coded FL_ALLOC_PUNCH_HOLE being
correct on other platforms.
Signed-off-by: Sage Weil <sage@newdream.net>
Reviewed-by: Samuel Just <samuel.just@dreamhost.com>
Add a resource agent for mapping, unmapping and monitoring RBD devices.
Maps an RBD on start, unmaps it on stop. Checks "rbd showmapped"
output for monitoring whether the device is mapped, thus does not
rely on the ceph-rbdnamer udev magic to be enabled.
This RA is cloneable and essentially allows people to use RBD devices
as a drop-in replacement for
- iSCSI devices,
- host-based mirrored devices using md RAID-1,
- DRBD devices
in Pacemaker clusters.
Add a wrapper around the ceph init script that makes
MDS, OSD and MON configurable as Open Cluster Framework
(OCF) compliant cluster resources. Allows Ceph
daemons to tie in with cluster resource managers that
support OCF, such as Pacemaker (http://www.clusterlabs.org).
Disabled by default, configure --with-ocf to enable.
Signed-off-by: Florian Haas <florian@hastexo.com>
Build tests (that check if there are unresolved symbols in libraries)
can slow down the build a lot. We should only enable them when
developers need them.
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
No need for a separate qa/src/ dir; just put them where we want them. We
need to ignore non-executable files when doing the bulk runs anyway.
Signed-off-by: Sage Weil <sage@newdream.net>
Ancient versions of gcc, such as the gcc 4.1.2 in RHEL 5.5, don't
support some -W flags that newer versions do. Fix up configure.ac
and Makefile.am to use them if you have them.
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
Added new configure flag --with-nss that enables this. NSS is also
automatically used if it is available and CryptoPP is not; use
--without-nss to explicitly forbid this.
No change on rgw crypto yet; rgw won't build without CryptoPP for now.
NSS initialization is in a static constructor for now. All it does is
set some values on in-memory data structures, so as long as no (other)
static constructor tries to use it, everything should just work. While
this could be moved to common_init, there are several other context
initialization steps with NSS, and a later refactoring to share the
results of these can just include NSS init as its first operation, at
practically no cost.
Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
Use new boost::spirit header files where available, to eliminate the
annoying compiler warning on newer systems.
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
We already check for libcrypto++ using PKG_CHECK_MODULES; we don't need
to fish for header files.
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
This way when we're confident it works right, we can
remove the set<Context*> and just rely on ref counting.
Further optimizations would include using a spinlock
rather than a mutex, or possibly even just switching
sub_[created|existing]_count to be atomics.
Signed-off-by: Greg Farnum <gregf@hq.newdream.net>
Use ``make check`` to run the tests.
The src/gtest directory comes from ``svn export
http://googletest.googlecode.com/svn/tags/release-1.5.0 src/gtest``
and running "git add -f src/gtest".
gtest is licensed under the New BSD license, see src/gtest/COPYING.
For more on Google Test, see http://code.google.com/p/googletest/
Changed autogen.sh regenerate gtest automake files too. Make sure to
run ``./autogen.sh && ./configure`` after merging this commit, or
incremental builds may fail. The automake integration is inspired
heavily by the protobuf project, and may still be problematic.
Make git ignore files generated by gtest compilation.
Currently putting in just one new-style unit test, refactoring old
tests to fit will come in separate commits.
Note: if you are starting daemons, listening on TCP ports, using
multiple machines, mounting filesystems, etc, it's not a unit test
and does not belong in this setup. A framework for system/integration
tests will be provided later.