Motr
M0
|
#include <rm_fops.h>
Data Fields | |
struct m0_cookie | ow_cookie |
struct m0_buf | ow_resource |
This file defines RM-fops needed for RM-generic layer. All the layers using RM will have to define their own FOPs to fetch resource data. RM-generic FOPs provide a facility for resource credits management and to fetch small resource data.
RM fop formats
Various RM data-structures have to be located based on information stored in fops:
- resource type: identified by 64-bit identifier (m0_rm_resource_type::rt_id), - resource: resource information is never passed separately, but only to identify a resource owner, - owner: when a first request to a remote resource owner is made, the owner is identified by the resource (m0_rm_resource_type_ops::rto_encode()) it is a responsibility of the remote RM to locate the owner. In the subsequent fops for the same owner, it is identified by a 128-bit cookie (m0_rm_cookie), - credit: identified by an opaque byte array (m0_rm_resource_ops::rop_credit_decode(), m0_rm_credit_ops::rro_encode()). A 0-sized array in REVOKE and CANCEL fops is interpreted to mean "whole credit previously granted", - loan: identified by a 128-bit cookie (m0_rm_cookie).