doc: add-or-rm-mons.rst: better explanation on number of monitors

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
doc: troubleshooting-mons.rst: better document how to troubleshoot mons

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
rados.py: add aio_remove

Add aio_remove to the Python wrapper.

Signed-off-by: Dan van der Ster <daniel.vanderster@cern.ch>
osd: bracket role changes with scrub reg/unreg

Make sure the reg/unreg calls for putting ourselves in the scrub schedule
bracket any PG role changes, or that initial reg happens after the role
has been initialized.

Signed-off-by: Sage Weil <sage@inktank.com>
osd: only register for scrub if we are the PG primary

There is no reason to put non-primary PGs on the scrub schedule as they
will be ignored when the worker comes around.  This reduces lock
contention and is generally cleaner.

Signed-off-by: Guang Yang <yguang@yahoo-inc.com>
Signed-off-by: Sage Weil <sage@inktank.com>
erasure-code: remove jerasure version 1

http://tracker.ceph.com/issues/7599 refs #7599

Signed-off-by: Loic Dachary <loic@dachary.org>
erasure-code: use jerasure as submodules

Now that there is a git repository to refer to, it will be good for
maintenance. Pin the version to stable branches.

http://tracker.ceph.com/issues/7599 refs #7599

Signed-off-by: Loic Dachary <loic@dachary.org>
autotools: set SIMD_FLAGS with SSE flags

As well as compiler options.

Signed-off-by: Loic Dachary <loic@dachary.org>
erasure-code: upgrade to jerasure version 2

http://tracker.ceph.com/issues/7599 refs #7599

Signed-off-by: Loic Dachary <loic@dachary.org>
erasure-code: LARGEST_VECTOR_WORDSIZE is always 16

Signed-off-by: Loic Dachary <loic@dachary.org>
Make the configuration "filestore merge threshold" can be negative which prevent it from merging, this could help:
  1. We are trying to create the PG folder up to several levels with a standalone tool to prevent it from runtime splitting, we need a configuration which prevent it from merging even there is no file within the folder.
  2. As runtime split / merge could bring latency issues, customer can use a negative merge threshold to prevent merging but only splitting.
This change is backward compatbile.
Signed-off-by: Guang Yang (yguang@yahoo-inc.com)
mds: Return EINVAL for parent lookup on root ino

This was the behaviour before 8d6b25a1, and distinguishes
the general failure to find a parent (ESTALE) from the specific
case of a node being present but being the base (EINVAL)

Signed-off-by: John Spray <john.spray@inktank.com>
client: Add lookup_parent & lookup_name

Exposing the CEPH_MDS_OP_LOOKUPPARENT and
recently added CEPH_MDS_OP_LOOKUPNAME operations.

lookup_ino and lookup_parent optionally take an Inode**
which will be populated with a reference to the
resulting inode.

Fixes: #3863

Signed-off-by: John Spray <john.spray@inktank.com>
libcephfs: add ceph_ll_lookup_inode

This is a wrapper to lookup_ino, lookup_parent
and lookup_name, to provide the
caller with the requested inode and its
dentry.  The result is suitable for traversing
the inode's path.

Fixes: #3863

Signed-off-by: John Spray <john.spray@inktank.com>
tools: Create ceph-client-debug

For exposing test/dev functionality which uses
the cephfs client interface.

Initially just provides lookup-by-ino.

Fixes: #3863

Signed-off-by: John Spray <john.spray@inktank.com>
PG: clear want_pg_temp in clear_primary_state only if primary

Clearing it in that way in on_shutdown() can cause a stray
shard to clobber the want_pg_temp value created by the primary
shard on the same osd.  Thus, instead only clear it if we are
the primary.

Fixes: #7719
Signed-off-by: Samuel Just <sam.just@inktank.com>
RGWListBucketMultiparts: init max_uploads/default_max with 0

CID 717377 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
 2. uninit_member: Non-static class member "max_uploads" is not initialized
    in this constructor nor in any functions that it calls.
 4. uninit_member: Non-static class member "default_max" is not initialized
    in this constructor nor in any functions that it calls.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
(cherry picked from commit b23a141d54ffb39958aba9da7f87544674fa0e50)
PG::issue_repop: only adjust peer_info last_updates if not temp

Temp object repops have version eversion_t() since they don't
actually send log entries.  Updating the last_updates here
caused the peer info last_updates to be incorrect until the
next non-temp repop.

Fixes: #7718
Signed-off-by: Samuel Just <sam.just@inktank.com>
osd/ReplicatedPG: fix enqueue_front race

When requeuing and item at the front, we need to shuffle the items in
pg_for_processing if there is an entry for this PG there.  If so, we need
to hold the qlock for the duration of the requeue of the shuffled item
back into the primary queue in order to avoid reshuffling items.  For
example, consider the queue has

 A B C D

 - dequeue1 gets (pg, A), puts A in the processing list
 - dequeue1 tries to lock pg, blocks
 - enqueue_front on X takes qlock, swaps it for A, drops qlock
 - dequeue2 gets (pg, B), puts B in the processing list
 - enqueue_front pushes X back into the original list

 so we have processing: X B  queue: A C D

 - dequeue* get X, then B, then A C D

If we whole qlock for the duration of the enqueue_front, we avoid dequeu2
from sneaking in an shuffling B into the processing list before we have
crammed A back onto the front of the list.

This may have caused #7712.

Backport: emperor, dumpling
Signed-off-by: Sage Weil <sage@inktank.com>
PG::build_might_have_unfound: check pg_whomai, not osd whoami

Otherwise, we might skip (2,0) when we are (2,1).

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