librados: Added missing IoCtx::notify_ack definition

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
osd: implement notify ack payloads

If the notified send back reply payloads, pass them back to the notifier.

Note that we have changed the on-wire behavior of the watch completion
message a bit: instead of sending the original notify payload back to the
notifier, we send the map of notified to replies.  Note that only users of
the new API will know what to do with the notify acknowledgement
information.  At the same time, we stop sending the original payload.
However, the old API users never saw that data; we were uselessly sending
it over the wire.

Signed-off-by: Sage Weil <sage@redhat.com>
librados: update notify2 API to accept reply payloads

Allow the notify2 callers to provide bufferlists or char ** pointers
so that we can pass the reply buffer back to them.

Signed-off-by: Sage Weil <sage@redhat.com>
librados: Add exec_mutable operation

The existing exec operation does not pass the current
snapshot context.  The new exec_mutable operation
includes the snapshot context so that methods which
update objects can be rolled back.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
rbd: Implement object map for tracking in-use objects

When enabled, the object map is stored in a new
'rbd_object_map.<id>' object in the image's pool. The
object map tracks blocks that are in-use, non-existent,
and are pending deletion.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
rbd: Use object map for IO operations

When the RBD object map is enabled, IO operations
now check whether or not an object exists before
sending a IO operation to RADOS.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
librados: Expose RadosClient instance id through librados

Allow librados clients to utilize the global id of the RadosClient.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
rbd: Add interal async_flatten and async_resize operations

These new operations are in support of allowing a maintenance client
to manipulate an image when an object map is in-use.  The maintenance
client will request the flatten and resize operation from the object
map leader.  The existing flatten and resize operations have been
updated to use the async versions internally.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
rbd: coordinate snapshot, resize, and flatten with object map leader

When the object map is enabled, non-leaders need to coordinate
operations that will affect the object map with the leader.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>