]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
7 years agoqa/suites/rados/singleton/all/recovery-preemption: add test 17839/head
Sage Weil [Wed, 27 Sep 2017 21:42:07 +0000 (17:42 -0400)]
qa/suites/rados/singleton/all/recovery-preemption: add test

This mirrors what I was testing locally.

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agoosd/PG: handle racy preemption
Sage Weil [Thu, 21 Sep 2017 16:37:13 +0000 (12:37 -0400)]
osd/PG: handle racy preemption

If we finish recovery/backfill and go active, but also get
preempted at the same time, we can ignore the event.

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agoosd/PG: allow local recovery reservations to be preempted
Sage Weil [Tue, 19 Sep 2017 20:26:40 +0000 (15:26 -0500)]
osd/PG: allow local recovery reservations to be preempted

If a PG has a higher recovery priority and a lower-priority item is in
progress, allow it to be preempted.  This triggers the RecoveryCancel
or BackfillCancel event with a 0 delay, which means it will immediately
re-request a reservation (and presumably wait).

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agocommon/AsyncReserver: support preemption
Sage Weil [Tue, 19 Sep 2017 20:25:05 +0000 (15:25 -0500)]
common/AsyncReserver: support preemption

If an (optional) preemption context is provided, use that to preempt
and existing reservation and grant a higher-priority one.

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agocommon/AsyncReserver: get a cct
Sage Weil [Thu, 21 Sep 2017 16:37:49 +0000 (12:37 -0400)]
common/AsyncReserver: get a cct

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agoosd: PG_STATE_BACKFILL -> PG_STATE_BACKFILLING
Sage Weil [Thu, 21 Sep 2017 14:30:57 +0000 (10:30 -0400)]
osd: PG_STATE_BACKFILL -> PG_STATE_BACKFILLING

Match user-facing string

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agoosd/osd_types: make BACKFILL <-> "backfilling" for parser
Sage Weil [Thu, 21 Sep 2017 14:28:59 +0000 (10:28 -0400)]
osd/osd_types: make BACKFILL <-> "backfilling" for parser

We render BACKFILL as "backfilling"; make sure parse works that
way too.

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agoosd/osd_types: remove weird BACKFILL state hack
Sage Weil [Thu, 21 Sep 2017 14:28:08 +0000 (10:28 -0400)]
osd/osd_types: remove weird BACKFILL state hack

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agoosd/PG: Cancel{Recovery,Backfill} -> Defer{Recovery,Backfill}
Sage Weil [Tue, 19 Sep 2017 20:47:23 +0000 (15:47 -0500)]
osd/PG: Cancel{Recovery,Backfill} -> Defer{Recovery,Backfill}

"Defer" is more accurate here; we aren't canceling anything, just
rescheduling the work.

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agoosd/PG: specify delay in Cancel{Recovery,Backfill}
Sage Weil [Tue, 19 Sep 2017 19:53:31 +0000 (14:53 -0500)]
osd/PG: specify delay in Cancel{Recovery,Backfill}

For now it is always the retry interval, but later perhaps not!

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agoosd/PG: make some trivial events TrivialEvent
Sage Weil [Tue, 19 Sep 2017 19:49:05 +0000 (14:49 -0500)]
osd/PG: make some trivial events TrivialEvent

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agoosd/PG: set {backfill,recovery}_wait when canceling backfill/recovery
Sage Weil [Tue, 19 Sep 2017 19:44:50 +0000 (14:44 -0500)]
osd/PG: set {backfill,recovery}_wait when canceling backfill/recovery

The only caller currently is when we get as far as we can with backfill
or recovery but still have unfound objects.  In this case, go back into
the *_wait state instead of appearing as though we are still doing
something.

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agoMerge pull request #17747 from tchaikov/wip-qa
Kefu Chai [Wed, 20 Sep 2017 15:08:47 +0000 (23:08 +0800)]
Merge pull request #17747 from tchaikov/wip-qa

qa/standalone: respect $TEMPDIR

Reviewed-by: David Zafman <dzafman@redhat.com>
7 years agoMerge pull request #17828 from jdurgin/wip-21428
Josh Durgin [Wed, 20 Sep 2017 15:07:56 +0000 (08:07 -0700)]
Merge pull request #17828 from jdurgin/wip-21428

osd/PrimaryLogPG: request osdmap update in the right block

Reviewed-by: Sage Weil <sage@redhat.com>
7 years agoosd/PrimaryLogPG: request osdmap update in the right block 17828/head
Josh Durgin [Wed, 20 Sep 2017 05:18:35 +0000 (01:18 -0400)]
osd/PrimaryLogPG: request osdmap update in the right block

Fixes: http://tracker.ceph.com/issues/21428
Signed-off-by: Josh Durgin <jdurgin@redhat.com>
7 years agoMerge pull request #17785 from dzafman/wip-add-repair
Kefu Chai [Wed, 20 Sep 2017 04:35:16 +0000 (12:35 +0800)]
Merge pull request #17785 from dzafman/wip-add-repair

test: Fix ceph-objectstore-tool usage check

Reviewed-by: Kefu Chai <kchai@redhat.com>
7 years agoMerge pull request #17138 from Liuchang0812/wip-updata-osd-hostname-in-metaupdater
Kefu Chai [Wed, 20 Sep 2017 03:22:49 +0000 (11:22 +0800)]
Merge pull request #17138 from Liuchang0812/wip-updata-osd-hostname-in-metaupdater

mgr: preventing blank hostname in DaemonState

Reviewed-by: John Spray <john.spray@redhat.com>
7 years agoMerge pull request #17738 from jtlayton/wip-jlayton-20988
Kefu Chai [Wed, 20 Sep 2017 03:11:02 +0000 (11:11 +0800)]
Merge pull request #17738 from jtlayton/wip-jlayton-20988

common: lockdep fixes

Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Adam Emerson <aemerson@redhat.com>
Reviewed-by: John Spray <john.spray@redhat.com>
7 years agoMerge pull request #17753 from tchaikov/wip-osd-cleanup
Kefu Chai [Wed, 20 Sep 2017 03:06:45 +0000 (11:06 +0800)]
Merge pull request #17753 from tchaikov/wip-osd-cleanup

osd: cleanups

Reviewed-by: xie xingguo <xie.xingguo@zte.com.cn>
7 years agoMerge pull request #17787 from tchaikov/wip-os-release-wo-version_id
Kefu Chai [Wed, 20 Sep 2017 03:02:00 +0000 (11:02 +0800)]
Merge pull request #17787 from tchaikov/wip-os-release-wo-version_id

common/util: do not print error if VERSION_ID is missing

Reviewed-by: Brad Hubbard <bhubbard@redhat.com>
7 years agoMerge pull request #17788 from tchaikov/wip-cmake-rocksdb-tcmalloc
Kefu Chai [Wed, 20 Sep 2017 02:30:37 +0000 (10:30 +0800)]
Merge pull request #17788 from tchaikov/wip-cmake-rocksdb-tcmalloc

cmake: identify the possible incompatibility of rocksdb and tcmalloc

Reviewed-by: Brad Hubbard <bhubbard@redhat.com>
7 years agocmake: error out if rocksdb is incompatible w/ tcmalloc 17788/head
Kefu Chai [Tue, 19 Sep 2017 04:23:44 +0000 (12:23 +0800)]
cmake: error out if rocksdb is incompatible w/ tcmalloc

the commit d406f228 in gperf implements a c11 feature used by a
recent change in rocksdb: 16e03882, which uses aligned_alloc().
and 16e03882 in rocksdb was merged after v5.7 was tagged, while
16e03882 in gperf was merged after v2.6.1 was tagged.

because aligned_alloc() is not implemented by tcmalloc until the
not-yet-released 2.6.2, if we call aligned_alloc() in an application
linked against tcmalloc, what gets called will be the glibc's
aligned_alloc(). but if we free() the memory chunk allocated by
aligned_alloc(), the tcmalloc's implementation kicks in, then
InvalidFree() is called, because the memory chunk being freed was
allocated by tcmalloc. in short, "mixing allocators", quote from
Dan Mick.

in rocksdb, aligned_alloc() is used if _ISOC11_SOURCE is defined, this
makes sense, because aligned_alloc() is a C11 function. we could avoid
using it by not defining _ISOC11_SOURCE. but as long as _GNU_SOURCE is
defined, glibc defines _ISOC11_SOURCE. and libstdc++ requires
_GNU_SOURCE, because it uses a fair amount of GNU extensions.

Fixes: http://tracker.ceph.com/issues/21422
Signed-off-by: Kefu Chai <kchai@redhat.com>
7 years agoMerge pull request #17795 from jdurgin/wip-21428
Josh Durgin [Tue, 19 Sep 2017 23:43:24 +0000 (16:43 -0700)]
Merge pull request #17795 from jdurgin/wip-21428

osd: request new map from PG when needed

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
Reviewed-by: Sage Weil <sage@redhat.com>
7 years agoosd: request new map from PG when needed 17795/head
Josh Durgin [Tue, 19 Sep 2017 02:31:10 +0000 (22:31 -0400)]
osd: request new map from PG when needed

The fast dispatch refactor in 3cc48278bf0ee5c9535d04b60a661f988c50063b
eliminated the osdmap subscription in the ms_fast_dispatch path, which
meant ops could reach a PG without having the latest map. In a cluster
with few osdmap updates, where the monitor fails to send a new map to
an osd (it tries one random osd), this can result in indefinitely
blocked requests.

Fix this by adding an OSDService mechanism for scheduling a new osdmap
subscription request.

Fixes: http://tracker.ceph.com/issues/21428
Signed-off-by: Josh Durgin <jdurgin@redhat.com>
7 years agoMerge pull request #17607 from liewegas/wip-post-luminous-more-mon
Sage Weil [Tue, 19 Sep 2017 18:19:06 +0000 (13:19 -0500)]
Merge pull request #17607 from liewegas/wip-post-luminous-more-mon

mon: post-luminous cleanup (part 3 of ?)

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
7 years agoMerge pull request #16913 from liewegas/wip-20944
Sage Weil [Tue, 19 Sep 2017 18:00:33 +0000 (13:00 -0500)]
Merge pull request #16913 from liewegas/wip-20944

os/filestore: fix device/partition metadata detection

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
7 years agoMerge pull request #17427 from liewegas/wip-pg-num-limits
Sage Weil [Tue, 19 Sep 2017 17:57:10 +0000 (12:57 -0500)]
Merge pull request #17427 from liewegas/wip-pg-num-limits

mon/OSDMonitor: implement cluster pg limit

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
7 years agoMerge pull request #17760 from liewegas/wip-21410-b
Sage Weil [Tue, 19 Sep 2017 17:31:44 +0000 (12:31 -0500)]
Merge pull request #17760 from liewegas/wip-21410-b

Revert "osd/OSDMap: allow bidirectional swap of pg-upmap-items"

Reviewed-by: xie xingguo <xie.xingguo@zte.com.cn>
7 years agoMerge pull request #15369 from rzarzynski/wip-rgw-custom-errmsgs-2
Matt Benjamin [Tue, 19 Sep 2017 16:09:38 +0000 (12:09 -0400)]
Merge pull request #15369 from rzarzynski/wip-rgw-custom-errmsgs-2

rgw: improve handling of Swift's error messages and limits

7 years agoMerge pull request #12704 from rzarzynski/wip-rgw-per-storage-policy-stats
Matt Benjamin [Tue, 19 Sep 2017 16:04:28 +0000 (12:04 -0400)]
Merge pull request #12704 from rzarzynski/wip-rgw-per-storage-policy-stats

rgw: add support for Swift's per storage policy statistics

7 years agoMerge pull request #17786 from neha-ojha/wip-cbt-teuthology-integration-cntd
Josh Durgin [Tue, 19 Sep 2017 15:35:10 +0000 (08:35 -0700)]
Merge pull request #17786 from neha-ojha/wip-cbt-teuthology-integration-cntd

qa/suites/rados/perf: add optimized settings

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
7 years agorgw: rename the configurables for metadata limits to start with rgw_. 15369/head
Radoslaw Zarzynski [Tue, 19 Sep 2017 12:46:53 +0000 (14:46 +0200)]
rgw: rename the configurables for metadata limits to start with rgw_.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
7 years agorgw: calculate and print Swift's X-Account-Storage-Policy-* headers. 12704/head
Radoslaw Zarzynski [Wed, 28 Dec 2016 18:22:32 +0000 (19:22 +0100)]
rgw: calculate and print Swift's X-Account-Storage-Policy-* headers.

Fixes: http://tracker.ceph.com/issues/17932
Signed-off-by: Radoslaw Zarzynski <rzarzynski@mirantis.com>
7 years agorgw: bucket linking stores also the info about a placement rule.
Radoslaw Zarzynski [Wed, 28 Dec 2016 16:14:35 +0000 (17:14 +0100)]
rgw: bucket linking stores also the info about a placement rule.

Fixes: http://tracker.ceph.com/issues/17932
Signed-off-by: Radoslaw Zarzynski <rzarzynski@mirantis.com>
7 years agorgw: convey placement rule in RGWBucketEnt and cls_user_bucket_entry.
Radoslaw Zarzynski [Wed, 28 Dec 2016 16:12:50 +0000 (17:12 +0100)]
rgw: convey placement rule in RGWBucketEnt and cls_user_bucket_entry.

Fixes: http://tracker.ceph.com/issues/17932
Signed-off-by: Radoslaw Zarzynski <rzarzynski@mirantis.com>
7 years agorgw: clean-up around and implement the move semantics in RGWBucketEnt.
Radoslaw Zarzynski [Wed, 28 Dec 2016 14:54:42 +0000 (15:54 +0100)]
rgw: clean-up around and implement the move semantics in RGWBucketEnt.

Signed-off-by: Radoslaw Zarzynski <rzarzynski@mirantis.com>
Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
7 years agoMerge pull request #17508 from liewegas/wip-crushrule-convert
Kefu Chai [Tue, 19 Sep 2017 10:18:55 +0000 (18:18 +0800)]
Merge pull request #17508 from liewegas/wip-crushrule-convert

mon: more aggressively convert crush rulesets -> distinct rules

Reviewed-by: Kefu Chai <kchai@redhat.com>
7 years agoMerge pull request #17802 from ygtzf/option-default-value-error
Kefu Chai [Tue, 19 Sep 2017 09:18:08 +0000 (17:18 +0800)]
Merge pull request #17802 from ygtzf/option-default-value-error

doc: update default value of option mon_sync_timeout

Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Amit Kumar <amitkuma@redhat.com>
7 years agodoc: update default value of option mon_sync_timeout 17802/head
Yao Guotao [Tue, 19 Sep 2017 08:47:00 +0000 (04:47 -0400)]
doc: update default value of option mon_sync_timeout

Signed-off-by: Yao Guotao <yaoguot@gmail.com>
7 years agocmake: requires rockdb version 5.8
Kefu Chai [Tue, 19 Sep 2017 05:36:31 +0000 (13:36 +0800)]
cmake: requires rockdb version 5.8

we've updated the rockdb wrapper on ceph side to be compatible with
the latest version of rocksdb upstream. so ceph is not compatible with
older version of rocksdb.

Signed-off-by: Kefu Chai <kchai@redhat.com>
7 years agocmake: detect rocksdb's version
Kefu Chai [Tue, 19 Sep 2017 05:07:59 +0000 (13:07 +0800)]
cmake: detect rocksdb's version

Signed-off-by: Kefu Chai <kchai@redhat.com>
7 years agocmake: detect gperf-tools' version
Kefu Chai [Tue, 19 Sep 2017 04:23:13 +0000 (12:23 +0800)]
cmake: detect gperf-tools' version

Signed-off-by: Kefu Chai <kchai@redhat.com>
7 years agocmake: extract BuildRocksDB into BuildRocksDB.cmake
Kefu Chai [Tue, 19 Sep 2017 03:56:15 +0000 (11:56 +0800)]
cmake: extract BuildRocksDB into BuildRocksDB.cmake

Signed-off-by: Kefu Chai <kchai@redhat.com>
7 years agocmake: enable find_package(perftools) to check non-default dir
Kefu Chai [Tue, 19 Sep 2017 03:55:16 +0000 (11:55 +0800)]
cmake: enable find_package(perftools) to check non-default dir

so it checks $ENV{GPERF_ROOT} first.

Signed-off-by: Kefu Chai <kchai@redhat.com>
7 years agoqa/suites/rados/perf: add optimized settings 17786/head
Neha Ojha [Mon, 18 Sep 2017 22:53:28 +0000 (15:53 -0700)]
qa/suites/rados/perf: add optimized settings

Signed-off-by: Neha Ojha <nojha@redhat.com>
7 years agotest: Fix ceph-objectstore-tool usage check 17785/head
David Zafman [Mon, 18 Sep 2017 21:07:09 +0000 (14:07 -0700)]
test: Fix ceph-objectstore-tool usage check

Caused by: c7b7a1f04f78fa62890c567d0ca53874c8d75eb7

Signed-off-by: David Zafman <dzafman@redhat.com>
7 years agoMerge pull request #15273 from rzarzynski/wip-rgw-18977
Matt Benjamin [Mon, 18 Sep 2017 20:10:08 +0000 (16:10 -0400)]
Merge pull request #15273 from rzarzynski/wip-rgw-18977

rgw: list_objects() honors end_marker regardless of namespace.

7 years agoMerge pull request #17320 from rzarzynski/wip-rgw-21148
Matt Benjamin [Mon, 18 Sep 2017 19:51:43 +0000 (15:51 -0400)]
Merge pull request #17320 from rzarzynski/wip-rgw-21148

rgw: add support for Swift's reversed account listings

7 years agoMerge pull request #17777 from cbodley/wip-qa-hadoop
Yuri Weinstein [Mon, 18 Sep 2017 19:32:14 +0000 (12:32 -0700)]
Merge pull request #17777 from cbodley/wip-qa-hadoop

qa/rgw: hadoop-s3a suite targets centos_latest

Reviewed-by: Yuri Weinstein <yweins@redhat.com>
7 years agoqa/rgw: hadoop suite targets centos_latest 17777/head
Casey Bodley [Mon, 18 Sep 2017 17:29:40 +0000 (13:29 -0400)]
qa/rgw: hadoop suite targets centos_latest

Signed-off-by: Casey Bodley <cbodley@redhat.com>
7 years agoqa/rgw: use overrides for hadoop version
Casey Bodley [Mon, 18 Sep 2017 17:28:22 +0000 (13:28 -0400)]
qa/rgw: use overrides for hadoop version

instead of having two separate tasks, add v27.yaml and v28.yaml with
overrides for hadoop_version

Signed-off-by: Casey Bodley <cbodley@redhat.com>
7 years agoMerge pull request #17776 from smithfarm/wip-rh-74
Yuri Weinstein [Mon, 18 Sep 2017 17:17:15 +0000 (10:17 -0700)]
Merge pull request #17776 from smithfarm/wip-rh-74

tests: CentOS 7.4 is now the latest

Reviewed-by: Yuri Weinstein <yweins@redhat.com>
7 years agotests: CentOS 7.4 is now the latest 17776/head
Nathan Cutler [Mon, 18 Sep 2017 16:01:17 +0000 (18:01 +0200)]
tests: CentOS 7.4 is now the latest

Signed-off-by: Nathan Cutler <ncutler@suse.com>
7 years agoMerge pull request #17372 from ceph/wip-doc-cephfs-pools
John Spray [Mon, 18 Sep 2017 10:37:28 +0000 (11:37 +0100)]
Merge pull request #17372 from ceph/wip-doc-cephfs-pools

doc: add example of setting pool in cephfs layout

Reviewed-by: Alfredo Deza <adeza@redhat.com>
7 years agoMerge pull request #17318 from jcsp/wip-20899
John Spray [Mon, 18 Sep 2017 10:35:59 +0000 (11:35 +0100)]
Merge pull request #17318 from jcsp/wip-20899

mgr/prometheus: Fix for MDS metrics

Reviewed-by: John Spray <john.spray@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
7 years agoMerge pull request #16762 from jcsp/wip-dashboard-trim
John Spray [Mon, 18 Sep 2017 10:34:18 +0000 (11:34 +0100)]
Merge pull request #16762 from jcsp/wip-dashboard-trim

mgr: remove unused static files from dashboard module

Reviewed-by: Sage Weil <sage@redhat.com>
7 years agomgr/dashboard: re-arrange static files 16762/head
John Spray [Mon, 18 Sep 2017 10:13:45 +0000 (06:13 -0400)]
mgr/dashboard: re-arrange static files

Signed-off-by: John Spray <john.spray@redhat.com>
7 years agomgr/dashboard: don't include remote js/css
John Spray [Mon, 18 Sep 2017 10:10:31 +0000 (06:10 -0400)]
mgr/dashboard: don't include remote js/css

This will help anyone running away from the internet.

Signed-off-by: John Spray <john.spray@redhat.com>
7 years agomgr/dashboard: remove un-minified datatables source
John Spray [Wed, 2 Aug 2017 14:54:17 +0000 (15:54 +0100)]
mgr/dashboard: remove un-minified datatables source

Signed-off-by: John Spray <john.spray@redhat.com>
7 years agomgr/dashboard: remove non-minified bootstrap
John Spray [Wed, 2 Aug 2017 14:15:04 +0000 (15:15 +0100)]
mgr/dashboard: remove non-minified bootstrap

Signed-off-by: John Spray <john.spray@redhat.com>
7 years agomgr/dashboard: remove unneeded bits of AdminLTE
John Spray [Wed, 2 Aug 2017 14:11:07 +0000 (15:11 +0100)]
mgr/dashboard: remove unneeded bits of AdminLTE

AdminLTE is delivered in a handy all-in format,
but we don't need all this stuff at runtime.

Signed-off-by: John Spray <john.spray@redhat.com>
7 years agocommon/util: do not print error if VERSION_ID is missing 17787/head
Kefu Chai [Mon, 18 Sep 2017 04:57:29 +0000 (12:57 +0800)]
common/util: do not print error if VERSION_ID is missing

per os-release(5), VERSION_ID is optional.

Signed-off-by: Kefu Chai <kchai@redhat.com>
7 years agoMerge pull request #17737 from ivancich/wip-pull-updated-dmclock
Kefu Chai [Sun, 17 Sep 2017 11:42:52 +0000 (19:42 +0800)]
Merge pull request #17737 from ivancich/wip-pull-updated-dmclock

osd: update dmclock library w git subtree pull

Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Jos Collin <jcollin@redhat.com>
7 years agoMerge pull request #17762 from yaozongyou/fix-typo-in-php-rst
Kefu Chai [Sat, 16 Sep 2017 18:00:50 +0000 (02:00 +0800)]
Merge pull request #17762 from yaozongyou/fix-typo-in-php-rst

doc: fix typo in php.rst

Reviewed-by: Kefu Chai <kchai@redhat.com>
7 years agoMerge pull request #17763 from xiexingguo/wip-21409
Sage Weil [Sat, 16 Sep 2017 17:59:12 +0000 (12:59 -0500)]
Merge pull request #17763 from xiexingguo/wip-21409

qa: fix pool-quota related tests

Reviewed-by: Sage Weil <sage@redhat.com>
7 years agoclient: test shutdown race 17738/head
Jeff Layton [Thu, 14 Sep 2017 13:28:33 +0000 (09:28 -0400)]
client: test shutdown race

Spawn threads that bring up a bunch of ceph_mounts with individual
CephContext objects, and then tear them down in parallel.

Tracker: http://tracker.ceph.com/issues/20988
Signed-off-by: Jeff Layton <jlayton@redhat.com>
7 years agolockdep: fix Mutex tests to disable lockdep properly
Jeff Layton [Thu, 14 Sep 2017 13:28:34 +0000 (09:28 -0400)]
lockdep: fix Mutex tests to disable lockdep properly

...and make g_lockdep a bool.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
7 years agolockdep: fix races with concurrent lockdep teardown
Jeff Layton [Thu, 14 Sep 2017 13:28:34 +0000 (09:28 -0400)]
lockdep: fix races with concurrent lockdep teardown

If the cct is unregistered while other threads are flogging mutexes,
then we can hit all sorts of bugs. Ensure that we handle that
situation sanely, by checking that g_lockdep is still set after
we take the lockdep_mutex.

Also, remove an assertion from lockdep_unregister, and just turn it into
an immediate return. It's possible to have a call to
lockdep_unregister_ceph_context, and then a call to
lockdep_register_ceph_context while a mutex is being held by another
task.

In that case, it's possible the lock does not exist in the map
when we go to unregister it. That's not a bug though, just a natural
consequence of that series of actions.

Tracker: http://tracker.ceph.com/issues/20988
Signed-off-by: Jeff Layton <jlayton@redhat.com>
7 years agolockdep: don't take lockdep_mutex twice for new lock registrations
Jeff Layton [Thu, 14 Sep 2017 13:28:34 +0000 (09:28 -0400)]
lockdep: don't take lockdep_mutex twice for new lock registrations

We can do it under the same mutex, which should be more efficient.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
7 years agoclient: fix signed/unsigned comparison compiler warning
Jeff Layton [Thu, 14 Sep 2017 16:22:52 +0000 (12:22 -0400)]
client: fix signed/unsigned comparison compiler warning

The build says:

src/client/Client.cc: In member function ‘void Client::trim_caps(MetaSession*, int)’:
src/client/Client.cc:4121:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   if (s->caps.size() > max)
       ~~~~~~~~~~~~~~~^~~~~

Signed-off-by: Jeff Layton <jlayton@redhat.com>
7 years agodoc: fix typo in php.rst 17762/head
Yao Zongyou [Sat, 16 Sep 2017 05:54:03 +0000 (13:54 +0800)]
doc: fix typo in php.rst

Signed-off-by: Yao Zongyou <yaozongyou@vip.qq.com>
7 years agoqa: fix pool-quota related tests 17763/head
xie xingguo [Sat, 16 Sep 2017 02:04:56 +0000 (10:04 +0800)]
qa: fix pool-quota related tests

https://github.com/ceph/ceph/pull/17371 introduces support of
per-pool space-full flag, which turns out to set both
full and full_no_quota flags now if a pool is currently running out
of quota.

Actually this test is fragile as long as we keep appending new flags
at pool granularity, but let's not bother with that complexity now.

Fixes: http://tracker.ceph.com/issues/21409
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
7 years agoMerge pull request #17615 from tchaikov/wip-osx
Kefu Chai [Sat, 16 Sep 2017 05:30:26 +0000 (13:30 +0800)]
Merge pull request #17615 from tchaikov/wip-osx

cmake,common: changes to port part of ceph to osx

Reviewed-by: Willem Jan Withagen <wjw@digiware.nl>
7 years agoclient: use st_mtimespec instea of st_mtime on osx 17615/head
Kefu Chai [Wed, 13 Sep 2017 09:44:35 +0000 (17:44 +0800)]
client: use st_mtimespec instea of st_mtime on osx

Signed-off-by: Kefu Chai <kchai@redhat.com>
7 years agomsg/msg_types: fix the dencoder of entity_addr_t
Kefu Chai [Wed, 13 Sep 2017 09:21:38 +0000 (17:21 +0800)]
msg/msg_types: fix the dencoder of entity_addr_t

improve the interoperability between freebsd/osx and GNU/Linux, because
the their layouts of sockaddr_storage are different, and we use the
one of linux as the wire format. so need to convert it on freebsd/osx
side.

Signed-off-by: Kefu Chai <kchai@redhat.com>
7 years agoMerge pull request #17698 from liewegas/wip-bluestore-big-allocations
Sage Weil [Sat, 16 Sep 2017 02:48:27 +0000 (21:48 -0500)]
Merge pull request #17698 from liewegas/wip-bluestore-big-allocations

os/bluestore: allocate entire write in one go

Reviewed-by: xie xingguo <xie.xingguo@zte.com.cn>
7 years agocrc32c: pass integer param by uint64_t
Kefu Chai [Wed, 13 Sep 2017 09:20:05 +0000 (17:20 +0800)]
crc32c: pass integer param by uint64_t

the assembly is expecting 64bits input, so make this explicit.

Signed-off-by: Kefu Chai <kchai@redhat.com>
7 years agocrc32c: mach-o 64 follows the same calling convention as elf64 does
Kefu Chai [Wed, 13 Sep 2017 07:28:08 +0000 (15:28 +0800)]
crc32c: mach-o 64 follows the same calling convention as elf64 does

so reuse the register-parameter/variable mappings

Signed-off-by: Kefu Chai <kchai@redhat.com>
7 years agotest/encoding/readable.sh: use sysctl -n hw.ncpu instead of nproc on osx also
Kefu Chai [Wed, 13 Sep 2017 05:09:40 +0000 (13:09 +0800)]
test/encoding/readable.sh: use sysctl -n hw.ncpu instead of nproc on osx also

Signed-off-by: Kefu Chai <kchai@redhat.com>
7 years agocmake: check for fdatasync() on non osx
Kefu Chai [Wed, 13 Sep 2017 04:17:30 +0000 (12:17 +0800)]
cmake: check for fdatasync() on non osx

on osx, fdatasync() is a syscall without userspace wrapper.

Signed-off-by: Kefu Chai <kchai@redhat.com>
7 years agomds: use the best-effort if procfs is not available
Kefu Chai [Wed, 13 Sep 2017 04:03:37 +0000 (12:03 +0800)]
mds: use the best-effort if procfs is not available

Signed-off-by: Kefu Chai <kchai@redhat.com>
7 years agocmake: allows undefined symbol in plugin on osx
Kefu Chai [Wed, 13 Sep 2017 03:40:21 +0000 (11:40 +0800)]
cmake: allows undefined symbol in plugin on osx

clang on osx erros out when linking a dynamic library if any symbols is
missing by default. so disable this behavior.

Signed-off-by: Kefu Chai <kchai@redhat.com>
7 years agocmake: disable plugins using isa-l on osx
Kefu Chai [Wed, 13 Sep 2017 03:23:21 +0000 (11:23 +0800)]
cmake: disable plugins using isa-l on osx

clang on osx emits functions with leading underscore, but the isa-l
assembly's functions have no leading underscore. we could label the
function declaration like `int foo asm("foo")` to remove the leading
underscore, but isa-l is a git submodule, let do this later. and in the
meanwhile, disable this plugin on osx.

Signed-off-by: Kefu Chai <kchai@redhat.com>
7 years agocrc32: label assembler functions without leading underscore
Kefu Chai [Wed, 13 Sep 2017 03:09:49 +0000 (11:09 +0800)]
crc32: label assembler functions without leading underscore

clang onder osx adds leading undescore to the function names to be
ABI compatible. but the assembly code does not do so. so we need to
control the name using gcc/clang extension. see
https://gcc.gnu.org/onlinedocs/gcc-4.4.0/gcc/Asm-Labels.html#Asm-Labels

Signed-off-by: Kefu Chai <kchai@redhat.com>
7 years agocompat: consolidate definitions of osx and freebsd
Kefu Chai [Sun, 10 Sep 2017 18:00:44 +0000 (02:00 +0800)]
compat: consolidate definitions of osx and freebsd

on osx, ENODATA = 96, so we need to fix it. also define
CLOCK_MONOTONIC_COARSE and CLOCK_REALTIME_COARSE for osx, ceph_time.h
defines this also, but i don't want to include compat.h in ceph_time.h
at this moment.

and silence the warning of
 #warning ENODATA already defined to a value different from 87 (ENOATRR), refining to fix
because it is fired everywhere on osx when "compat.h" is included.

Signed-off-by: Kefu Chai <kchai@redhat.com>
7 years agomsg/msg_types: fix the denc of sockaddr_storage on freebsd/osx
Kefu Chai [Sun, 10 Sep 2017 13:38:56 +0000 (21:38 +0800)]
msg/msg_types: fix the denc of sockaddr_storage on freebsd/osx

the layout of sockaddr_in and sockaddr_in6 are different on
GNU/Linux and FreeBSD/OSX:
 - on GNU/Linux, sockaddr does not have sa_len,
 - on GNU/Linux, sockaddr* use a 16 bit integer for sa_family, but
   on FreeBSD, a 32bit integer is used.
so we need to be more care when memcpy() between sockaddr_storage()
and ceph_sockaddr_storage().

Signed-off-by: Kefu Chai <kchai@redhat.com>
7 years agomsg/msg_types: consolidate sockaddr_storage dencoders
Kefu Chai [Sun, 10 Sep 2017 08:10:27 +0000 (16:10 +0800)]
msg/msg_types: consolidate sockaddr_storage dencoders

utilize ceph_sockaddr_storage on FreeBSD and osx to perform the
dencoding, to improve the readability.

Signed-off-by: Kefu Chai <kchai@redhat.com>
7 years agocmake: do not pass --exclude-libs on osx
Kefu Chai [Sun, 10 Sep 2017 04:35:46 +0000 (12:35 +0800)]
cmake: do not pass --exclude-libs on osx

it is not supported by osx linker

Signed-off-by: Kefu Chai <kchai@redhat.com>
7 years agocrc32c: only add qualifiers for elf64 format
Kefu Chai [Sat, 9 Sep 2017 18:45:24 +0000 (02:45 +0800)]
crc32c: only add qualifiers for elf64 format

they are not understood by non-elf formats

Signed-off-by: Kefu Chai <kchai@redhat.com>
7 years agocmake: compile Mach-O format instead of ELF on OSX
Kefu Chai [Sat, 9 Sep 2017 18:36:41 +0000 (02:36 +0800)]
cmake: compile Mach-O format instead of ELF on OSX

Signed-off-by: Kefu Chai <kchai@redhat.com>
7 years agocmake: link against libresolv on OSX
Kefu Chai [Sat, 9 Sep 2017 18:26:35 +0000 (02:26 +0800)]
cmake: link against libresolv on OSX

Signed-off-by: Kefu Chai <kchai@redhat.com>
7 years agotime: use mach_absolute_time() for monotonic time
Kefu Chai [Sat, 9 Sep 2017 17:19:28 +0000 (01:19 +0800)]
time: use mach_absolute_time() for monotonic time

* use mach_absolute_time() for monotonic time
  mach_absolute_time() is faster and monotonic, see
  https://developer.apple.com/library/content/qa/qa1398/_index.html

  for its implementation, see
  https://opensource.apple.com/source/xnu/xnu-3248.60.10/libsyscall/wrappers/mach_absolute_time.s

  it's using rdtsc.
* and remove unnecessary headers from ceph_time.h

Signed-off-by: Kefu Chai <kchai@redhat.com>
7 years agocmake: remove unnecessary linkage of librt
Kefu Chai [Sat, 9 Sep 2017 16:49:15 +0000 (00:49 +0800)]
cmake: remove unnecessary linkage of librt

Signed-off-by: Kefu Chai <kchai@redhat.com>
7 years agocmake: do not link against librt on osx
Kefu Chai [Sat, 9 Sep 2017 16:48:37 +0000 (00:48 +0800)]
cmake: do not link against librt on osx

as osx does not offer librt

Signed-off-by: Kefu Chai <kchai@redhat.com>
7 years agocommon/util: port collect_sys_info() to osx
Kefu Chai [Sat, 9 Sep 2017 16:15:18 +0000 (00:15 +0800)]
common/util: port collect_sys_info() to osx

Signed-off-by: Kefu Chai <kchai@redhat.com>
7 years agomsg/simple: port to osx
Kefu Chai [Sat, 9 Sep 2017 15:08:27 +0000 (23:08 +0800)]
msg/simple: port to osx

Signed-off-by: Kefu Chai <kchai@redhat.com>
7 years agocommon/fd: port dump_open_fds() to osx
Kefu Chai [Sat, 9 Sep 2017 14:45:27 +0000 (22:45 +0800)]
common/fd: port dump_open_fds() to osx

Signed-off-by: Kefu Chai <kchai@redhat.com>
7 years agocmake: move MemoryModel.cc to $mds_srcs
Kefu Chai [Sat, 9 Sep 2017 14:41:15 +0000 (22:41 +0800)]
cmake: move MemoryModel.cc to $mds_srcs

as it is only used by mds.

Signed-off-by: Kefu Chai <kchai@redhat.com>
7 years agoglobal/signal_handler: port get_name_by_pid() to osx
Kefu Chai [Sat, 9 Sep 2017 14:40:12 +0000 (22:40 +0800)]
global/signal_handler: port get_name_by_pid() to osx

Signed-off-by: Kefu Chai <kchai@redhat.com>
7 years agocmake: check for osx using `APPLE` not `DARWIN`
Kefu Chai [Sat, 9 Sep 2017 14:16:36 +0000 (22:16 +0800)]
cmake: check for osx using `APPLE` not `DARWIN`

Signed-off-by: Kefu Chai <kchai@redhat.com>