ObjectCacher: deduplicate final part of flush_set()

Both versions of flush_set() did the same thing. Move it into a
helper called from both.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
WritebackHandler: make read return nothing

The tid returned by reads is ignored, and would make tracking writes
internally more difficult by using the same id-space as them. Make read
void and update all implementations.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
LibrbdWriteback: use a tid_t for tids

An int could be much smaller, leading to overflow and bad behavior.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
LibrbdWriteback: removed unused and undefined method

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
LibrbdWriteback:  complete writes strictly in order

RADOS returns writes to the same object in the same order. The
ObjectCacher relies on this assumption to make sure previous writes
are complete and maintain consistency. Reads, however, may be
reordered with respect to each other. When writing to an rbd clone,
reads to the parent must be performed when the object does not exist
in the child yet. These reads may be reordered, resulting in the
original writes being reordered. This breaks the assmuptions of the
ObjectCacher, causing an assert to fail.

To fix this, keep a per-object queue of outstanding writes to an
object in the LibrbdWriteback handler, and finish them in the order in
which they were sent.

Fixes: #4531
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
ceph.spec.in: use %{_sbindir} macro again

Commit ae71b576a7396bf44f052845af7561cc0436486a change some paths
again to absolute path to /usr/sbin. Use the correct macro %{_sbindir}
again as done in 4b90a958d11059bf470897cbedf460cd9c159dd6.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Fix: use absolute path with udev

Avoids the following: udevd[61613]: failed to execute '/lib/udev/bash'
'bash -c 'while [ ! -e /dev/mapper/....

Signed-off-by: Alexandre Marangone <alexandre.marangone@inktank.com>
Merge pull request #217 from alram/master

Fix: use absolute path with udev

Reviewed-by: Sage Weil <sage@inktank.com>
librbd: print seed for all DiffIterate tests

This will aid debugging on failures, and give better coverage.

Signed-off-by: Sage Weil <sage@inktank.com>
librbd: use initialized data for DiffIterateDiscard test

Signed-off-by: Sage Weil <sage@inktank.com>
osd/PG.h: remove unused variable prior_set_built

Commit 540f42ce284d9 removed usage of prior_set_built, remove
also the related protected variable from the header.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
client: Fix inode remove from snaprealm race

This is a follow on fix to b5ce4d0.  Always remove the inode from the
snaprealm's list of inodes_with_caps before the snaprealm ref is
decremented (and the snaprealm potentially gets freed).

Fixes #4694.
Signed-off-by: Sam Lang <sam.lang@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
osd/PG.cc: initialize PG::flushed in constructor

Initialize PG::flushed in constructor with false as
described in doc/dev/osd_internals/pg.rst .

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
os/FileJournal: fix journal completion plug removal

We plug completions when transitioning from a full to non-full journal
to ensure that we do not complete items before we have a stable journal
starting point that is past the committed_thru marker.  However, the order
of the header update and completion queueing means that we never remove
the plug if the journalq is empty--the seq test is always false.  The
result is very slow osd requests that only commit when we do a full sync.

This bug was masked until recently by another issue, fixed in
170d4a3d794260476ecde1e5e2ee719b7cb3ffd1.

The simple fix is to reorder the completion queuing before we update the
new header.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
doc: Cherry picked from master to next. Adds comments on naming OSDs.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
doc: Cherry-picked from master to next. Reorders ceph osd create.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
doc: Cherry-picked from master to next. Updates config to use virtio.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
doc: Cherry-picked from master to next. Rewrite of CloudStack document.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
doc: Cherry-picked from master to next. Uses ceph-mds package during upgrade.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
Merge branch 'next' of https://github.com/ceph/ceph into next