msgr: If the Connection has a bad Pipe*, replace it with a good one.

This is a little weak, since it doesn't fill in the Connection's data
when we initially create the new Pipe. But doing that would require
passing more state around that mucks up the interfaces a bit, so I
don't think it's worthwhile. This also makes it clear that this
set of functions is not responsible for doing things like reset
notifications -- those need to be handled through the normal channels
(I reviewed them and as best I can tell, they are.)

Signed-off-by: Greg Farnum <greg@inktank.com>
msgr: pass a Connection instead of a Pipe through submit_message.

This lets us maintain a user's existing Connections even if the underlying
Pipe object disappears (ie, it's lossy and they don't drop the Connection
object).

This is a little distressing for me because it's again emphasizing the
Connection over the Pipe, but that seems to be an ongoing process.
Maybe the next Messenger implementation will be able to do away with
the (fairly messy) distinction between them.

Signed-off-by: Greg Farnum <greg@inktank.com>
Merge remote-tracking branch 'origin/master' into wip-msgr-interface

Conflicts:
	src/msg/Messenger.h
	src/msg/SimpleMessenger.h

Signed-off-by: Greg Farnum <greg@inktank.com>
msgr: add mistakenly-removed msgr->lock.Lock() back in

This was accidentally deleted in
828f619c84c02edec10ce0c22d47a72136ba3749 but is definitely required.

Signed-off-by: Greg Farnum <greg@inktank.com>
ceph_argparse: with_float

Signed-off-by: Caleb Miles <caleb.miles@inktank.com>
crush: check_item_present

True if id is present in the map.

Signed-off-by: Caleb Miles <caleb.miles@inktank.com>
crush: simiulate using rng; use chi-squared to measure result

Signed-off-by: Caleb Miles <caleb.miles@inktank.com>
CrushTester: allow build without boost stuff for chi^2 testing

With limited functionality.

Signed-off-by: Sage Weil <sage@inktank.com>
msg: make clear_pipe work only on a given Pipe, rather than the current one.

This way old Pipes that have been replaced can't clear the new Pipe
out of a Connection's link.
We might attempt to instead sever the link between CLOSED Pipes and
their Connections more completely (eg, when the Connection gets a
new Pipe), but that will require more work to handle all the
cases, and this works for now.

Signed-off-by: Greg Farnum <greg@inktank.com>
rgw: replace 'should_log' with 'enable_ops_log'

code cleanup, make it more clear about log intention.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
src/: Add namespace and pool fields to hobject_t

From this point, hobjects in the ObjectStore will be globally unique.  This
will allow us to avoid including the collection in the ObjectMap key encoding
and thereby enable efficient collection renames and, eventually, collection
splits.

Signed-off-by: Samuel Just <sam.just@inktank.com>
test/ObjectMap: Copy current DBObjectMap implementation

This implementation will be used to test the upgrade process.

Signed-off-by: Samuel Just <sam.just@dreamhost.com>
os/: update CollectionIndex filename encodings

filename encodings now include namespace and pool.

Signed-off-by: Samuel Just <sam.just@inktank.com>
DBObjectMap: add parse method for old encoding

Signed-off-by: Samuel Just <sam.just@inktank.com>
DBObjectMap: version bump for new format

Signed-off-by: Samuel Just <sam.just@inktank.com>
FileStore,DBObjectMap: remove ObjectMap link method

hobject_t's are now globally unique in filestore.  Essentially, there is
a 1-to-1 mapping from inodes to hobject_t's.  The entry in the
DBObjectMap is now tied to the inode/hobject_t.  Thus, links needn't be
tracked.  Rather, we delete the ObjectMap entry when nlink == 0.

Signed-off-by: Samuel Just <sam.just@inktank.com>
DBObjectMap: restructure for unique hobject_t's

Previously, the ObjectStore operated in terms of (coll_t,hobject_t)
tupples.  Now that hobject_t's are globally unique within the
ObjectStore, it is no longer necessary to support multiple names for the
same DBObjectMap node.

Signed-off-by: Samuel Just <sam.just@dreamhost.com>
DBObjectMap: Implement upgrade from previous format

Also includes tests in test_object_map.cc

Signed-off-by: Samuel Just <sam.just@dreamhost.com>
DBObjectMap: update check() for new format

Signed-off-by: Samuel Just <sam.just@dreamhost.com>
DBObjectMap::init: initialize seq and v to correct values

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