| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
|
|
|
|
| |
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
|
|
|
|
|
|
|
| |
OSX doesn't seem to like __thread way of setting thread local data. But
the same thing can be accomplished with pthread_get/setspecific.
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some of the high numbered errno.h values are only available on Linux.
I couldn't find any users in the tree that would be effected by this
change, and it wasn't clear if the value would collide with other errors
or be leaked out to a client.
Are there any users of this library?
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
|
|
|
|
|
|
| |
Unsure about how to properly do networking portable.
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
| |
MSG_MORE is not available on OSX, and unlike MSG_NOSIGNAL, there doesn't
appear to be an equivalent. It is not clear if MSG_MORE effects
correctness or is just an optimization.
If the MSG_MORE semantics are required for correctness, we may be able
to use TCP_CORK to do this on OSX.
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
|
|
|
|
| |
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
|
|
|
|
| |
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
|
|
|
|
| |
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
|
|
|
|
|
|
|
| |
Note that according to Linux manpage, signal(2) for custom handler
functions isn't portable, and sigaction should be used instead.
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
|
|
|
|
| |
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Working around missing integer types is pretty easy. For example, the
__u32 family are Linux-specific types, and using these in Ceph
internally is fine because we can typedef them, but the biggest problem
is that they are also used in installed headers. Again, they could be
typedefed in the installed headers, but it isn't clear that we can't
just use standard ints in installed headers.
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
|
|
|
|
|
|
|
|
| |
This a compatibility feature to avoid using OSX two-level namespacing.
Ideally we can get rid of this, but it'll take some deeper understanding
of the problem.
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
|
|
|
|
| |
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
Zero-fill journal if posix_fallocate fails or if it is not supported.
For very large journals zero fill can take a long time. An optimization
is to write a zero byte to the end of each block, or use platform
specific features for file allocation. Reference solutions for various
platforms can be found in Mozilla, SQLite, and PostgreSQL.
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
|
|
|
|
|
|
|
|
| |
OSX doesn't define hash<int64_t>, hash<uint64_t>, and isn't able to cast
pthread_t to a type with a hash. This fixes the problem by defining
replacements.
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
|
|
|
|
| |
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Ceph client re-uses the _IOR, _IOW Linux macros for computing IOCTL
flags, but these macros are not available on non-Linux systems. This
patch defines IOCTL numbers in this case.
The IOCTL numbers used do not have to be identical to the kernel client.
They only have to be consistent for a particular client build. Ideally
we can move away from reusing this Linux-specific macro in the client.
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
On OSX, the fuse get/set xattr interfaces takes a positional argument
that specifies an offset within the xattr. According to the OSX docs
only the 'resource fork' extended attribute will make use of this
feature and that all other attributes should set this to zero. Ceph
doesn't currently support xattr offsets (at the API level at least).
Therefore Ceph will return ENOTSUP if a non-zero positional argument is
used.
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
|
|
|
|
|
|
|
| |
Provides better portability. Currently works on all the gitbuilder
platforms, as well as OSX with fuse4x installed.
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adds a ceph_spinlock_t implementation that will use pthread_spinlock_t
if available, and otherwise reverts to pthread_mutex_t. Note that this
spinlock is not intended to be used in process-shared memory.
Switches implementation in:
ceph_context
SimpleMessenger
atomic_t
Only ceph_context initialized its spinlock with PTHREAD_PROCESS_SHARED.
However, there does not appear to be any instance in which CephContext
is allocated in shared memory, and thus can use the default private
memory space behavior.
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
|
|
|
|
| |
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
|
|
|
|
| |
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
|
|
|
|
| |
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
|
|
|
|
| |
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
|
|
|
|
| |
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
|
|
|
|
|
|
|
|
|
| |
On OSX sem_timedwait is not available. This patch simply turns off the
heartbeat interval feature. Building a replacement should be possible, but is
needs some careful thought because pthread mutex/conds aren't thread safe, and
sem_post is called from SIGHUP.
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
|
|
|
|
|
|
|
|
| |
Only adding information about data usage. This won't effect correctness;
finding analagous techniques on other platforms woudld be useful for
performance.
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
|
|
|
|
| |
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
|
|
|
|
|
|
| |
Support OSX, add checks for platform specific headers.
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
|
|
|
|
| |
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
|
|
|
|
|
|
|
| |
Function `get_process_name` has platform specific dependencies. Check
for Linux prctl function and correct command flag.
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
|
|
|
|
|
|
|
|
|
| |
AC_SEARCH_LIBS will first try to resolve uuid_parse in the system
libraries (OSX), and then will try other libraries (e.g. libuuid). The
$LIBS variable will be updated with the result, so we don't need an
explicit -luuid in src/Makefile.am.
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
|
|
|
|
|
|
|
|
| |
pipe.c and Pipe.cc produce the same intermediate file names on
case-insensitive file systems (like HFS). This renames pipe.c/pipe.h in
order to avoid the conflict.
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
|
|
|
|
| |
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Selects __PRETTY_FUNCTION__ or __func__. Linux assumes GNU, and chooses
__PRETTY_FUNCTION__ if gcc/g++ versions are favorable.
This also includes a fix in ax_c_var_func.m4:
AC_TRY_COMPILE will wrap the test in main{}, and then GCC will complain
about nested functions. Just use the original main{} body.
diff --git a/m4/ax_c_var_func.m4 b/m4/ax_c_var_func.m4
index 0ad7d2b..8b57563 100644
--- a/m4/ax_c_var_func.m4
+++ b/m4/ax_c_var_func.m4
@@ -57,9 +57,9 @@ AC_DEFUN([AX_C_VAR_FUNC],
[AC_REQUIRE([AC_PROG_CC])
AC_CACHE_CHECK(whether $CC recognizes __func__, ac_cv_c_var_func,
AC_TRY_COMPILE(,
-[int main() {
+[
char *s = __func__;
-}],
+],
AC_DEFINE(HAVE_FUNC,,
[Define if the C complier supports __func__]) ac_cv_c_var_func=yes,
ac_cv_c_var_func=no) )
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
|
|
|
|
| |
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
|
|
|
|
|
|
| |
libtoolize is called glibtoolize on osx.
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
On btrfs, kb_used + kb_avail can be much smaller than total kb, and
what really matters to avoid filling up the disk is how much space is
available, not how much we've used. Thus, compute the ratio we use to
determine full or nearfull from kb_avail rather than from kb_used.
Signed-off-by: Alexandre Oliva <oliva@gnu.org>
Signed-off-by: Sage Weil <sage@inktank.com>
|
|\
| |
| | |
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
|
| |
| |
| |
| | |
Signed-off-by: fangdong <yp.fangdong@gmail.com>
|
| |
| |
| |
| | |
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
|
| |
| |
| |
| |
| |
| | |
fixes: #6326
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
|
| |
| |
| |
| |
| |
| | |
fixes: #6308
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
|
|\ \
| | |
| | |
| | | |
ErasureCode: fix uninitialized variable warning
Reviewed-by: Greg Farnum <greg@inktank.com>
|
| |/
| |
| |
| | |
Signed-off-by: Loic Dachary <loic@dachary.org>
|
|\ \
| |/
|/|
| |
| | |
This branch built fine on the gitbuilders and the list of removed files looks good to me.
Reviewed-by: Greg Farnum <greg@inktank.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The in-tree Hadoop shim was a combination of libcephfs wrapper, and the
bits to support Hadoop. This has been replaced by src/java that
implements generic libcephfs wrappers, and externally, the hadoop shim
(see docs).
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
|
|\ \
| |/
|/|
| |
| | |
jerasure-1.2A plugin
Reviewed-by: Samuel Just <sam.just@inktank.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Create the class matching the string found in the
erasure-code-technique parameter, using the same strings are the
original {encoder,decoder}.c examples from Jerasure-1.2A. Registers
the plugin in ErasureCodePluginRegistry.
https://github.com/dachary/ceph/tree/wip-5879 refs #5879
Signed-off-by: Loic Dachary <loic@dachary.org>
|