| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
From the man page for posix_fallocate:
posix_fallocate() returns zero on success, or an error
number on failure. Note that errno is not set.
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>
|
|
|
|
|
|
|
|
|
| |
Use pkg-config to look for libfuse (which also catches fuse4x on OSX).
This also fixes the HAVE_FUSE_GETGROUPS feature test, which hadn't been
updating LIBS prior to the test. This enabled code with an error in
fuse_ll.cc that had compiler errors.
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>
|
|
|
|
|
|
|
| |
get_process_name is platform specific. Check for Linux prctl function and
headers, and add reference to the relevant OSX function.
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
|
|
|
|
|
|
| |
m_lock is initialized and destroyed, but never used.
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
|
|
|
|
|
|
|
|
| |
The -mt version of the boost libraries shows up in OSX. Other boost
libraries were searching for the same alternative. Adds lib to LIBS to
avoid explicit -l in Makefile.am.
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>
|
|
|
|
| |
Signed-off-by: Jordi Llonch <llonchj@gmail.com>
|
|
|
|
|
|
| |
read functions
Signed-off-by: Jordi Llonch <llonchj@gmail.com>
|
|\ |
|
| |
| |
| |
| |
| |
| | |
Fixes: #5594
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
On some systems (virtual machines so far) the device-by-path entry
from udevadm is not always in the same spot so instead actually
look for the right output instead of blindy assuming that its a
specific field in the output.
Signed-off-by: Sandon Van Ness <sandon@inktank.com>
Reviewed-by: Gary Lowell <gary.lowell@inktank.com>
|
| |\
| | |
| | |
| | |
| | |
| | | |
Re-instate fix for #5492 with corrections.
Signed-off-by: Gary Lowell <gary.lowell@inktank.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This reinstates the fix for the ceph_sbindir from commit
352f362567bf270d0896fb7573df4ae5139a56fb, with corrections
from Danny's review commits pull request #389.
Fixes: #5492
Reported-by: Denis Kaganovich <mahatma@eu.by>
Reviewed-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Signed-off-by: Sage Weil <sage@inktank.com>
Signed-off-by: Gary Lowell <gary.lowell@inktank.com>
|
|\ \ \
| | | |
| | | |
| | | |
| | | | |
Fix some typical SCA issues from cppcheck
Reviewed-by: Sage Weil <sage@inktank.com>
|
| | | |
| | | |
| | | |
| | | | |
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
|
| | | |
| | | |
| | | |
| | | | |
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
|
| | | |
| | | |
| | | |
| | | | |
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
|
| | | |
| | | |
| | | |
| | | | |
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
|
| | | |
| | | |
| | | |
| | | | |
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
|
| | | |
| | | |
| | | |
| | | | |
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
|
| | | |
| | | |
| | | |
| | | | |
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
|
|/ / /
| | |
| | |
| | | |
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
|
| | |
| | |
| | |
| | | |
Signed-off-by: Dan Mick <dan.mick@inktank.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
intra region bucket creation, deletion and copy object to and from remote regions validated
Signed-off-by: Babu Shanmugam <anbu@enovance.com>
Reviewed-by:Yehuda Sadeh <yehuda@inktank.com>
|
| | |
| | |
| | |
| | |
| | |
| | | |
Spotted by Noah Watkins
Signed-off-by: Dan Mick <dan.mick@inktank.com>
|
| | |
| | |
| | |
| | | |
Signed-off-by: Dan Mick <dan.mick@inktank.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
da0aff28ab478bcc3136715f92bc1af8d4b403c1 removed 'ceph sync status';
test script needs to stop trying it
Signed-off-by: Dan Mick <dan.mick@inktank.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
1) don't pass subshell to expect_false
2) osd pause/unpause don't take arguments (apply to all OSDs)
Signed-off-by: Dan Mick <dan.mick@inktank.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Patterned after cephtool/test.sh, with some deeper validation of
output format and contents (because structured output is easier
to validate).
Signed-off-by: Dan Mick <dan.mick@inktank.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
ceph-rest-api is a Python WSGI module for accessing the Ceph cluster.
It supports most of the commands supported by the ceph CLI,
appropriately translated to HTTP GET/PUT requests. It is not a
truly RESTful interface.
Not supported at this moment: "tell", "pg <pgid>", and "daemon"
commands.
Configuration options are specified in ceph.conf, specified with
-c/--conf or obtained from $CEPH_CONF, /etc/ceph/ceph.conf,
~/.ceph/ceph.conf, or ./ceph.conf.
-n/--name specifies the client name, used for the cluster
authentication key and for the ceph.conf section name (default
is client.restapi).
restapi keyring = <keyring file>
restapi public addr = listenIP:port (default 0.0.0.0:5000)
restapi base url = <base path> (default /api/v0.1)
restapi log level = (error, warning, info, debug)
restapi log file = (default /var/log/ceph/<clientname>.log)
Primitive human-level command discovery is supported; GET from
BASEURL (say, http://localhost:5000/api/v0.1) will show an HTML
table of all commands and arguments, method supported, and help strings.
Signed-off-by: Dan Mick <dan.mick@inktank.com>
|