Commit Graph

78755 Commits

Author SHA1 Message Date
Kefu Chai
cea9f1e3da 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>
2017-09-16 10:47:02 +08:00
Kefu Chai
de1cc425be 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>
2017-09-16 10:47:02 +08:00
Kefu Chai
767df416da test/encoding/readable.sh: use sysctl -n hw.ncpu instead of nproc on osx also
Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-09-16 10:43:32 +08:00
Kefu Chai
5980a60ab3 cmake: check for fdatasync() on non osx
on osx, fdatasync() is a syscall without userspace wrapper.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-09-16 10:43:32 +08:00
Kefu Chai
6f6e3af01f mds: use the best-effort if procfs is not available
Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-09-16 10:43:32 +08:00
Kefu Chai
0a35e18b14 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>
2017-09-16 10:43:32 +08:00
Kefu Chai
629ad1986d 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>
2017-09-16 10:43:32 +08:00
Kefu Chai
02067e7451 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>
2017-09-16 10:43:32 +08:00
Kefu Chai
56a897449b 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>
2017-09-16 10:43:32 +08:00
Kefu Chai
3eff8a65c7 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>
2017-09-16 10:43:32 +08:00
Kefu Chai
cf778097d6 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>
2017-09-16 10:43:32 +08:00
Kefu Chai
a921f0663c cmake: do not pass --exclude-libs on osx
it is not supported by osx linker

Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-09-16 10:43:32 +08:00
Kefu Chai
5b0ad9a8a8 crc32c: only add qualifiers for elf64 format
they are not understood by non-elf formats

Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-09-16 10:43:32 +08:00
Kefu Chai
b7fbe46d55 cmake: compile Mach-O format instead of ELF on OSX
Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-09-16 10:43:32 +08:00
Kefu Chai
d709772240 cmake: link against libresolv on OSX
Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-09-16 10:43:32 +08:00
Kefu Chai
8857a3019a 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>
2017-09-16 10:43:32 +08:00
Kefu Chai
6688768399 cmake: remove unnecessary linkage of librt
Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-09-16 10:43:32 +08:00
Kefu Chai
21e90b94ab cmake: do not link against librt on osx
as osx does not offer librt

Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-09-16 10:43:32 +08:00
Kefu Chai
4c9085b3d8 common/util: port collect_sys_info() to osx
Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-09-16 10:43:32 +08:00
Kefu Chai
fbee315949 msg/simple: port to osx
Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-09-16 10:43:32 +08:00
Kefu Chai
d7e2e727fd common/fd: port dump_open_fds() to osx
Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-09-16 10:43:32 +08:00
Kefu Chai
f409063bc0 cmake: move MemoryModel.cc to $mds_srcs
as it is only used by mds.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-09-16 10:43:32 +08:00
Kefu Chai
0b922b681b global/signal_handler: port get_name_by_pid() to osx
Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-09-16 10:43:32 +08:00
Kefu Chai
bb4466ebe8 cmake: check for osx using APPLE not DARWIN
Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-09-16 10:43:32 +08:00
Kefu Chai
3475735e8a os,common: check __APPLE__ for osx not DARWIN
Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-09-16 10:43:32 +08:00
Kefu Chai
4b03dd309e common/io_priority: include <errno.h> on osx
Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-09-16 10:43:32 +08:00
Kefu Chai
4cb467ece5 cmake: s/-Wl,-export-dynamic/$CMAKE_EXE_EXPORTS_C_FLAG/
* s/-Wl,-export-dynamic/$CMAKE_EXE_EXPORTS_C_FLAG/
  this address the issue on osx:

    ld: unknown option: --export-dynamic

  because ld on osx does not support `-export-dynamic`, it supports
  `-export_dynamic` though.

  CMAKE_EXE_EXPORTS_C_FLAG is set to -Wl,-export-dynamic on FreeBSD
  and GNU/Linux.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-09-16 10:43:32 +08:00
Kefu Chai
dcace330e1 Merge pull request #17718 from kungf/scrub_loadavg
osd: get loadavg per cpu for scrub load threshold check

Reviewed-by: Sage Weil <sage@redhat.com>
2017-09-16 09:56:13 +08:00
Kefu Chai
c1ba1435cb Merge pull request #17704 from liewegas/wip-osd-deq
osd: minor optimizations for op wq

Reviewed-by: J. Eric Ivancich <ivancich@redhat.com>
2017-09-16 09:55:34 +08:00
Kefu Chai
23701b29db Merge pull request #17666 from david-z/wip-objectore-tool
tools/ceph-objectstore-tool: split filestore directories offline to target hash level

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2017-09-16 09:54:06 +08:00
Kefu Chai
ffcd5813e5 Merge pull request #17748 from tchaikov/wip-mon-constness
mon: more constness

Reviewed-by: Joao Eduardo Luis <joao@suse.de>
Reviewed-by: Jos Collin <jcollin@redhat.com>
2017-09-16 09:53:33 +08:00
Kefu Chai
8d04006c6a Merge pull request #17727 from tchaikov/wip-pybind-cleanup
pybind: remove unused get_ceph_version()

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2017-09-16 09:52:03 +08:00
Kefu Chai
31441a0e87 Merge pull request #17749 from tchaikov/wip-vstart
vstart.sh: simplify the objectstore related logic

Reviewed-by: xie xingguo <xie.xingguo@zte.com.cn>
Reviewed-by: Dongsheng Yang <dongsheng.yang@easystack.cn>
2017-09-16 09:51:18 +08:00
Kefu Chai
91d7b9997f Merge pull request #17418 from Songweibin/wip-osdmap-full-try
rados: support python API of "set_osdmap_full_try"

Reviewed-by: Pan Liu <wanjun.lp@alibaba-inc.com>
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2017-09-16 09:50:17 +08:00
Kefu Chai
19a3e38987 Merge pull request #17295 from david-z/wip-compress-scrub-warning
mon: Compress the warnings of pgs not scrubbed or deep-scrubbed

Reviewed-by: Sage Weil <sage@redhat.com>
2017-09-16 09:48:06 +08:00
Jos Collin
cfe6c7a13f Merge pull request #17732 from Songweibin/wip-fix-comments
doc,os,osdc: drop and modify comments

Reviewed-by: Jos Collin <jcollin@redhat.com>
2017-09-16 01:04:57 +00:00
xie xingguo
3019126037 os/bluestore: propagate read-EIO for aio
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2017-09-16 08:42:06 +08:00
Sage Weil
5ba5ad000b Merge pull request #17675 from theanalyst/doc-rgw-reshard
doc: rgw: add a note for resharding in 12.2.1 docs
2017-09-15 16:25:34 -05:00
Abhishek Lekshmanan
aeddbc5201 doc: rgw: add a note for resharding in 12.2.1 docs
Since we're now enabling dynamic resharding, mention  this in release
notes

Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
2017-09-15 23:20:27 +02:00
Patrick Donnelly
3c727d9a36
Merge PR #17701 into master
* refs/remotes/upstream/pull/17701/head:
	qa/cephfs: Fix error in test_filtered_df

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2017-09-15 14:12:35 -07:00
Patrick Donnelly
8a54e101e5
Merge PR #17694 into master
* refs/remotes/upstream/pull/17694/head:
	qa/cephfs: kill mount if it gets evicted by mds
	qa/cephfs: fix test_evict_client

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2017-09-15 14:12:33 -07:00
Patrick Donnelly
4e4ac47818
Merge PR #17681 into master
* refs/remotes/upstream/pull/17681/head:
	mon: remove mdsmap-derived perf counters

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2017-09-15 14:12:31 -07:00
Patrick Donnelly
064f1dfc3c
Merge PR #17676 into master
* refs/remotes/upstream/pull/17676/head:
	qa/tasks/cephfs: Whitelist POOL_APP_NOT_ENABLED for test_misc

Reviewed-by: John Spray <john.spray@redhat.com>
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2017-09-15 14:12:29 -07:00
Patrick Donnelly
71b571b2e9
Merge PR #17671 into master
* refs/remotes/upstream/pull/17671/head:
	messages: Initilization of left memebers

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Sage Weil <sage@redhat.com>
2017-09-15 14:12:27 -07:00
Patrick Donnelly
a7273f051c
Merge PR #17670 into master
* refs/remotes/upstream/pull/17670/head:
	messages: Initialization of member variables

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Sage Weil <sage@redhat.com>
2017-09-15 14:12:25 -07:00
Patrick Donnelly
8a816946a4
Merge PR #17652 into master
* refs/remotes/upstream/pull/17652/head:
	client: use unsigned trim_caps count

Reviewed-by: Zheng Yan <zyan@redhat.com>
Reviewed-by: Amit Kumar <amitkuma@redhat.com>
2017-09-15 14:12:23 -07:00
Patrick Donnelly
1551b54f95
Merge PR #17598 into master
* refs/remotes/upstream/pull/17598/head:
	messages: Initialization of members MMDSCacheRejion

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Sage Weil <sage@redhat.com>
2017-09-15 14:12:22 -07:00
Patrick Donnelly
38ff1cacd2
Merge PR #17595 into master
* refs/remotes/upstream/pull/17595/head:
	ceph-fuse: should free array using "delete[]"

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Jeff Layton <jlayton@redhat.com>
2017-09-15 14:12:20 -07:00
Patrick Donnelly
c718d06790
githubmap: update contributors
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2017-09-15 14:12:19 -07:00
Patrick Donnelly
ad07135fdf
Merge PR #17542 into master
* refs/remotes/upstream/pull/17542/head:
	client: Delete onsafe

Reviewed-by: Gregory Farnum <gfarnum@redhat.com>
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2017-09-15 14:12:04 -07:00