Peng Xie [Sun, 26 Aug 2018 14:02:28 +0000 (22:02 +0800)]
client:two ceph-fuse client, one can not list out files created by another.
the problem happend after mds restored the stale client session,
right after one normal client created files under one specific
dir,while the restored client can not list out the just created
files.
Patrick Donnelly [Fri, 17 Aug 2018 19:04:42 +0000 (12:04 -0700)]
Merge PR #23575 into master
* refs/pull/23575/head:
tools/cephfs-shell:pep8 code clean
tools/cephfs-shell:resolved removing files using pattern inside sub-directories
tools/cephfs-shell:changed output representation for the commands cwd and ls
tools/cephfs-shell:resolved removing directories using pattern inside sub-directories
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Kefu Chai [Tue, 14 Aug 2018 08:11:13 +0000 (16:11 +0800)]
cmake: link against gtest in a better way
* add FindGMock.cmake which allows user to use the libgtest-dev
shipped by distro
* add GMock::{GMock,Main}, GTest::{GTest,Main} targets to be
compatible with FindGTest.cmake and FindGMock.cmake, which
expose the built libraries with properties adhered to
them. so the consumer of them can import them in a better way.
* update tests to drop the commands like
set_target_properties(foo PROPERTIES COMPILE_FLAGS ${UNITTEST_CXX_FLAGS}),
as they are already linked against gmock and gtest.
Kefu Chai [Fri, 17 Aug 2018 04:27:49 +0000 (12:27 +0800)]
cmake: fix Finddpdk.cmake
* add dpdk::dpdk if dpdk is built or found, as seastar checks for
it before adding its component libraries. if user installs libdpdk
and builds WITH_SEASTAR=ON or WITH_DPDK=ON, cmake fails to configure
the building system without this fix.
* add dpdk::cflags target for populating the -march=<arch> compile
option.
* also use pkg-config for finding dpdk.
* link common_async_dpdk against dpdk::dpdk instead
please note, the reason why we can remove the "-march=native" compile
option from Finddpdk.cmake, is that the distro shipped header files
are "generic" in the sense of "-march=<ARCH>", they do not enable
the arch specific intrinsic by default, hence the source files
including them do not need specific compiler options.
Nathan Cutler [Thu, 2 Aug 2018 18:15:15 +0000 (20:15 +0200)]
cmake: do not build DPDK with -march=native
-march=native causes gcc to use opcodes according to whichever CPU happens to
be installed in the build host, which can be different for every build. This
makes it impossible to achieve a reproducible build.
Also, if the build host has a very new CPU, running the resulting binaries on
older CPUs (of the same family, i.e. x86_64) could result in segmentation
fault.
Tiago Melo [Fri, 3 Aug 2018 16:58:21 +0000 (17:58 +0100)]
mgr/dashboard: Add decorator to skip parameter encoding
By enconding all parameters of api services we were also encoding parameters
that were being sent in the body of the request.
Those parameters don't need to be enconded and the server never decodes them.
With this new decorator you can specify if you don't want a parameter to be
enconded.
Kefu Chai [Thu, 16 Aug 2018 09:25:04 +0000 (17:25 +0800)]
pybind: do not check MFLAGS
clang does not check for directories passed by -iquote/path/to/foo.h, if
a header is included using `#include <foo.h>`
it complains:
/home/kefu/ceph/src/pybind/rados/tmpwzjOsS/rados_dummy.c:2:10: error:
'rados/librados.h' file not found with <angled> include; use "quotes"
instead
^~~~~~~~~~~~~~~~~~
"rados/librados.h"
1 error generated.
and MFLAGS does not exist in the env variables of setup.py launched by
the top-level make.
Sage Weil [Mon, 9 Apr 2018 19:58:03 +0000 (14:58 -0500)]
os/filestore: estimate omap_allocated
Assume all of leveldb/rocksdb is omap. This is an overestimate, but
better than nothing.
We don't populate the metadata overhead (no easy way to calculate this
that comes to mind). And we don't populate the compression-related
fields. It's possible we could make something up here in the VDO
case...
Sage Weil [Tue, 10 Apr 2018 17:55:55 +0000 (12:55 -0500)]
os/ObjectMap: add get_db() accessor
This is just to let us get at the underlying KeyValueDB for DBObjectMap.
It is not really better or worse than adding accessors for things like
GetEstimatedSize() to ObjectMap.
Patrick Donnelly [Mon, 30 Jul 2018 17:03:23 +0000 (10:03 -0700)]
msg: add factory method to correctly construct smart_ptr
This is to avoid easy leaks of the form:
boost::intrusive_ptr(new M*(...));
where a ref is leaked because constructing the intrusive_ptr adds a ref.
It is expected that eventually all constructors move to protected/private so
that the message's factory is the only way to build a new message (safely).
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
Patrick Donnelly [Sun, 29 Jul 2018 01:16:02 +0000 (18:16 -0700)]
mds: manage Message lifetime with intrusive_ptr
This change turned out to be far more extensive than I hoped but the end result
should prevent all Message-related memory leaks. I believe I fixed several
incidentally.
Fixes: http://tracker.ceph.com/issues/24306 Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
Jeff Layton [Wed, 15 Aug 2018 16:24:45 +0000 (12:24 -0400)]
librados: add a rados_omap_iter_size function
Sometimes we need to know how many elements are represented by an omap
iterator. Add a new rados_omap_iter_size to return the number of
elements in the returned iterator.
Also add some sanity checks for this to existing tests.
Tracker: http://tracker.ceph.com/issues/26948 Signed-off-by: Jeff Layton <jlayton@redhat.com>
Kefu Chai [Wed, 15 Aug 2018 05:28:53 +0000 (13:28 +0800)]
man: skip directive starting with ".."
the target definition of hyper link looks like:
.. _a-reference-label:
there is chance that we need to add `:ref:` referencing man pages,
and add target definition at the beginning of the manapges for the
references. in that case, we need to skip the ref directives when
looking for the title of the manpage.
Patrick Donnelly [Sun, 29 Jul 2018 19:27:04 +0000 (12:27 -0700)]
msg: dispatch intrusive_ptr Messages
This codifies the giving of a reference to the Dispatcher and helps avoid
memory leaks. Old-style dispatch is kept to allow older code to continue
working.
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
Sage Weil [Wed, 15 Aug 2018 01:31:29 +0000 (20:31 -0500)]
Merge PR #23240 into master
* refs/pull/23240/head:
qa/suites/rados, qa/workunits/rados: Add suite/workunit for ceph-crash
add ceph-crash service
common/options: enable mgr 'crash' module by default
global/signal_handler: add 'done' file to signal crashdump is ready