A watch operation registers the client as being interested in
notifications on an object. OSDs keep track of watches on
persistent storage, so they are preserved across cluster changes by
the normal recovery process. If the client loses its connection to
the primary OSD for a watched object, the watch will be removed
after 30 seconds. Watches are automatically reestablished when a new
connection is made, or a placement group switches OSDs.
@note BUG: watch timeout should be configurable
@param io the pool the object is in
@param o the object to watch
@param completion what to do when operation has been attempted
@param handle where to store the internal id assigned to this watch
@param watchcb what to do when a notify is received on this object
@param watcherrcb what to do when the watch session encounters an error
@param arg opaque value to pass to the callback
@returns 0 on success, negative error code on failure
Asynchronous register an interest in an object
A watch operation registers the client as being interested in notifications on an object. OSDs keep track of watches on persistent storage, so they are preserved across cluster changes by the normal recovery process. If the client loses its connection to the primary OSD for a watched object, the watch will be removed after 30 seconds. Watches are automatically reestablished when a new connection is made, or a placement group switches OSDs.
@note BUG: watch timeout should be configurable
@param io the pool the object is in @param o the object to watch @param completion what to do when operation has been attempted @param handle where to store the internal id assigned to this watch @param watchcb what to do when a notify is received on this object @param watcherrcb what to do when the watch session encounters an error @param arg opaque value to pass to the callback @returns 0 on success, negative error code on failure