* The 'buf' argument to read() used to be passed into
AioCompletionImpl, and the results would be copied back after
reading. This is replaced with the creation of a static buffer of
that buf.
* The pbl argument in AioCompletionImpl is removed.
The patch is tested against an application using librados. I've
assumed that 'pbl' in
aio_read( ...., pbl, )
is allocated by the user. It may even speed things up: a buffer copy
is prevented.
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
The content of CEPH_ARGS is appended to the list of arguments. When
--show-config or --show-config-value is also set, it should be evaluated
after all arguments are parsed to accurately reflect the value that
would be visible to the program.
It failed to do so because the action for --show-config* was carried out
immediately. It is postponed until all options are parsed instead.
Signed-off-by: Loic Dachary <loic@dachary.org>
If not set, commands that rely on --show-config-value fsid or something
equivalent will fail. ceph-disk does, for instance and setting the fsid
in CEPH_ARGS won't help because it will be appended after
--show-config-value :
CEPH_ARGS="--fsid 96a3abe6-7552-4635-a79b-f3c096ff8b95" ./ceph-mon --cluster=ceph --name=osd. --show_args --show-config-value fsid
args: --cluster=ceph --name=osd. --show_args --show-config-value fsid --fsid 96a3abe6-7552-4635-a79b-f3c096ff8b95
00000000-0000-0000-0000-000000000000
Signed-off-by: Loic Dachary <loic@dachary.org>
Not all compilers are supporting tr1/tuple. This forces libgtest to use
an internal implementation of tuple. Alternatively, the newer 1.6
version of gtest may correctly handle this case automatically.
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Unfortunately, 'using namespace std;' is in pretty widespread use in the Ceph
tree, so we need to rename to avoid the conflict.
Example error output:
test/streamtest.cc:37:19: error: reference to 'lock' is ambiguous
Mutex::Locker l(lock);
^
test/streamtest.cc:32:7: note: candidate found by name lookup is 'lock'
Mutex lock("streamtest.cc lock");
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/mutex:346:1: note: candidate found by name lookup is 'std::__1::lock'
lock(_L0& __l0, _L1& __l1)
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
There are several non-standard errno values used. There is still work to
do on addressing errno portability in Ceph, and this disables kvstore on
non-Linux platforms until that work is complete.
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>
"rbd bench-write" eject all write operations with the same offset at the same
time. It will result in non-objective performance result from this command.
fix#7066
Co-Author: Rongze Zhu <rongze@unitedstack.com>
Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
Add a -o / --options option, which would allow users to specify
rbd-specific and generic ceph client and osd options available at
mapping time in a comma separated list (similar to mount(8) mount
options).
Exposed options are:
- fsid=%s
- ip=%s
- share
- noshare
- crc
- nocrc
- osdkeepalive=%d
- osd_idle_ttl=%d
- rw
- ro (equivalent to existing --read-only flag)
The rw/ro < 3.7 kernels compatibility kludge added in commit
fb0f198644 is preserved.
Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>