doc: Added documenting Ceph to the toc tree.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
doc: Added Documenting Ceph (draft) document.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
doc: Adding more information on style and usage for documenting Ceph.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
doc: Incorporated feedback.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
mds: Add encode/decode/dump for use with dencoder

This is for the MDSTable subclasses: AnchorServer,
SnapServer, InoTable.  AnchorServer was partially there
but didn't work in practice dumped objects because of
the version prefix on the object.

This adds a skip argument to ceph-dencoder for getting
past fixed size prefixes.  The encode_server_state method
is also made const to avoid the need for const_casting (and
because it really is const)

Signed-off-by: John Spray <john.spray@inktank.com>
mon/MDSMonitor: Cope with failures during creation

Previously an MDS which failed in state CREATING could be
assigned the sequence BOOT->STANDBY->REPLAY at its next
startup, which fails to re-try the creation.

Fixes: #7485

Signed-off-by: John Spray <john.spray@inktank.com>
erasure-code: test that changing the pool size is not allowed

http://tracker.ceph.com/issues/7360 fixes #7360

Signed-off-by: Loic Dachary <loic@dachary.org>
ceph_test_objectstore: fix signed/unsigned warning

In file included from test/objectstore/store_test.cc:33:0:
../src/gtest/include/gtest/gtest.h: In function ‘testing::AssertionResult testing::internal::CmpHelperEQ(const char*, const char*, const T1&, const T2&) [with T1 = int, T2 = unsigned int]’:
../src/gtest/include/gtest/gtest.h:1300:30: instantiated from ‘static testing::AssertionResult testing::internal::EqHelper::Compare(const char*, const char*, const T1&, const T2&) [with T1 = int, T2 = unsigned int, bool lhs_is_null_literal = false]’
test/objectstore/store_test.cc:484:193: instantiated from here
warning: ../src/gtest/include/gtest/gtest.h:1263:3: comparison between signed and unsigned integer expressions [-Wsign-compare]

Signed-off-by: Sage Weil <sage@inktank.com>
ceph_test_objectstore: fix i386 build error

We can't swap size_t and uint64_t; just change the len type to match.

Signed-off-by: Sage Weil <sage@inktank.com>
osd: increase default leveldb write buffer, cache size

The FileStore's leveldb currently uses libleveldb's defaults for cache and
write buffer size, which are both 4 MB. Increase the cache size to 128MB and
the write buffer to 8MB.

Tested-by: Dmitry Smirnov <onlyjob@member.fsf.org>
Signed-off-by: Sage Weil <sage@inktank.com>
client: fix possible null dereference in create

There are two paths that jump to the out label for which 'in' can be
NULL and outp can be non-NULL.  For those cases we want to fill in the
caller's pointer value (they asked for it) but we clearly cannot take
a reference.

Backport: emperor, dumpling
Signed-off-by: Sage Weil <sage@inktank.com>
ECBackend: skip canceled xattr reads as well

Signed-off-by: Samuel Just <sam.just@inktank.com>
mon/PGMap: add unit test for min_last_epoch_clean

Signed-off-by: Sage Weil <sage@inktank.com>
mon/PGMap: fix osd_epochs update

The insert() call here does not overwrite a previous entry, which means
that the osd_epochs map is never moving forward in time.  This seems to
have been broken since it was introduced in 091809b814.

Backport: emperor, dumpling
Signed-off-by: Sage Weil <sage@inktank.com>
PG: clarify same_primary_since updates regarding primary rank

pg_shard_t includes the position, so these checks handle
same osd/different rank properly.

Signed-off-by: Samuel Just <sam.just@inktank.com>
Objecter/OSDMap: factor out primary_changed() into static OSDMap method

We need to reuse this logic in OSD::project_pg_history.

Signed-off-by: Samuel Just <sam.just@inktank.com>
OSD::project_pg_history needs to account for acting_primary/up_primary

Fixes: #7512
Signed-off-by: Samuel Just <sam.just@inktank.com>
Merge pull request #1306 from ceph/wip-7512

wip-7512

Reviewed-by: Sage Weil <sage@inktank.com>
Merge pull request #1304 from ceph/wip-last-epoch-clean

mon: fix min_last_epoch_clean handling

Reviewed-by: Samuel Just <sam.just@inktank.com>
PG: skip pg_whoami.osd, not pg_whoami.shard in scrub feature check

Caused by typo in 68184d4574cd507ab3a065693e392917b98e16ec.

Fixes: #7517
Signed-off-by: Samuel Just <sam.just@inktank.com>