osdc/Objecter: flag ops that have been redirected

In the future it may be helpful to know whether an op has been redirected
by the OSD.

We don't need it bad enough now to spend a feature bit to know whether this
flag is reliably set.

Signed-off-by: Sage Weil <sage@inktank.com>
ceph-disk: Enable creating multiple osds per dev

This is useful for demos and testing.  Enables
creation of lots of OSDs on a single block device
by simply running ceph-disk prepare more than once,
with a --data-size argument set.

Signed-off-by: John Spray <john.spray@inktank.com>
Make KeyValueStore support "ceph osd perf" command

Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
librados: simplify/fix rados_pool_list bounds checks

We were not breaking out of the loop when we filled up the buffer unless
we happened to do so on a pool name boundary.  This means that len would
roll over (it was unsigned).  In my case, I was not able to reproduce
anything particularly bad since (I think) the strncpy was interpreting the
large unsigned value as signed, but in any case this fixes it, simplifies
the arithmetic, and adds a simple test.

- use a single 'rl' value for the amount of buffer space we want to
  consume
- use this to check that there is room and also as the strncat length
- rely on the initial memset to ensure that the trailing 0 is in place.

Fixes: #8447
Signed-off-by: Sage Weil <sage@inktank.com>
Merge pull request #1910 from ceph/wip-8447

librados: simplify/fix rados_pool_list bounds checks

Reviewed-by: Loic Dachary <loic@dachary.org>
Fix keyvaluestore fiemap bug

The result of fiemap is wrong and the offset get from
"StripObjectMap::file_to_extents" need to multiply by sequence number

Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
os: rename get_*() -> decode_*()

These methods have side-effects: they move the decode iterator *and*
return a value.  Rename them to avoid confusion with typical get_*
accessors.

Signed-off-by: Sage Weil <sage@inktank.com>
Extracted RadosXattrIter from librados.cc into independent .h anc .cc files.
This makes this interface usable by clients of librados.

Signed-off-by: Sebastien Ponce <sebastien.ponce@cern.ch>
Fixed missing include of assert.h in RWLock interface

Signed-off-by: Sebastien Ponce <sebastien.ponce@cern.ch>
Fixed usage of rhel_version in spec file : it should have been rhel

Signed-off-by: Sebastien Ponce <sebastien.ponce@cern.ch>
Added const qualifiers for the layout argument of file_to_extents and object_truncate_size

Signed-off-by: Sebastien Ponce <sebastien.ponce@cern.ch>
Completed librados documentation of rados_write_op_cmpxattr and rados_read_op_cmpxattr concerning their error reporting

Signed-off-by: Sebastien Ponce <sebastien.ponce@cern.ch>
Added a striper interface on top of rados called radosstriper.

This interface allows to manipulate striped objects stored in a rados cluster with a standard open/read/write/stat/close/remove API.
Asynchronous APIs are also provided for data transfers and both C and C++ APIs are present.

Signed-off-by: Sebastien Ponce <sebastien.ponce@cern.ch>
ceph-objectstore-test: fix warning in collect_metadata test

In file included from test/objectstore/store_test.cc:33:0:
../src/gtest/include/gtest/gtest.h: In function ‘testing::AssertionResult testing::internal::CmpHelperNE(const char*, const char*, const T1&, const T2&) [with T1 = long unsigned int, T2 = int]’:
test/objectstore/store_test.cc:82:5: instantiated from here
warning: ../src/gtest/include/gtest/gtest.h:1379:1: comparison between signed and unsigned integer expressions [-Wsign-compare]

Signed-off-by: Sage Weil <sage@inktank.com>
include/atomic: make 32-bit atomic64_t unsigned

This fixes

In file included from test/perf_counters.cc:19:0:
./common/perf_counters.h: In member function ‘std::pair PerfCounters::perf_counter_data_any_d::read_avg() const’:
warning: ./common/perf_counters.h:156:36: comparison between signed and unsigned integer expressions [-Wsign-compare]
} while (avgcount2.read() != count);
^

Signed-off-by: Sage Weil <sage@inktank.com>
Merge pull request #1925 from ceph/wip-i386-atomic

fix i386 atomic64_t

Reviewed-by: Samuel Just <sam.just@inktank.com>
Merge remote-tracking branch 'gh/next'
Merge pull request #1859 from ceph/wip-multipartition

ceph-disk: Enable creating multiple osds per dev

Reviewed-by: Dan Mick <dan.mick@inktank.com>
doc: Use write_full for C++ example
Latest version of librados uses write_full when writing entire object.

Should the documentation mention that the method "write" used to serve
this function.

Signed-off-by: Kevin Dalley <kevin@kelphead.org>
doc: Descrption => Description
Correct spelling error.

Signed-off-by: Kevin Dalley <kevin@kelphead.org>