librados: mark old watch calls deprecated

Signed-off-by: Sage Weil <sage@redhat.com>
librados: mark old rollback call deprecated

Signed-off-by: Sage Weil <sage@redhat.com>
librados: no need for '2' suffix in c++

Compiler disambiguates based on the rest of the signature.

Signed-off-by: Sage Weil <sage@redhat.com>
rados: use new notify API

Signed-off-by: Sage Weil <sage@redhat.com>
librados: unwatch doesn't need the oid argument

The handle is like a file handle: there is internal state that is getting
freed and the user needn't provide it again.

Signed-off-by: Sage Weil <sage@redhat.com>
ceph_test_rados: use new watch/notify API

Ignore error events for now; we are just stressing the OSD.

Signed-off-by: Sage Weil <sage@redhat.com>
librados: watch_check() to check on status of watch

Return either an accumulated error code, or the time since the watch was
last confirmed.

Signed-off-by: Sage Weil <sage@redhat.com>
messages/MWatchNotify: print more nicer

Signed-off-by: Sage Weil <sage@redhat.com>
osdc/Objecter: expose LingerOp instead of linger_id

We want a reference-counted handle, not an id.

Signed-off-by: Sage Weil <sage@redhat.com>
osdc/Objecter: spit out linger register step

Signed-off-by: Sage Weil <sage@redhat.com>
librados: use Objecter's linger_id as the cookie

Signed-off-by: Sage Weil <sage@redhat.com>
osdc/Objecter: take Finisher ref from creator

Only needed for watch/notify users, so most can pass NULL.

Signed-off-by: Sage Weil <sage@redhat.com>
rados: break out notify replies by client

Signed-off-by: Sage Weil <sage@redhat.com>
librados: move watch/notify into the Objecter

Several things here:
 - we move all of the junk from librados' RadosClient into Objecter
 - we use fast-dispatch to schedule the watch-notify events (this will
   keep them ordered wrt ping)
 - we use the LingerOp * as the librados-exposed handle so that we can
   avoid any lookups for watch-check.

Signed-off-by: Sage Weil <sage@redhat.com>
osdc/Objecter: drop ACK callback for watch

It is semantically useless.

Signed-off-by: Sage Weil <sage@redhat.com>
osdc/Objecter: only reconnect watches; skip ack unless needed

Only watches get a RECONNECT op; lingers just get resent.

Only request an ACK in the non-watch reconnect case and when an ack
callback is specified.

Signed-off-by: Sage Weil <sage@redhat.com>
osdc/Objecter: ignore pings from previous registrations

If we have a ping in flight and then reregister (due to interval change
or whatever), ignore the result of the previous ping.

Signed-off-by: Sage Weil <sage@redhat.com>
osd: rejigger watch connect/disconnect callers

Signed-off-by: Sage Weil <sage@redhat.com>
encoding: multiset encode/decode

Signed-off-by: Sage Weil <sage@redhat.com>
librados: include missed watchers in notify reply data

Include a list of who missed their notify in the notify reply.

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