A representation of a resource owner from another domain.
This is a generic structure.
m0_rm_remote is a portal through which interaction with the remote resource owners is transacted. m0_rm_remote state transitions happen under its resource's lock.
A remote owner is needed to borrow from or sub-let to an owner in a different domain. To establish the communication between local and remote owner the following stages are needed:
- a service managing the remote owner must be located in the
cluster. The particular way to do this depends on a resource type. For
some resource types, the service is immediately known. For example, a
"grant" (i.e., a reservation of a free storage space on a data
service) is provided by the data service, which is already known by
the time the grant is needed. For such resource types,
m0_rm_remote::rem_state is initialised to REM_SERVICE_LOCATED. For
other resource types, a distributed resource location data-base is
consulted to locate the service. While the data-base query is going
on, the remote owner is in REM_SERVICE_LOCATING state;
- once the service is known, the owner within the service should be
located. This is done generically, by sending a resource management fop
to the service. The service responds with the remote owner identifier
(m0_rm_remote::rem_cookie) used for further communications. The service
might respond with an error, if the owner is no longer there. In this
case, m0_rm_state::rem_state goes back to REM_SERVICE_LOCATING.
Owner identification is an optional step, intended to optimise remote
service performance. The service should be able to deal with the
requests without the owner identifier. Because of this, owner
identification can be piggy-backed to the first operation on the
remote owner.
* fini
* +----------------INITIALISED
* | |
* | | query the resource data-base
* | |
* | TIMEOUT V
* +--------------SERVICE_LOCATING<----+
* | | |
* | | reply: OK |
* | | |
* V fini V |
* FREED<-----------SERVICE_LOCATED | reply: moved
* ^ | |
* | | get id |
* | | |
* | TIMEOUT V |
* +----------------OWNER_LOCATING-----+
* | |
* | | reply: id
* | |
* | fini V
* +----------------OWNER_LOCATED
*
*
Definition at line 747 of file rm.h.