Commit Graph

43988 Commits

Author SHA1 Message Date
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
Dennis Schafroth
15f8363db3 msg/async: Include porting.h for MSG_*
Signed-off-by: Dennis Schafroth <dennis@schafroth.com>
2015-08-31 15:35:55 +08:00
Dennis Schafroth
7e1d83bb4d msg/simple: Move MSG_ and SO_NOSIGPIPE into porting.h
Only enable SO_PRIORITY on Linux

Signed-off-by: Dennis Schafroth <dennis@schafroth.com>
2015-08-31 15:35:55 +08:00
Kefu Chai
5462635167 Merge pull request #5710 from tchaikov/wip-check-boost_random-mt
configure.ac: check for libboost_random-mt also

Reviewed-by: Loic Dachary <ldachary@redhat.com>
2015-08-29 22:32:20 +08:00
Sage Weil
4b07af0adf Merge pull request #5711 from dachary/wip-12781-dmcrypt
ceph-disk: fix dmcrypt typo

Reviewed-by: Kefu Chai <kchai@redhat.com>
2015-08-29 08:24:01 -04:00
Loic Dachary
3a6c2468dd ceph-disk: fix dmcrypt typo
Fix the typo introduced by 29431944c7

http://tracker.ceph.com/issues/12781 Fixes: #12781

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2015-08-29 11:31:49 +02:00
Loic Dachary
898ebf01fb Merge pull request #4731 from stiopaa1/cephdetectinitfix
ceph-detect-init/debian/__init__: improved syntax

Reviewed-by: Loic Dachary <ldachary@redhat.com>
2015-08-29 11:03:02 +02:00
Loic Dachary
b5af9e1894 Merge pull request #5503 from zhouyuan/isal_2.14_update
erasure-code: Update ISA-L to 2.14

Reviewed-by: Loic Dachary <ldachary@redhat.com>
2015-08-29 10:58:12 +02:00
Kefu Chai
9b815ed894 configure.ac: check for libboost_random-mt also
Signed-off-by: Kefu Chai <kchai@redhat.com>
2015-08-29 16:49:57 +08:00
Loic Dachary
3404bb90dd Merge pull request #5467 from dachary/wip-ceph-release-notes
tools: ceph-release-notes unicode handling

Reviewed-by: Abhishek Lekshmanan <abhishek.lekshmanan@ril.com>
2015-08-29 10:47:26 +02:00