Douglas Fuller [Mon, 27 Jun 2016 19:30:11 +0000 (12:30 -0700)]
mds: Kill C_SaferCond in evict_sessions()
MDSRankDispatcher::evict_sessions waits on a C_SaferCond for
kill_session to complete on each of its victims. Change the
command handling flow to pass command messages all the way down
to MDSRankDispatcher. Extract the MDSDaemon's reply path into a
static function callable from a new context in the MDSRankDispatcher.
See: http://tracker.ceph.com/issues/16288 Signed-off-by: Douglas Fuller <dfuller@redhat.com>
cmake: remove unnecessary linked libs from libcephfs
* some of the libs shares the same .cc which has static C++ variables. if
we link against the different libs sharing the same static C++
variables, and the dtor of the C++ variables has side-effects, among
other things, deallocates a memory chunk. then, we are in the trouble of
double free. so "osd" lib is removed.
* some of the libs are referenced by the linked lib, so no need to link
against them again. for example, BLKID_LIBRARIES are linked by
libcommon, so we can remove it from the linked libs list.
* and lib "os" and "cls_references_objs" are not used by libcephfs at all,
so remove them.
Sage Weil [Fri, 24 Jun 2016 13:43:52 +0000 (09:43 -0400)]
os/bluestore/BlueFS: make _sync_and_flush_log smarter
If we know what event we need to wait for, only wait long enough for it
to flush. This helps the situation where another thread flushed what we
needed, and more dirty stuff was added to log_t, but we don't need to
wait for that too for our caller to be happy.
Sage Weil [Fri, 24 Jun 2016 13:23:21 +0000 (09:23 -0400)]
os/bluestore: drop lock while we flush the log
Handle cases where we have multiple racing threads trying to flush the
log by only allowing one concurrent log flush to be in progress at a time,
and behave if, after flushing, there are no more dirty records to flush.
Sage Weil [Thu, 23 Jun 2016 13:39:31 +0000 (09:39 -0400)]
os/bluestore/BlueFS: drop lock while waiting for user io to complete
_flush_wait is safe to call without a lock, as long as our reference is
stable. Rename it wait_for_aio() to be more clear about what it does and
the fact that it doesn't require a lock.
Sage Weil [Thu, 23 Jun 2016 13:33:09 +0000 (09:33 -0400)]
os/bluestore/BlueFS: track dirty by log_seq, log_seq_stable
Note when we dirty a file, and clean it only if that seq has been
committed. Currently this is always the case because we don't drop the
lock, but that will change shortly.
Kefu Chai [Thu, 30 Jun 2016 07:39:52 +0000 (15:39 +0800)]
cmake: install libs into ${CMAKE_INSTALL_LIBDIR}
this address rpm build failures on amd64 platforms:
Directory not found:
/srv/autobuild-ceph/gitbuilder.git/build/rpmbuild/BUILDROOT/ceph-11.0.0-119.gcd3ee3c.x86_64/usr/lib64/rados-classes
File not found by glob:
/srv/autobuild-ceph/gitbuilder.git/build/rpmbuild/BUILDROOT/ceph-11.0.0-119.gcd3ee3c.x86_64/usr/lib64/rados-classes/*
File not found by glob:
/srv/autobuild-ceph/gitbuilder.git/build/rpmbuild/BUILDROOT/ceph-11.0.0-119.gcd3ee3c.x86_64/usr/lib64/libos_tp.so*
File not found by glob:
/srv/autobuild-ceph/gitbuilder.git/build/rpmbuild/BUILDROOT/ceph-11.0.0-119.gcd3ee3c.x86_64/usr/lib64/libosd_tp.so*
Yan Jun [Thu, 30 Jun 2016 02:49:41 +0000 (10:49 +0800)]
rgw: fix the missing return value
If `get_bucket_index_object` returns an error code (-ENOTSUP)
with ivalid `hash_type`, we should return this negative error code
that resulting in `BucketShard::init` failed as expected,
oherwise it will go wrong.
According the Linux manual page:
POSIX.1-2001 does not require the inclusion of <sys/types.h>, and this header file is not required on Linux. However, some historical (BSD) implementations required this header file, and portable applications are probably wise to include it.
Submitted-by: Willem Jan Withagen <wjw@digiware.nl>
Matt Benjamin [Tue, 21 Jun 2016 19:59:18 +0000 (15:59 -0400)]
automake, ssl: real openssl detection, fix ssl linkage w/NSS
This change mainly intends to prevent linking with libssl when the
crypto provider is NSS, which provides an SSL implementation (the
implementation we must use and prefer when NSS is selected).
Secondarily, actually detect openssl when it is selected, which
happens by default and co-selects with cryptopp. To do this, we
import the ax_check_openssl.m4 from the automake archive.
Since upstream builds now prefer NSS crypto, make this the default.
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
Matt Benjamin [Mon, 20 Jun 2016 21:21:53 +0000 (17:21 -0400)]
cmake: rework NSS and SSL
The cmake build should select NSS or CryptoPP consistently with
current autoconf logic, as used in our RHEL builds (-DWITH_NSS),
and the SSL linkage must match (for NSS, -lssl3).
With this change, there is no direct linkage with libssl when NSS
is selected (I still see indirect linkage via libcurl, in turn
via libssh2, looking into that).
With guidance from upstream and downstream, NSS builds are now
selected by default.
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
Kefu Chai [Wed, 29 Jun 2016 07:49:26 +0000 (15:49 +0800)]
cmake: use CMAKE_POSITION_INDEPENDENT_CODE property instead of -fPIC
use the global setting of CMAKE_POSITION_INDEPENDENT_CODE instead of
hardwiring the CMAKE_C_FLAGS with -fPIC. this helps to reduce the
overhead of symbol resolution when user is using static libraries.
see
https://cmake.org/cmake/help/v2.8.11/cmake.html#variable:CMAKE_POSITION_INDEPENDENT_CODE
Kefu Chai [Wed, 29 Jun 2016 06:47:52 +0000 (14:47 +0800)]
cmake: move librados.cc out of libradosstriper
NObjectIterator::__EndObjectIterator is a static member variable
whose destructor deletes a pointer. librados.cc is the source file that
defines __EndObjectIterator. before this change rados cli is linked
against libradosstriper and librados. both of them include librados.cc.
that's why the dtor is called twice, hence double free when the dso
is closed and the static variables are destructed. in this change,
the librados.cc is moved out of libradosstriper, RadosClient.cc,
RadosXattrIter.cc and IoCtxImpl.cc kept as the OBJECT library, as
libradostriper is accessing the non-public symbols defined by them.
Kefu Chai [Fri, 20 May 2016 15:45:20 +0000 (23:45 +0800)]
debian/rules: package in a more debhelper way
this helps to keep the build rule simpler, and easier to customize
* -j$(NUMJOBS) is taken care of by 'dh --parallel'
* use 'autoreconf' dh add-on to autoconf cleanup
* add dh-autoreconf to Build-Depends
* bump debhelper compatibility level to 8, as jewel's supported
debian based distro is jessie (with debhelper 9.20150101),
ubuntu trusty (with debhelper 9.20131227ubuntu1)