Joao Eduardo Luis
35c80951ca
Merge pull request #4896 from xinxinsh/wip-monitor-dump-transaction
...
MonitorDBStore : make monitor transaction more readable
Reviewed-by: Joao Eduardo Luis <joao@suse.de>
Reviewed-by: Sage Weil <sage@redhat.com>
2015-08-31 10:17:58 +01:00
Kefu Chai
109e5b127b
make: do not compile XFS.cc if --without-libxfs
...
Signed-off-by: Kefu Chai <kchai@redhat.com>
2015-08-31 16:00:29 +08:00
Kefu Chai
8ef07420b1
os/fs: include <sys/mount.h> on osx
...
Signed-off-by: Kefu Chai <kchai@redhat.com>
2015-08-31 16:00:29 +08:00
Yan, Zheng
491d8939bb
test_c_headers: don't use -Werror option for clang
...
When using clang to compile ceph, there are lots of warnings:
clang: warning: argument unused during compilation: '-Wp,-D_FORTIFY_SOURCE=2'
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-08-31 16:00:29 +08:00
Yan, Zheng
d36e514935
ceph: use 'sed -ie' to edit file in-place
...
On OSX, 'sed -i script' does not work, because it considers 'script'
as suffix of backup file. 'sed -ie script' works on both OSX and Linux.
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-08-31 16:00:29 +08:00
Yan, Zheng
68db9f6fda
client: fix compile error on OSX
...
On OSX, type of the 3rd parameters of getgrouplist is 'int *'
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-08-31 16:00:28 +08:00
Yan, Zheng
0b94867a93
common/blkdev: fix complie error on OSX/FreeBSD
...
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-08-31 16:00:28 +08:00
Yan, Zheng
8d527d4167
common/admin_socket: fix compile error on OSX
...
Invalid operands to binary expression ('__bind<int &, sockaddr *,
unsigned long>' and 'int')
Without :: clang confuses C bind function and std::bind().
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-08-31 16:00:28 +08:00
Yan, Zheng
2cd7d4fca1
tests: only use posix_fadvise on linux
...
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-08-31 16:00:28 +08:00
Yan, Zheng
c092b4fcc4
os/chain_xattr: set CHAIN_XATTR_MAX_NAME_LEN according to max length of xattr name
...
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-08-31 16:00:27 +08:00
Yan, Zheng
b06838a09d
test/admin_socket: check error message according to OS
...
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-08-31 16:00:27 +08:00
Yan, Zheng
f6fa4a28d1
compat: move definitions in porting.h into include/compat.h
...
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-08-31 16:00:27 +08:00
Yan, Zheng
6a03fa5bbe
TestLFNIndex.cc: don't use "cp --preserve=xattr"
...
--preserve option is not supported by OSX's cp. use 'cp -a' instead
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-08-31 16:00:27 +08:00
Yan, Zheng
126ee7dcad
tests: replace std::tr1::shared_ptr with ceph::shared_ptr
...
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-08-31 16:00:27 +08:00
Yan, Zheng
e71269caf6
tests: disable unittest_blkdev on OSX
...
the test uses sysfs, which does not exist on OSX
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-08-31 16:00:26 +08:00
Yan, Zheng
9e37a37908
test/librados: replace sem_init() with sem_open()
...
sem_init() always fails on OSX (it's no longer supported).
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-08-31 16:00:26 +08:00
Yan, Zheng
b82ed61220
buffer: make buffer::exception classes undefined in dynamic objects
...
On OSX, if the an exception class is declared and defined in header file,
but it ends up being compiled as private symbols in different binaries.
The exception handling code will take the two compiled exception classes
as different types! In our case, the one in libcls_xxx.so and the one is
ceph-osd are considered as different classes, thus the try-catch statement
fails to work.
The fix is force buffer::exception classes undefined in libcls_xxx.so. The
ibcls_xxx.so are compiled with '-undefined dynamic_lookup' option. when
it is loaded into ceph-osd, buffer::exception classes in ceph-osd will be
used.
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-08-31 16:00:26 +08:00
Yan, Zheng
c57ef8c3ed
test/librados: replace errno -125 with -ECANCELED
...
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-08-31 16:00:26 +08:00
Yan, Zheng
4132805d70
client: convert XATTR_{CREATE,REPLACE} to CEPH_XATTR_{CREATE,REPLACE}
...
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-08-31 16:00:25 +08:00
Yan, Zheng
5db6915d80
xattr: convert ENOATTR to ENODATA on DARWIN
...
On Darwin, getxattr/removexattr return ENOATTR when extended
attribute does not exist. But lots of ceph codes expect ENODATA
is returned in that case. On Darwin, ENOATTR and ENODATA have
different values, so we convert ENOATTR to ENODATA.
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-08-31 16:00:25 +08:00
Yan, Zheng
731f6aaa68
test_libcephfs: disable flock test on OSX
...
there is no sem_timedwait on OSX. For inter-threads communication,
we can replace sem_t with pthread_cond_t. But for inter-processes
communication, it's extremely hard to figure out how to do a timed
wait. So disable the test case on OSX
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-08-31 16:00:25 +08:00
Yan, Zheng
ad056c12c0
libradosstriper/striping.cc: include "include/types.h"
...
include definitions of __le{32,64)
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-08-31 16:00:25 +08:00
Yan, Zheng
078691977d
test_c_headers: don't use -Wold-style-declaration option for clang
...
clang does not support this option
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-08-31 16:00:25 +08:00
Yan, Zheng
bcbddab500
libcephfs: define loff_t as off_t on OSX
...
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-08-31 16:00:24 +08:00
Yan, Zheng
b800303e19
tools: link ceph-client-debug to LIBCLIENT
...
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-08-31 16:00:24 +08:00
Yan, Zheng
bb1fa7f399
init-ceph: check if /lib/lsb/init-functions exists
...
On OSX/FreeBSD, /lib/lsb/init-functions does not exist
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-08-31 16:00:24 +08:00
Yan, Zheng
4594adbc8f
init-ceph: don't use procfs to check if daemon is running
...
use ps(1) instead, which is portable
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-08-31 16:00:24 +08:00
Yan, Zheng
69e2060f17
init-ceph: replace 'echo -n' with printf
...
'echo -n' is no portable. On OSX, output of 'echo -n' can be '-n'
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-08-31 16:00:24 +08:00
Yan, Zheng
4536cb52fe
vstart.sh: use portable way to get ip address
...
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-08-31 16:00:23 +08:00
Yan, Zheng
e92aaea1bd
vstart.sh: append ceph library path to {LD,DYLD}_LIBRARY_PATH
...
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-08-31 16:00:23 +08:00
Yan, Zheng
05fbfd1102
On Darwin: subfix of dynamic library is dylib
...
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-08-31 16:00:23 +08:00
Kefu Chai
a55891650c
porting.h: add TODO comment
...
Signed-off-by: Kefu Chai <kchai@redhat.com>
2015-08-31 16:00:23 +08:00
Kefu Chai
4ec4177f56
Makefile: add porting.h to dist tarball
...
Signed-off-by: Kefu Chai <kchai@redhat.com>
2015-08-31 16:00:22 +08:00
Yan, Zheng
760f5874ca
Don't use '--exclude-libs' linker option on DARWIN
...
Only GNU linker supports this option
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-08-31 16:00:22 +08:00
Yan, Zheng
d5c43d9c75
client: don't try trimming kernel dcache on DARWIN/FreeBSD
...
still don't know if the methods used on linux also works on
DARWIN/FreeBSD
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-08-31 16:00:22 +08:00
Yan, Zheng
aa71c20734
client: don't include unsupported mount options on DARWIN/FreeBSD
...
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-08-31 16:00:22 +08:00
Yan, Zheng
f064e90ae5
Link ceph-fuse to fuse on DARWIN
...
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-08-31 16:00:22 +08:00
Yan, Zheng
44458db5a7
msg: fix encoding/decoding sockaddr_storage on DARWIN/FreeBSD
...
sockaddr_storage on DARWIN/FreeBSD is different from sockaddr_storage
on Linux. sockaddr_storage on DARWIN/FreeBSD includes a ss_len field.
Besides, Its ss_len and ss_family fields are 'unsigned char'.
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-08-31 16:00:21 +08:00
Dennis Schafroth
11a936e3a2
librbd: Need to include errno.h on DARWIN.
...
The file is not really required
Signed-off-by: Dennis Schafroth <dennis@schafroth.com>
2015-08-31 15:35:58 +08:00
Dennis Schafroth
cd93656e15
porting.h: add porting.h for porting/compatibility on DARWIN
...
Collection of porting/compatibility defines to compile on DARWIN
Signed-off-by: Dennis Schafroth <dennis@schafroth.com>
2015-08-31 15:35:58 +08:00
Dennis Schafroth
fb1b6bc3da
tools/ceph_objectstore_tool: Missing O_LARGEFILE on DARWIN
...
Signed-off-by: Dennis Schafroth <dennis@schafroth.com>
2015-08-31 15:35:57 +08:00
Dennis Schafroth
0fbacb306b
test: Fix error with clang on DARWIN (LLVM 3.6.0svn)
...
Signed-off-by: Dennis Schafroth <dennis@schafroth.com>
2015-08-31 15:35:57 +08:00
Dennis Schafroth
126c327842
rbd-replay: Different location of endian.h on DARWIN
...
Signed-off-by: Dennis Schafroth <dennis@schafroth.com>
2015-08-31 15:35:57 +08:00
Dennis Schafroth
b3b29c0db0
rbd-fuse: Add position to set/get xattr on DARWIN
...
Signed-off-by: Dennis Schafroth <dennis@schafroth.com>
2015-08-31 15:35:57 +08:00
Dennis Schafroth
17db469e9c
os/FileStore: fail with ENOTSUP if using sparse files on DARWIN
...
For now, fail with Not supported (ENOTSUP) if configured using sparse files on DARWIN.
Signed-off-by: Dennis Schafroth <dennis@schafroth.com>
2015-08-31 15:35:56 +08:00
Dennis Schafroth
630da9f911
librbd: Include porting header
...
Signed-off-by: Dennis Schafroth <dennis@schafroth.com>
2015-08-31 15:35:56 +08:00
Dennis Schafroth
4cfac6c302
common/xattr: Split out xattr on Linux and DARWIN.
...
DARWIN requires position parameter
Signed-off-by: Dennis Schafroth <dennis@schafroth.com>
2015-08-31 15:35:56 +08:00
Dennis Schafroth
e69c115ba7
common/util: include sys/param.h and mount.h on DARWIN
...
Signed-off-by: Dennis Schafroth <dennis@schafroth.com>
2015-08-31 15:35:56 +08:00
Dennis Schafroth
d549f41bcf
common/SubProcess: fix build on DARWIN
...
include <signal.h> to avoid errors/warnings on missing functions
Signed-off-by: Dennis Schafroth <dennis@schafroth.com>
2015-08-31 15:35:56 +08:00
Dennis Schafroth
f02342265e
ceph_fuse: Implement set/get xattr with position parameter on OSX
...
Signed-off-by: Dennis Schafroth <dennis@schafroth.com>
2015-08-31 15:35:55 +08:00