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>
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>
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: 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>