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>
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>
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>
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
librbd: flush on diff_iterate

The diff_iterate() tests fail when caching is enabled because recent writes
aren't visible to listsnaps.  Flush from diff_iterate to ensure that they
are.  Someday, maybe, we might make diff_iterate() inspect the cache
contents to make this more efficient, but for now that is not necessary.

Signed-off-by: Sage Weil <sage@inktank.com>
Merge pull request #214 from ceph/wip-objectcacher-handler-ordered

keep write responses to clones in order

Reviewed-by: Sage Weil <sage@inktank.com>
qa: pull qemu-iotests from ceph.com mirror

Signed-off-by: Sage Weil <sage@inktank.com>