Motr  M0
Distributed File Lock
Collaboration diagram for Distributed File Lock:

Modules

 Distributed File Lock Internals
 

Data Structures

struct  m0_file
 

Functions

M0_INTERNAL void m0_file_init (struct m0_file *file, const struct m0_fid *fid, struct m0_rm_domain *dom, enum m0_di_types di_type)
 
M0_INTERNAL void m0_file_fini (struct m0_file *file)
 
M0_INTERNAL void m0_file_owner_init (struct m0_rm_owner *owner, const struct m0_uint128 *grp_id, struct m0_file *file, struct m0_rm_remote *creditor)
 
M0_INTERNAL void m0_file_owner_fini (struct m0_rm_owner *owner)
 
M0_INTERNAL void m0_file_lock (struct m0_rm_owner *owner, struct m0_rm_incoming *req)
 
M0_INTERNAL void m0_file_unlock (struct m0_rm_incoming *req)
 
M0_INTERNAL int m0_file_lock_type_register (struct m0_rm_domain *dom, struct m0_rm_resource_type *flock_rt)
 
M0_INTERNAL void m0_file_lock_type_deregister (struct m0_rm_resource_type *flock_rt)
 
M0_INTERNAL int m0_file_mod_init (void)
 
M0_INTERNAL void m0_file_mod_fini (void)
 

Variables

const struct m0_fid_type m0_file_fid_type
 
const struct m0_fid_type m0_file_fid_type
 

Detailed Description

See also
Resource management Functional Specification

Function Documentation

◆ m0_file_fini()

M0_INTERNAL void m0_file_fini ( struct m0_file file)

Finalises the file-lock resource.

Definition at line 498 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_file_init()

M0_INTERNAL void m0_file_init ( struct m0_file file,
const struct m0_fid fid,
struct m0_rm_domain dom,
enum m0_di_types  di_type 
)

Initialises a file-lock resource.

Parameters
file- a resource
fid- fid for the file-lock
dom- RM domain
di_type- di operations to be supported for this file

Definition at line 477 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_file_lock()

M0_INTERNAL void m0_file_lock ( struct m0_rm_owner owner,
struct m0_rm_incoming req 
)

Initiates acquiring a distributed file lock request. A caller can decide to wait, if necessary.

Definition at line 522 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_file_lock_type_deregister()

M0_INTERNAL void m0_file_lock_type_deregister ( struct m0_rm_resource_type flock_rt)

De-registers the resource of type 'distributed mutex' from a resource domain.

Definition at line 561 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_file_lock_type_register()

M0_INTERNAL int m0_file_lock_type_register ( struct m0_rm_domain dom,
struct m0_rm_resource_type flock_rt 
)

Registers the resource of type 'distributed mutex' with a resource domain.

Definition at line 549 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_file_mod_fini()

M0_INTERNAL void m0_file_mod_fini ( void  )

Module finalizer.

Definition at line 580 of file file.c.

Here is the call graph for this function:

◆ m0_file_mod_init()

M0_INTERNAL int m0_file_mod_init ( void  )

Module initializer.

Definition at line 574 of file file.c.

Here is the call graph for this function:

◆ m0_file_owner_fini()

M0_INTERNAL void m0_file_owner_fini ( struct m0_rm_owner owner)

Finalises the owner of file-lock

Definition at line 516 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_file_owner_init()

M0_INTERNAL void m0_file_owner_init ( struct m0_rm_owner owner,
const struct m0_uint128 grp_id,
struct m0_file file,
struct m0_rm_remote creditor 
)

Initialises owner for a file-lock resource.

Parameters
file- a resource
owner- Owner for file
creditor- Creditor for this owner

Definition at line 507 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_file_unlock()

M0_INTERNAL void m0_file_unlock ( struct m0_rm_incoming req)

Unlocks the distributed file lock.

Definition at line 540 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ m0_file_fid_type [1/2]

const struct m0_fid_type m0_file_fid_type

Definition at line 569 of file file.c.

◆ m0_file_fid_type [2/2]

const struct m0_fid_type m0_file_fid_type
Initial value:
= {
.ft_id = 'G',
.ft_name = "file fid"
}

Definition at line 569 of file file.c.