Kefu Chai [Fri, 24 Nov 2017 05:56:02 +0000 (13:56 +0800)]
make-dist: exclude unused bits in boost
the docs, examples and tests are not used. so drop them. we could go
further by removing unused components in boost. but that'd be an issue
if somebody added a component in CMakeLists but forgets to update this
script. also, we need to remove boost/$component and lib/$component to
achieve this goal. this also introduces extra complicity. so leave it
for another change.
Kefu Chai [Fri, 24 Nov 2017 02:35:00 +0000 (10:35 +0800)]
cmake: check bootstrap.sh instead before downloading boost
config.hpp does not exist if boost is not configured. so a boost source
directory unpacked from dist tarball does not have this file. the
bootstrap.sh instead, it is used to create the necessary config files
for jam.
Patrick Donnelly [Wed, 22 Nov 2017 21:40:07 +0000 (13:40 -0800)]
Merge PR #18787 into master
* refs/pull/18787/head:
mds: prevent filelock from being stuck at XSYN state
mds: implement LOCK_XSYN_LOCK and LOCK_XSYN_MIX
mds: cleanup set/drop loner code
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Brad Hubbard [Fri, 17 Nov 2017 01:54:38 +0000 (11:54 +1000)]
build/ops: rpm: selinux-policy fixes
Requiring the file /usr/share/selinux/devel/policyhelp breaks fc27 and
Rawhide builds as they do not have that file. This exposed the fact this
code had not worked in some time due to changes in selinux policy
modules packaging. See
https://bugzilla.redhat.com/show_bug.cgi?id=999584
Kefu Chai [Wed, 22 Nov 2017 04:57:18 +0000 (12:57 +0800)]
msg/simple: pass a char for reading from shutdown_rd_fd
Fixes the coverity issue:
> CID 1395794 (#1 of 1): Wrong size argument (SIZEOF_MISMATCH)
> suspicious_sizeof: Passing argument &ch of type int * and
> argument 1UL to function read is suspicious because sizeof
> (int) /*4*/ is expected.
Patrick Donnelly [Tue, 21 Nov 2017 21:49:24 +0000 (13:49 -0800)]
Merge PR #17678 into master
* refs/pull/17678/head:
mon/AuthMonitor: improve error message
mon/OSDMonitor: disallow "all" as a key or value name
cephfs, mon/AuthMonitor, OSD/osdcap: make 'all' a synonym for '*'
vstart.sh: Create an admin user for each CephFS
mon/AuthMonitor: Allow * wildcard for filesystem name
OSD/OSDCap: Allow namespace and pool tag to be combined
OSD/OSDCap: Namespace globbing
mon/AuthMonitor: Use new osd auth caps for ceph fs authorize
OSD/auth caps: Add OSD auth caps based on pool tag
mon/FSCommands: Tag pools used for cephfs by default
mon/OSDMonitor: Add key/value arguments for pool tagging
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
amitkuma [Tue, 7 Nov 2017 18:26:02 +0000 (23:56 +0530)]
rbd: null check before pool_name use
Fixes the coverity issue:
CID 1394846 (#1 of 1): Dereference after null check (FORWARD_NULL)
15. var_deref_model: Passing null pointer pool_name to regex_match,
which dereferences it.
Kefu Chai [Tue, 21 Nov 2017 13:47:30 +0000 (21:47 +0800)]
qa/workunits: silence py warnings for ceph-disk tests
ceph-disk now prints "depreacted" warning message when it starts. but
the tests parses its stdout and stderr for a json string. so we need to
silence the warnings for the tests.
Nathan Cutler [Tue, 21 Nov 2017 10:36:02 +0000 (11:36 +0100)]
tests: ceph-disk: ignore E722 in flake8 test
Very old, and very new, versions of flake8 treat E722 as an error:
flake8 runtests: commands[0] | flake8 --ignore=H105,H405,E127 ceph_disk tests
ceph_disk/main.py:1575:9: E722 do not use bare except'
ceph_disk/main.py:1582:9: E722 do not use bare except'
ceph_disk/main.py:3252:5: E722 do not use bare except'
ceph_disk/main.py:3288:21: E722 do not use bare except'
ceph_disk/main.py:3296:17: E722 do not use bare except'
ceph_disk/main.py:4358:5: E722 do not use bare except'
tests/test_main.py:26:1: E722 do not use bare except'
ERROR: InvocationError: '/opt/j/ws/mkck/src/ceph-disk/.tox/flake8/bin/flake8 --ignore=H105,H405,E127 ceph_disk tests'
Kefu Chai [Fri, 27 Oct 2017 08:55:14 +0000 (16:55 +0800)]
common/OpTracker: refactor check_ops_in_flight()
* add a function visit_ops_in_flight() so it accepts a std::function,
which can be applied to all ops in flight. and is used to count
slow ops. the # of slow ops will be sent to mgr.
* add a function with_slow_ops_in_flight(), so we can use it to
implement command like "dump_slow_ops_in_flight". unlike the
existing feature which dumps slow ops to clog periodically, it
will dump the slow ops on demand. and backoff the warning
interval only when the slow ops are dumped.
Kefu Chai [Tue, 21 Nov 2017 07:09:22 +0000 (15:09 +0800)]
bluestore/NVMEDevice: do not deference a dangled pointer
* pass coremask_arg to the working thread by value.
after 81249ab9d, get_val<>() returns a temporary variables instead of a
reference to the variant held by config. so calling string::c_str(), and
passing the returned `const char*` to a thread is not advisable. instead
we should pass a string by value. since spdk_env_init() will copy the
settings passed in by opt. it's safe even to destruct the coremask_arg
afterward.
* use ffsll() to find the LSB. it's not a bottleneck, but it's easier
and simpler, and probably improves the readability.
* refactor the NVMEManager::try_get() method: to define the variables
when they are used for the first time.
Patrick Donnelly [Tue, 21 Nov 2017 05:48:12 +0000 (21:48 -0800)]
Merge PR #18274 into master
* refs/pull/18274/head:
mds: fold mds_revoke_cap_timeout into mds_session_timeout
client: add new delegation testcases
client: add delegation support for cephfs
common: remove data_dir_option from common_preinit and global_pre_init
Reviewed-by: Gregory Farnum <gfarnum@redhat.com> Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Patrick Donnelly [Sun, 19 Nov 2017 23:08:18 +0000 (15:08 -0800)]
client: anchor Inode while trimming caps
This prevents the Inode from being deleted until after cap trimming is
finished. In particular, this prevents remove_all_caps from being called which
screws up the traversal of caps in trim_caps.
Fixes: http://tracker.ceph.com/issues/22157 Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
Ilya Dryomov [Mon, 20 Nov 2017 15:27:20 +0000 (16:27 +0100)]
msg/simple/Pipe: resurrect support for !CEPH_FEATURE_MSG_AUTH
Revert CEPH_FEATURE_MSG_AUTH-related hunks of commit 7ba4d5324e2d
("msg/simple/Pipe: remove legacy feature case handle"), which
removed code that handled !CEPH_FEATURE_MSG_AUTH footers. It's needed
for kernels prior to 3.19, where cephx signatures aren't supported.
Ilya Dryomov [Mon, 20 Nov 2017 15:23:15 +0000 (16:23 +0100)]
msg/async/AsyncConnection: resurrect support for !CEPH_FEATURE_MSG_AUTH
Revert CEPH_FEATURE_MSG_AUTH-related hunks of commit 83f7e392a163
("msg/async/AsyncConnection: remove legacy feature case handle"), which
removed code that handled !CEPH_FEATURE_MSG_AUTH footers. It's needed
for kernels prior to 3.19, where cephx signatures aren't supported.
amitkuma [Wed, 8 Nov 2017 18:32:39 +0000 (00:02 +0530)]
libceph: Avoiding divide by zero
Fixes the coverity issue:
CID 1405270 (#1 of 1): Division or modulo by zero (DIVIDE_BY_ZERO)
2. divide_by_zero: In function call ll_get_stripe_osd,
division by expression l.stripe_count which may be zero has
undefined behavior.